Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Multiplexor:
- * out = a if sel == 0
- * b otherwise
- */
- CHIP Mux {
- IN a, b, sel;
- OUT out;
- PARTS:
- Nand(a=b, b=sel, out = out1);
- Nand(a=sel, b=sel, out = out2);
- Nand(a=out2, b=a, out = out3);
- Nand(a=out1, b=out3, out = out);
- }
Add Comment
Please, Sign In to add comment