Silicon to Scripting 12

This level is very very similar to the Logic Unit (LU), so try to do it on your own.

Arithmetic Unit

op1op0output
00X + Y
10X - Y
01X + 1
11X - 1

One tip is that you can use a standalone inv to get a constant 1, and you can use the lower-bit values like 0 and 1 in 16 bit operations.

Look closely at the op0 and op1 bits, as they alternate in a different pattern this time. This requires a slightly different configuration of selects at the top, but the idea is still the same.

Arithmetic Unit

part 13