Files
nand2tetris/projects/01/Nor.hdl
2014-11-10 21:50:48 -08:00

22 lines
430 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: projects/01/Or.hdl
/**
* Nor gate:
* out = 0 if (a == 1 or b == 1)
* 1 otherwise
*/
CHIP Nor {
IN a, b;
OUT out;
PARTS:
Nand (a=a, b=a, out=tmp1);
Nand (a=b, b=b, out=tmp2);
Nand (a=tmp1, b=tmp2, out=tmp3);
Nand (a=tmp3, b=tmp3, out=out);
}