what i want to ask is,from
https://www.rapidtables.com/convert/number/decimal-to-binary.html
124,375 ---> 11110010111010111
124.375 ---> 1111100.011
I think the number just grows from the right, same as base 10 does?
i.e.
0 --> 0
1 --> 1
2 --> 10
3 --> 11
4 --> 110
5 --> 111
6 --> 1000
.
.
rightmost figure is the 'ones' column, second to rightmost is the 'twoes'. 3rd to rightmost the 'fours', 4th to rightmost the 'eights' and so on.. 16..32..64..128..256..512 etc working toward the left
As others have shown you for the binary integer, keep dividing the decimal integer by 2 and build the binary integer from right to left from the remainders. For the fractional part, multiply the decimal part by 2 and build the fractional binary from the overflow into an integer. Example: 0.375 * 2 = 0.75, no overflow, so first fractional binary digit is 0. Next, 0.75 * 2 = 1.5, overflow, so second fractional binary digit is 1. Next, 0.5 * 2 = 1.0, overflow, so third fractional binary digit is 1. Putting it all together we get . 011 for the binary fraction.hi,
I want to ask how to convert decimmal no.
124.375 into 8 bit binary digit no.
(i.e i having problem that, i should count binary digit from left side or right side as it exceeding the 8 bit).
thnks.
from
https://www.rapidtables.com/convert/number/decimal-to-binary.html
124,375 ---> 11110010111010111
124.375 ---> 1111100.011
I think the number just grows from the right, same as base 10 does?
i.e.
0 --> 0
1 --> 1
2 --> 10
3 --> 11
4 --> 110
5 --> 111
6 --> 1000
.
.
rightmost figure is the 'ones' column, second to rightmost is the 'twoes'. 3rd to rightmost the 'fours', 4th to rightmost the 'eights' and so on.. 16..32..64..128..256..512 etc working toward the left