bwukki

Untitled

Nov 20th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. /**
  2. * Multiplexor:
  3. * out = a if sel == 0
  4. * b otherwise
  5. */
  6.  
  7. CHIP Mux {
  8. IN a, b, sel;
  9. OUT out;
  10.  
  11. PARTS:
  12. Nand(a=b, b=sel, out = out1);
  13. Nand(a=sel, b=sel, out = out2);
  14. Nand(a=out2, b=a, out = out3);
  15. Nand(a=out1, b=out3, out = out);
  16. }
Add Comment
Please, Sign In to add comment