求指导,1,0.5,1.5的二进制是怎么换算得出的。。完全看不明白。。
4-byte real:
SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM
8-byte real:
SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM
MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
Examples of 4-byte real:
Note: In the first six lines of the following example, the 7-bit
exponent field = 65. The actual exponent is 65-64=1.
01000001 00010000 00000000 00000000 = 1
01000001 00100000 00000000 00000000 = 2
01000001 00110000 00000000 00000000 = 3
11000001 00010000 00000000 00000000 = -1
11000001 00100000 00000000 00000000 = -2
11000001 00110000 00000000 00000000 = -3
01000000 10000000 00000000 00000000 = .5
01000000 10011001 10011001 10011001 = .6
01000000 10110011 00110011 00110011 = .1
01000001 00011000 00000000 00000000 = 1.5
01000001 00011001 10011001 10011001 = 1.6
01000001 00011011 00110011 00110011 = 1.1
00000000 00000000 00000000 00000000 = 0
01000001 00010000 00000000 00000000 = 1
01000001 10100000 00000000 00000000 = 10
01000010 01100100 00000000 00000000 = 100
01000011 00111110 10000000 00000000 = 1000
01000100 00100111 00010000 00000000 = 10000
01000101 00011000 01101010 00000000 = 100000