Implement basic logic gates: Not, And, Or, Xor, Mux, DMux

This commit is contained in:
2025-08-27 19:07:20 +02:00
parent beb668806a
commit ad5f774ae0
6 changed files with 32 additions and 13 deletions

View File

@@ -12,5 +12,8 @@ CHIP DMux {
OUT a, b;
PARTS:
//// Replace this comment with your code.
// DMux(in,sel) -> a = And(in, Not(sel)), b = And(in, sel)
Not(in=sel, out=notSel);
And(a=in, b=notSel, out=a);
And(a=in, b=sel, out=b);
}