nand2tetris/projects/custom/Nor.hdl
2021-12-05 09:33:35 +05:30

23 lines
458 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/custom/Nor.hdl
/**
* Nor gate:
* out = 1 if (a == 0 or b == 0)
* 0 otherwise
*/
CHIP Nor {
IN a, b;
OUT out;
PARTS:
// Put your code here:
Nand(a=a, b=a, out=outx);
Nand(a=b, b=b, out=outy);
Nand(a=outx, b=outy, out=outz);
Nand(a=outz, b=outz, out=out);
}