lw R0, 254 // input a 0 lw R1, 254 // input b 2 ld R3, 255 // d= 255 4 xor R2, R1, R3 //store xor into c 6 ld R3, 1 // d= 1 8 add R2, R2, R3 //c = c + d 10 add R2, R0, R2 //c = a + c 12 ld R3, 127 // d= 127 14 xor R2, R2, R3 16 beq R2, 128 24 // if c = negative output b 18 sw R1, 255 // output b 20 hlt // 22 sw R1, 255 // output b 24