Silicon to Scripting 13

These newer gates are getting larger, so there will be more than one way of solving them. By no means is my solution always the “best” or “most efficient”, so if you solved it differently, don’t worry.

ALU

The ALU is a combination of the Arithemetic Unit and the Logic Unit, so we can connect up the op0 and op1 inputs to them.

alu part 1

The challenge of this level is implementing the sw and zx flags. These inputs [sw]itch X and Y and/or [z]ero [x].

From the table, we can see that sw is applied before zx, so lets do that first.

alu part 2

Now we need to make the left inlet 0 if zx is on.

alu part 3

Nothing too complicated here.

part 14