10進位與2進位互換
1.將10進制12345.675轉成2進制顯示
2.將2進制11100011.10101轉成10進制
原連結
(1)分整數部份與小數部份處理
*****整數部份
12345/2 =6172….1
6172/2 =3086…...0
3086/2 =1543…...0
1543/2 =771…….1
771/2 =385…….. 1
385/2 =192……...1
192/2 =96……... .0
96/2 =48………...0
48/2 =24……….. 0
24/2 =12………. .0
12/2 =6………… 0
6/2 =3……….…. 0
3/2 =1………..….1
1/2 =0………..… 1
將餘數由下往上寫得: 11000000111001(2)
*****小數部份 0.675=675/1000=5/8 得0.101(2)
=(1/2)^3x(4+1)
=2^(-3)x(2^2+1)
=2^(-1)+2^(-3)
第一題答案為 11000000111001.101(2)
(2)等於2^8+2^7+2^6+2^2+2^1+2^-1+2^-3+2^-5
=256+128+64+4+2+0.5+0.125+0.03125
=454.65625
=256+128+64+4+2+0.5+0.125+0.03125
=454.65625
0 意見:
張貼留言