CO Quiz 1 Solution
CO Quiz 1 Solution
CO Quiz 1 Solution
Q1.
# $t0 = instruction format
lui $t5, 0x03e0 #t5 = 0000001111100000 (And Mask)
and $t6, $t5, $t0 #t6 = 00000011011000000000000000000000
# (Rs extracted and placed in $t6)
srl $t1, $t6, 21 #t1 = 000000000000000000000000000011011
# number of bits = 6(opcode) + 5 (Rs) = 11 => 32-11 = 21 bits shift
Q2.