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