C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 7)
7.
The binary equivalent of 5.375 is
Discussion:
76 comments Page 8 of 8.
Karan said:
1 decade ago
5.375
here know 5=101
now for 0.375
0.375
*2
____________=0 .collect top to bottom
.
0.750 .
*2 .
____________=1 .
1.500
0.500
*2
____________=1
1.000
here know 5=101
now for 0.375
0.375
*2
____________=0 .collect top to bottom
.
0.750 .
*2 .
____________=1 .
1.500
0.500
*2
____________=1
1.000
Mahi said:
1 decade ago
Nice answer vinoth thank you.
Prakash said:
1 decade ago
5.375
5 --> 101
0.375 * 2 = 0.75
0.75 * 2 = 1.5
0.5 * 2 = 1.0
Here the binary position like
.. 32 16 8 4 2 1
........................
1 1 = who is 1 add it that is 4+1=5. ok then remaing point matter
.375
in binary point conversion of divide by 2
and then LSB and MSB
0.375 *2 = 0.75 consider that 0
0.75 * 2 = 1.5 consider that 1
0.5 * 2 = 1.0 consider that 1
top to down
that is 011
and 5 is
101.011
5 --> 101
0.375 * 2 = 0.75
0.75 * 2 = 1.5
0.5 * 2 = 1.0
Here the binary position like
.. 32 16 8 4 2 1
........................
1 1 = who is 1 add it that is 4+1=5. ok then remaing point matter
.375
in binary point conversion of divide by 2
and then LSB and MSB
0.375 *2 = 0.75 consider that 0
0.75 * 2 = 1.5 consider that 1
0.5 * 2 = 1.0 consider that 1
top to down
that is 011
and 5 is
101.011
Sankar said:
1 decade ago
Q.The binary equalent of 5.375 is ..........
ans1)
5 binary equalent is 101
0.375 binary equalent is 3-011
7-111
5-101
take the first bit of 3,7,5 that is 011
so total correct ans is 101.011
ans1)
5 binary equalent is 101
0.375 binary equalent is 3-011
7-111
5-101
take the first bit of 3,7,5 that is 011
so total correct ans is 101.011
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
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
Amar said:
1 decade ago
@Susmita
Nice explanation.
Nice explanation.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers