作者youyouyou (這就是人生阿)
看板NTUEE108HW
標題[作業] 交電題目看不懂
時間Mon Oct 10 22:44:05 2005
1.27 Because A-B = A +(-B), the subtraction of signed numbers can be
accomplished by adding the complement. Subtract each of the following
pairs of 5-bit binary numbers by adding the complement of the subtrah
-end to the minnend. Indicate when an overflow occurs. Assume that neg
^^^^^^^^^^^^^^^
-gative numbers are represented in 1's complement.Then repeat using 2'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-s complement.
^^^^^^^^^^^^^^
請問這段話的意思是 先把題目給的signed bit 為1 的數 當作1補數的負數去運算
,做完後再把原本的負數視做2補數的負數去運算 ?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.169.32.180
推 timrau:對 也就是要花兩倍時間 做兩倍題目的意思 10/10 22:48
推 youyouyou:感謝 10/10 22:54