Login  Register

ALU Multiplexer

Posted by mdantzis on Feb 25, 2013; 1:15am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-Multiplexer-tp4026371.html

If I understand correctly, the sel represents a binary number 0 or 1 for Mux…000-111 for Mux8Way16 and the Multiplexer outs the line the matches the binary number.

If this is correct the answers to a logical or mathematic functions truth table tells us what combinations of x, y, and switches produces a 1, and these 1 are encoded from 000 to 111(connected to a through h on Mux8Way16)) to match the x y and sel switches (the truth tables individual lines).

If all this is correct in Mux16, Mux4Way16 and Mux8Way16 the sel (switches e.g. ZX, NX…) is 1to 3 bits
but x and y are 16bits.

I know this can be done by brute force.

But must I repeat each ALU function 16 times?
 
There must be a better way to connect  x[16] and y[16] to sel in the multiplexer