C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 8)
8.
A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?
Discussion:
36 comments Page 3 of 4.
Raghu said:
1 decade ago
Thank you kavitha.
Shrikant said:
1 decade ago
Thanks Santosh.
A.Vamsi krishna said:
1 decade ago
Thanks to all for this great analysis and Indiabix.
Preeti said:
1 decade ago
Thank you kavitha:).
Anusha said:
1 decade ago
Why is the concept of little or big endian followed? Why can't people stick on to 1 particular method following a standard what difference does it make?
Mohamed said:
1 decade ago
What is the use of using these two kind of methods?
Achal said:
1 decade ago
Hi bro I have doubt to store float value in given memory locations compiler follows IEEE 754 method, not endianness method.
I think endianness is for storing integer variable only.
Any info share with me I'm waiting.
I think endianness is for storing integer variable only.
Any info share with me I'm waiting.
(1)
Indhu said:
1 decade ago
I got confused by this different answers.
Please anyone give short and clear information.
Please anyone give short and clear information.
Sahithi said:
1 decade ago
Yes I need the single answer which is right its a little bit confusing.
(1)
Avi said:
1 decade ago
Simple answer (stack) :
For example memory location occupied for float (4 byte (32 bit) ) (1000 to 1003) and hex is ABCD (00001010 00001011 00001100 00001110).
MSB A B C D LSB.
Little endian architecture:- Lower byte (LSB) store first so,
1000-D.
1001-C.
1002-B.
1003-A.
Big endian architecture:- Higher byte (MSB) store first so,
1000-A.
1001-B.
1002-C.
1003-D.
For example memory location occupied for float (4 byte (32 bit) ) (1000 to 1003) and hex is ABCD (00001010 00001011 00001100 00001110).
MSB A B C D LSB.
Little endian architecture:- Lower byte (LSB) store first so,
1000-D.
1001-C.
1002-B.
1003-A.
Big endian architecture:- Higher byte (MSB) store first so,
1000-A.
1001-B.
1002-C.
1003-D.
(4)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers