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
op1 | op0 | output |
---|---|---|
0 | 0 | X + Y |
1 | 0 | X - Y |
0 | 1 | X + 1 |
1 | 1 | X - 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 select
s at the top, but the idea is still the same.