以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]浮点数表示方法 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=77571) |
-- 作者:jspta -- 发布时间:2015/11/20 16:09:00 -- [求助]浮点数表示方法 求指导,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 |
-- 作者:大红袍 -- 发布时间:2015/11/20 16:32:00 -- 1、http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/ComputerCode.html
2、http://www.cnblogs.com/xkfz007/articles/2590472.html
3、http://www.baidu.com/baidu?wd=%B8%A1%B5%E3%CA%FD%D7%AA%B6%FE%BD%F8%D6%C6&tn=monline_4_dg
|