Advertisement
Yazb

FourAnd

May 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // This file is part of www.nand2tetris.org
  2. // and the book "The Elements of Computing Systems"
  3. // by Nisan and Schocken, MIT Press.
  4. // File name: projects/01/FourAnd.hdl
  5.  
  6. /**
  7. * 1bit bitwise 4And:
  8. * for i = 0..15: out[i] = (a[i] and b[i])
  9. */
  10.  
  11. CHIP FourAnd {
  12. IN a, b, c, d;
  13. OUT out;
  14.  
  15. PARTS:
  16. // Put your code here:
  17.  
  18. ThreeAnd(a= a, b = b, c = c, out = q);
  19. And(a = d, b = q, out = out);
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement