A CPU uses a 16-bit instruction format. If 4 bits are used for the opcode and the remaining bits specify a single memory address, what is the maximum addressable memory space for this instruction format?
Explanation
The correct option is 1. 4,096 locations.
Explanation:
To find the maximum addressable memory space, we need to determine how many bits are allocated specifically for holding the memory address inside the instruction layout.
The problem statement mentions that all the remaining bits are used to specify a single memory address field. Therefore, we can calculate the address field size as follows:
Bits for Address Field=Total Instruction Length−Opcode Bits
Bits for Address Field=16 bits−4 bits=12 bits
Calculating Addressable Space:
With n bits allocated for an address field, a CPU can uniquely reference a maximum of 2n distinct memory locations.
Substituting n=12 into the formula:
Maximum Addressable Memory Space=212 locations
We can break down 212 algebraically for simpler calculation:
212=210×22
212=1024×4=4096 locations
Thus, the system can reference a maximum of 4,096 distinct memory locations.