Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Interpret (decode) this 32-bit string as an instruction of the format shown in F

ID: 3913288 • Letter: I

Question

Interpret (decode) this 32-bit string as an instruction of the format shown in Figure 6.2.
            0001 1010 0001 0101 1111 0000 0000 0111
Use decimal values where appropriate.

operation reg A reg B dst reg unused add 0 0001 operation reg A unused dst reg offset load o 001 operation reg A reg B unused offset store o 001 operation reg A unused unused offset ump o 01 0 0 Figure 6.2 The binary representation for each of the four instructions listed in Figure 6.1. Each instruction is thirty-two bits long

Explanation / Answer

Instruction Set is 0001 1010 0001 0101 1111 0000 0000 0111 which is a 32 bit .

According to the given format first 5 bits are for opcode and next 4 bits for reg A and next 4 for regB/unused and 4 for dst reg/unused and rest 16 bits for offset.unused

So first 5 bits of given input is 00011 which is for store opertaion according to given figure

and store operation has following set

store regA regB unused offset

00011 0100 0010 1011 111000000000111

(4)10 (2)10   

Since the instruction set is not defined I am going to assume that this store operation is going to work like this :-

store rA,rB+offset means store the value found in rA at the address found in rB with offset

so for given string it will be -

store 4,(0010 + 111000000000111)

store 4, (111000000001001)2

OR

store 4, (28681)10

OR

store 4,(0x7009)

means store the value 4 in register @ 0x7009 address.

Hope this helps.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote