blob: a4caa56bff09b6b133f60cbc3a3ad3048a8eb80a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: tools/builtIn/FullAdder.hdl
/**
* Full adder. Computes sum, the least significant bit of
* a + b + c, and carry, the most significant bit of a + b + c.
*/
CHIP FullAdder {
IN a, b, c;
OUT sum, // LSB of a + b + c
carry; // MSB of a + b + c
BUILTIN FullAdder;
}
|