You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#lang br/demo/hdl
|
|
|
|
CHIP HalfAdder {
|
|
IN a, b; // 1-bit inputs
|
|
OUT sum, // Right bit of a + b
|
|
carry; // Left bit of a + b
|
|
|
|
PARTS:
|
|
Xor(a=a, b=b, out=sum);
|
|
And(a=a, b=b, out=carry);
|
|
}
|