Professional Documents
Culture Documents
• instruction type
• instruction
1
• value of the relevant fields (in decimal notation)
• assembler syntax
• pseudo code (semantics), if necessary invent it
• 000000 00001 11111 10101 00000 100001
• 000000 01010 10101 11000 00000 100111
• 001110 10000 10111 1111111111111111
• 000000 10110 00001 00000 101010
• 001000 00010 00000 1111111111111111 do not work hard on this
2
6 Understanding a Loop (20 Pt)
initially let gpr(1) = n ≥ 0 (in assembly language notation, i.e. c0.gpr(19 =
1 − 32)
Treat line numbers as comments for your orientation
1: add $2 $1 $0
2: beq $1 $0 4
3: addi $1 $1 -1
4: add $2 $2 $1
5: beq $3 $3 -3
6: ....