A digital computer has a memory unit with 32 bits per word. The instruction set
ID: 3874930 • Letter: A
Question
A digital computer has a memory unit with 32 bits per word. The instruction set consists of 232 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. I. How many bits are needed for the opcode? II. How many bits are needed to specify the register? III. How many bits are left for the address part of the instruction? IV. What is the maximum allowable size for memory? V. What is the largest unsigned binary number that can be accommodated in one word of memory?
Explanation / Answer
i)An opcode is the portion of a machine language instruction that specifies the operation to be performed.
For representing 232 operations we need 8 bits.
2^8 > 232
So 8 bits for opcode
ii)32(memory unit)-8(opcode)/4=6 bits
iii)leftover bits for address of instruction is 32(memory unit)-8(opcode) = 24-6 = 18 bit
iv)since memory unit is 32 bits, size of memory 2^18 i.e 26
v)largest unsigned int 2^32 - 1
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.