How do you convert binary to decimal if the binary was 1.01?
What is 1.01 bina开发者_StackOverflowry in decimal?
Just remember we use positional numbering system.
1101 = 2^0 + 2^2 + 2^3 = 1 + 4 + 8 = 13
1.01 = 2^0 + 2^(-2) = 1 + 1/4 = 1.25
Positions to the left of the unit multiply by 2 each time. Positions to the right of the unit divide by 2 each time.
1 . 0 1
1×1 + 0×1/2 + 1×1/4 = 1 1/4
It's 1.25:
1 * 2^0 + 0 * 2^-1 + 1 * 2^-2
= 1 * 1 + 0 * 0.5 + 1 * 0.25
= 1 + 0.25
= 1.25
精彩评论