1a. It computes X2 - Y2 and puts the result in W, unless one of the squaring operations overflows, in which case it puts the value 0 in W.

1b.
addresscontents
10014200114MOV 114, R2
10104200002MUL R2, R2
10270600111BVS 111
10314400115MOV 115, R4
10404400004MUL R4, R4
10570600111BVS 111
10602200004SUB R4, R2
10715200116MOV R2, 116
11077000000HALT
11130000000CLR R0
11215000116MOV R0, 116
11377000000HALT
11400000022.WORD 22
11500000033.WORD 33
11600000000.WORD 0


[on to problem #5]