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 4 of 8.

Sai said:   1 decade ago
5.375

5 --> 101

0.375 * 2 = 0.75
0.75 * 2 = 1.5
0.5 * 2 = 1.0

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

Bandi koushik said:   1 decade ago
5.375

5 --> 101.

0.375 * 2 = 0.75.
0.75 * 2 = 1.5.
0.5 * 2 = 1.0.

Consider decimals from top to bottom (0 1 1).

THEREFORE, 5.375=101.011.
(1)

Somraj....... said:   9 years ago
@Krish, you have to consider part after decimal point only.

Because if you consider 1.5 next answer will be 3.0 which is not possible.

RENU said:   1 decade ago
5.375
5=101

0.375
*2
____________=0
0.750
*2
____________=1
1.500

0.500
*2
____________=1

so 5.375=101.011
that is B

Srinu said:   1 decade ago
The above ans like this also..
2/375(1)
2/187(1)
3/93(0)
2/31(1)
3/15(0)
2/5(1)
2/2(0)
1
finally result is:10101111->101.011

Muralikrishna said:   1 decade ago
101.011 converting to decimal.

= 1*(2^2)+0*(2^1)+1*(2^0).0*(2^-1)+1*(2^-2)+1*(2^-3).
= 4+0+1.0+(1/4)+(1/8).
= 5.375 Answer.

Boss said:   10 years ago
It is better to go in 2-1 and take digital logic design book and read that then you know how to convert binary to decimal?

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

Mohit said:   1 decade ago
If the size of integer is 4bytes, What will be the output of the program?

How we can examine this type of question?

Nitish saurabh said:   1 decade ago
5.375

5 --> 101.

0.375 * 2 = 0.75.
0.75 * 2 = 1.5.
0.5 * 2 = 1.0.

Therefore it will be,
5.375 -> 101.011.


Post your comments here:

Your comments will be displayed after verification.