作者yunruo ()
看板TransCSI
标题[问题] 二的补数转十进制後的正负号判断
时间Tue Aug 21 17:12:50 2012
一直对 2 的补数转十进位後到底该是正数还是负数感到迷惑
麻烦高手指教
第一题
The decimal value of the number 11011001, which is in 2's complement
format, is
A. -217 B. -39 C. 217 D. 39
Ans: D
( 如果看MSB, 那不应该是 B ?
第二题
Convert each of the following two's complement binary data
(which are stored in 8-bit, length registers) to its equivalent base
ten form.
1) 00010101
Ans: -235
2) 11001011
Ans: -53
如果说会转成 2 的补数的都是负数,那第一题为什麽是正数 39 ?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 1.175.166.55