+/TECS
git clone https://git.julia.blue/+/TECS
5e97a3a
master
1/** 2 * Computes the sum of three bits. 3 */ 4 5CHIP FullAdder { 6 IN a, b, c; // 1-bit inputs 7 OUT sum, // Right bit of a + b + c 8 carry; // Left bit of a + b + c 9 10 PARTS: 11 HalfAdder(a=a,b=b,sum=w1,carry=w2); 12 HalfAdder(a=w1,b=c,sum=sum,carry=w3); 13 Or(a=w2,b=w3,out=carry); 14}