project01: Comments/cleanup

This commit is contained in:
2025-09-03 22:10:34 -04:00
parent dd31b8f1dc
commit 934f1ad2f5
11 changed files with 54 additions and 33 deletions

View File

@@ -11,11 +11,14 @@ CHIP Or8Way {
OUT out;
PARTS:
Or(a=in[0], b=in[1], out=tmp1);
Or(a=in[2], b=in[3], out=tmp2);
Or(a=in[4], b=in[5], out=tmp3);
Or(a=in[6], b=in[7], out=tmp4);
Or(a=tmp1, b=tmp2, out=tmp5);
Or(a=tmp3, b=tmp4, out=tmp6);
Or(a=tmp5, b=tmp6, out=out);
// combine pairs
Or(a=in[0], b=in[1], out=pair0);
Or(a=in[2], b=in[3], out=pair1);
Or(a=in[4], b=in[5], out=pair2);
Or(a=in[6], b=in[7], out=pair3);
// combine groups of pairs
Or(a=pair0, b=pair1, out=lowGroup);
Or(a=pair2, b=pair3, out=highGroup);
// combine both groups
Or(a=lowGroup, b=highGroup, out=out);
}