+/TECS

git clone https://git.julia.blue/+/TECS

P1n3appl3Remove headers5e97a3a

master
316 B14 linesraw
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}