Encode the following instruction
(1) identify the instruction format that will be used
(2) indicate the values of each of the fields for that format in decimal
(3) convert each of these decimal val- ues to binary
(4) represent the entire instruction as one hexadecimal value
ori $t1,$a2,7
ori $t1,$a2,7 1) this is an I-type instruction OPCODE rs rt immediate 2) OPCODE = ori = 13 rs = $a2 = 6 rt = $t1 = 9 immediate = 7 3) 13 in binary is 001101 6 in binary is 00110 9 in binary is 01001 7 in binary is 0000000000000111 so, instruction is 00110100110010010000000000000111 4) Converting 00110100110010010000000000000111 to hexadecimal 0011 => 3 0100 => 4 1100 => C 1001 => 9 0000 => 0 0000 => 0 0000 => 0 0111 => 7 So, in hexadecimal 00110100110010010000000000000111 is 0x34C90007 Instruction in hexadecimal is 0x34C90007
Get Answers For Free
Most questions answered within 1 hours.