C Programming - Floating Point Issues - Discussion

Discussion Forum : Floating Point Issues - General Questions (Q.No. 7)
7.
The binary equivalent of 5.375 is
101.101110111
101.011
101011
None of above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
76 comments Page 7 of 8.

Sasikumar said:   1 decade ago
5.375

1--001
2--010
3--011
4--100
5-- 101

0.375 * 2 = 0.750
0.75 * 2 = 1.500
0.5 * 2 = 1.000

Consider,only the decimal part from top to bottom ( 0 1 1)
THEREFORE, 5.375=101.011

Mukti said:   1 decade ago
Thanks surya.

Shivanand said:   1 decade ago
Thanks yar anil.

Radha said:   1 decade ago
Thanks Narayana :-)

Pramod said:   1 decade ago
Anil explanation is right way. Thanks dude.

Anil said:   1 decade ago
101.011->
101=5

For decimal part:

.011=.[0*{1/(2^1)} 2^1=2
+1*{1/(2^2)} 2^2=4
+1*{1/(2^3)}] 2^3=8
= .[0+1*0.25+1*0.125]
= .[0+0.25+0.125]
= 0.375

Aruna said:   1 decade ago
5-->at lcm you will get 101 take only remainders

0.375-->multiply with 2 sucessvily and take onli integral part

Jai said:   2 decades ago
How to work out this ?

Deepshikha said:   1 decade ago
Thanku surya. I liked your answer. Thanz. :).

Subramanya said:   1 decade ago
Different answer. Thanks to sushmitha.


Post your comments here:

Your comments will be displayed after verification.