Complete first project

This commit is contained in:
2024-11-28 12:43:34 +04:00
commit c8f06bc4dd
17 changed files with 353 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
// 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/1/Or8Way.hdl
/**
* 8-way Or gate:
* out = in[0] Or in[1] Or ... Or in[7]
*/
CHIP Or8Way {
IN in[8];
OUT out;
PARTS:
Or(a=in[0], b=in[1], out=x1);
Or(a=in[2], b=in[3], out=x2);
Or(a=in[4], b=in[5], out=x3);
Or(a=in[6], b=in[7], out=x4);
Or(a=x1, b=x2, out=y1);
Or(a=x3, b=x4, out=y2);
Or(a=y1, b=y2, out=out);
}