Level 13: Operation Selection
Task
Build an operation selector. BusMUX picks the result: ADD, AND, or OR based on OpSelect.
Build a selector that picks one of three arithmetic operations.
Solution
Three compute units are ALREADY pre-placed: ADDER8 (addition), BusAND (bitwise AND), BusOR (bitwise OR). They are connected to inputs A and B — each operation runs in parallel.
Your task: select the CORRECT result through a multiplexer cascade. Control signal OpSelect: 0=add, 1=AND, 2=OR.
Step 1: Split OpSelect via Splitter into bits. Bit 0 will select between ADD and AND, bit 1 will add OR to the chain.
Step 2: Place the first BusMUX: - Input A = ADDER8 output (addition). - Input B = BusAND output (AND). - Selector = Splitter.Bit0. When OpSelect=0 → Bit0=0 → passes ADDER8. When OpSelect=1 → Bit0=1 → passes BusAND.
Step 3: Place the second BusMUX: - Input A = first BusMUX output. - Input B = BusOR output (OR). - Selector = Splitter.Bit1. When OpSelect=2 → Bit1=1 → passes BusOR.
The second BusMUX output is Result.