作者bernachom (Terry)
看板Grad-ProbAsk
标题[问题] 计组-addressing mode
时间Wed May 6 00:34:20 2009
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
1F:推 sasbluesea:因为如果要正负 那麽若用2补数表示 最大到 2^15 - 1 05/06 01:00
2F:→ bernachom:我懂了,谢谢您 05/06 01:06