Professional Documents
Culture Documents
HW 1
HW 1
HW #1 – Due 1/10
1.) Pseudo-instructions (instructions that are not actually part of the MIPS
instruction set) often appear in MIPS programs. This can be for the
convenience of programmer or to make them more readable by humans.
Translate the following pseudo-instructions into the minimal sequence of
actual MIPS instructions that perform the desired function. You may
need to use the $at register to store a temporary value.
[Taken from Hennessy and Patterson, 3rd edition]
Hint: how might we represent a 32-bit value using only 16-bit values?
2.) Convert the following assembly program into machine code:
Address Instruction
512 00011001000000000000000000000010
516 10101101000001000000000000000000
520 10001101000001000000000000000100
524 00111000101010000001111101110011
528 00000000100001000010100000100000