In: Computer Science
13. A digital computer has a memory unit with 32 bits per word. The instruction set consists of 260 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) 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?
Greetings!!
ANSWER ( a ) :
The instruction set consists of 260 different operations.
So you should make room for each one instruction, meaning 260
unique instruction.
Therefore, bits that are needed for the opcode :-
=>Ceiling[ Log2(260) ]
=> 9 bits
ANSWER ( b ) :
Now, the remaining bits that are left for the address part of
the instruction :-
=> No. of bits per word - No. of bits needed for
the opcode
=> 32 - 9
=> 23 bits
ANSWER ( c )
:
Since we have 32 bits per word and we have 23 bits for address
part.
Therefore, the maximum allowable size for memory is:-
=> 223 * 32 bits
ANSWER ( d ) :
Here we have 32 bits per word, so the largest unsigned binary
number that can be accommodated in one word of memory:
=> 232 – 1
***********************************************************************************************************************************
**If you have any doubts then ask in comments. If you like the solution then please give it a thumbs up :)