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.
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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.