[問題] 計組-addressing mode

看板Grad-ProbAsk作者 (Terry)時間16年前 (2009/05/06 00:34), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
A displacement addressing mode has an offset specified relative to a base value. An example is shown below: Add R4,100(R1) (meaning: R4<-R4+M[100+R1]) The value 100 in the above example is called the displacement. In a machine in which all instructions are 32 bits with a 6-bits opcode, what is the maximum value of the displacement. Assume that the machine has 32 general-purpose registers. 書上寫:32-6-5-5=16 bit 可是後面又寫了一句:如果以2's complement 來表示,最大正值為2^15 -1 這是什麼意思呢? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.228.97.36

05/06 01:00, , 1F
因為如果要正負 那麼若用2補數表示 最大到 2^15 - 1
05/06 01:00, 1F

05/06 01:06, , 2F
我懂了,謝謝您
05/06 01:06, 2F
文章代碼(AID): #1A06gDWE (Grad-ProbAsk)