Suppose that you have a computer with a memory unit of 24 bits per word. In this computer, the assembly program’s instruction set consists of 198 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. a. How many bits are needed for the opcode? b. How many bits are left for the address part of the instruction? c. How many additional instructions could be added to this instruction set without exceeding the assigned number of bits? Discuss and show your calculations. d. What is the largest unsigned binary number that the address can hold?
a.
As 2^7 = 128 < 198 <= 256 = 2^8, 8 bits are needed for opcode.
b.
For address part left 24-8 = 16 bits.
c.
There are a totally 2^8 = 256 possible combinations with 8-bits opcode.
198 of them are already assing, so 58 codes are free for new instructions.
d. The largest unsigned binary number for the address part is 2^16 = 65536
Comments
Leave a comment