nand2tetris/nand2tetris-suite/tools/builtInChips/FullAdder.hdl

20 lines
463 B
Plaintext
Raw Normal View History

2021-09-29 13:13:29 +02:00
// 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;
}