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

Half adder and full adder

Changeset 052b88b77c2e

Parent 389f5c3415e2

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to 2 files · Browse files at 052b88b77c2e Showing diff from parent 389f5c3415e2 Diff from another changeset...

Change 1 of 1 Show Entire File 02/​FullAdder.hdl Stacked
 
13
14
15
16
17
 
 
 
 
 
 
 
13
14
15
 
 
 
16
17
18
19
20
@@ -13,5 +13,8 @@
  carry; // Left bit of a + b + c     PARTS: - // Put you code here: -} \ No newline at end of file
+ Xor(a=a, b=b, out=s0); + Xor(a=c, b=s0, out=sum); + Or(a=a, b=b, out=c0); + And(a=c0, b=c, out=carry); +}
Change 1 of 1 Show Entire File 02/​HalfAdder.hdl Stacked
 
13
14
15
16
 
 
17
 
13
14
15
 
16
17
18
@@ -13,5 +13,6 @@
  carry; // Left bit of a + b     PARTS: - // Put you code here: + Xor(a=a, b=b, out=sum); + And(a=a, b=b, out=carry);  }