A digital computer has a memory unit with a 32-bit instruction and a register fi
ID: 3765113 • Letter: A
Question
A digital computer has a memory unit with a 32-bit instruction and a register file with 64 registers. The instruction set consists of 130 different operations. There is only one type of instruction format, with an opcode, a register file address, and an immediate operand. Each instruction is stored in one word of memory. How many bits are needed for the opcode? How many bits are left for the immediate operand? If the immediate operand is used as an unsigned address to memory, what is the maximum number of words that can be addressed in memory? What are the largest and smallest values of signed 2cm binary numbers that can be accommodated as an immediate operand?Explanation / Answer
a)
we need to store 130 instructions that means we should be able to represent 0-129 in some number of bits in th3 32 bit instruction word.
2^7 = 128
2^8 = 256
so 8 bits are required in the instruction for the opcode.
b)
There are 64 registers so 0-63 means 2^5 so 5 bits are required for register number.
Now total bits remaining = 32-8-5=19 bits will be left for immediate operand.
c)
if it is unsigned then we have 19 bits to represent a number which will be
111 1111 1111 1111 1111 in binary
or 7FFFF in hexadecimal = 524287
d)
in case of signed 1 bit will be used for sign of the instruction so it will be +262143 and -262142
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.