4a.
2000005000CLR R0
2002005001CLR R1
2004066701ADD 2030, R1
2006000020
2010005200INC R0
2012020067CMP R0, 2026
2014000010
2016002772BLT 2004
2020010167MOV R1, 2032
2022000006
2024000000HALT
2026000005.WORD 5
2030000006.WORD 6
2032000007.WORD 7

4b. It multiplies [2026] by [2030] by repeated addition, storing the result in location 2032, then halts. Final [R0]=5, [R1]=36, [R7]=2026, [2026]=5, [2030]=6, [2032]=36 (all in octal).

If you got 30 instead of 36, you probably did it in base 10. 3010 = 368.


[on to problem #5]