57.9k views
1 vote
A digital computer has a memory unit with 16 bits per word. The instruction set consists of 72 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.

Required:
a. How many bits are needed for the opcode?
b. How many bits are left for the address part of the instruction?
c. What is the maximum allowable size for memory?
d. What is the largest unsigned binary number that can be accommodated in one word of memory?

1 Answer

3 votes

Answer:

a. 7 bits b. 9 bits c. 1 kB d. 2¹⁶ - 1

Step-by-step explanation:

a. How many bits are needed for the opcode?

Since there are 72 different operations, we require the number of bits that would contain 72 different operations. So, 2ⁿ ≥ 72

72 = 64 + 8 = 2⁶ + 8

Since n must be an integer value, the closest value of n that would contain 72 different operations is n = 7. So, 2⁷ = 128

So, we require 7 bits for the opcode.

b. How many bits are left for the address part of the instruction?

bits left = bits per word - opcode bit = 16 - 7 = 9 bits

c. What is the maximum allowable size for memory?

Since there are going to be 2⁹ bits to addresses each word and 16 bits for each word, the maximum allowable size for memory is thus 2⁹ × 16 = 512 × 16 = 8192 bits.

We convert this to bytes

8192 bits × 1 byte/8 bits = 1024 bytes = 1 kB

d. What is the largest unsigned binary number that can be accommodated in one word of memory?

Since the number go from 0 to 2¹⁶, the largest unsigned binary number that can be accommodated in one word of memory is thus

2¹⁶ - 1

User M Granja
by
4.4k points