Question

if a computer system with memory module of size 2048 and each word is 8 bits, it has four fields: an op-code field to specify one of 32 operations, a register address to select one of 64 registers, an address mode enabling one of 4 modes and a memory address field.

draw the instruction indicating its fields.

Was it helpful?

Solution

Let's try:

ooooorrr rrrmmddd dddddddd

A.: three words.

We have 32 operations, 32 is a 2^5, so we need 5 bits to encode the operation. Then we have 64 registers, it is 2^6, so we need 6 bits to encode the register. Then we have 4 addressing modes, so 2 more bits. And, finally we have 2048 addresses and we need 11 bits to encode the displacement.

So, totally we need 24 bits (5+6+2+11) to encode the single instruction. Thus, provided that this machine word is 8 bits wide we need 3 words to encode an instruction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top