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

Fixed full adder

Changeset b2157584f9a3

Parent 052b88b77c2e

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at b2157584f9a3 Showing diff from parent 052b88b77c2e Diff from another changeset...

Change 1 of 1 Show Entire File 02/​FullAdder.hdl Stacked
 
13
14
15
16
17
18
19
 
 
 
20
 
13
14
15
 
 
 
 
16
17
18
19
@@ -13,8 +13,7 @@
  carry; // Left bit of a + b + c     PARTS: - 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); + HalfAdder(a=a, b=b, sum=s0, carry=c0); + HalfAdder(a=c, b=s0, sum=sum, carry=c1); + Or(a=c0, b=c1, out=carry);  }