Public » Elements of Computing
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

And, not, or, and xor (although I don't like xor)

Changeset 93381495e19b

Parent 5923ba3076d8

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to 4 files · Browse files at 93381495e19b Showing diff from parent 5923ba3076d8 Diff from another changeset...

Change 1 of 1 Show Entire File 01/​And.hdl Stacked
 
13
14
15
16
 
 
17
 
13
14
15
 
16
17
18
@@ -13,5 +13,6 @@
  OUT out;     PARTS: - // Put your code here: + Nand(a=a, b=b, out=w); + Nand(a=w, b=w, out=out);  }
Change 1 of 1 Show Entire File 01/​Not.hdl Stacked
 
12
13
14
15
16
 
 
 
 
12
13
14
 
 
 
15
16
@@ -12,5 +12,5 @@
  OUT out;     PARTS: - // Put your code here: -} \ No newline at end of file
+ Nand(a=in, b=in, out=out); +}
Change 1 of 1 Show Entire File 01/​Or.hdl Stacked
 
12
13
14
15
 
 
 
 
16
 
12
13
14
 
15
16
17
18
19
@@ -12,5 +12,8 @@
  OUT out;     PARTS: - // Put your code here: + Not(in=a, out=nota); + Not(in=b, out=notb); + And(a=nota, b=notb, out=w); + Not(in=w, out=out);  }
Change 1 of 1 Show Entire File 01/​Xor.hdl Stacked
 
12
13
14
15
16
 
 
 
 
 
 
 
 
12
13
14
 
 
 
15
16
17
18
19
20
@@ -12,5 +12,9 @@
  OUT out;     PARTS: - // Put your code here: -} \ No newline at end of file
+ Not(in=a, out=nota); + Not(in=b, out=notb); + And(a=a, b=notb, out=w1); + And(a=nota, b=b, out=w2); + Or(a=w1, b=w2, out=out); +}