在计算机中表示一条指令需要多少位?

How many bits are needed to represent an instruction in a computer?

当计算机有 65000 字的内存时,在有 53 条不同指令且所有指令都是两个地址的计算机中,需要多少位来表示一条指令?

不知道我没听错,"all of which are two addresses"

让我们假设想要的指令可能是这样的<Instruction ><Operator1><Operator2>

你说有 53 条指令,那么让我们创建一个列表,并检查使用了多少位:

number   instruction
00000000 operation1
00000001 operation2
00000010 operation3
...
00110100 operation52
00110101 operation53

如你所见,只使用了8位中的6位,这是有道理的,2**6 = 64
要处理 65000 个字,您需要 16 位 (2**16=65536)

要使用 2 个操作符(每个 16 位)对指令进行编码,您需要

6(指令)+16(op1)+16(op2)=38位