+/TECS

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

P1n3appl3Remove headers5e97a3a

v1.0
248 B13 linesraw
1/**
2 * Computes the sum of two bits.
3 */
4
5CHIP HalfAdder {
6    IN a, b;    // 1-bit inputs
7    OUT sum,    // Right bit of a + b 
8        carry;  // Left bit of a + b
9
10    PARTS:
11    Xor(a=a,b=b,out=sum);
12    And(a=a,b=b,out=carry);
13}