N2T/tools/builtInChips/FullAdder.hdl

20 lines
463 B
Plaintext

// 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;
}