看板 Grad-ProbAsk 關於我們 聯絡資訊
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
sasbluesea:因為如果要正負 那麼若用2補數表示 最大到 2^15 - 1 05/06 01:00
bernachom:我懂了,謝謝您 05/06 01:06