Implement 16-bit logic gates: Not16, And16, Or16, Mux16

This commit is contained in:
2025-08-27 19:08:17 +02:00
parent ad5f774ae0
commit 93f730d0ce
4 changed files with 74 additions and 10 deletions

View File

@@ -12,5 +12,21 @@ CHIP Not16 {
OUT out[16];
PARTS:
//// Replace this comment with your code.
}
// Apply Not gate to each of the 16 bits
Not(in=in[0], out=out[0]);
Not(in=in[1], out=out[1]);
Not(in=in[2], out=out[2]);
Not(in=in[3], out=out[3]);
Not(in=in[4], out=out[4]);
Not(in=in[5], out=out[5]);
Not(in=in[6], out=out[6]);
Not(in=in[7], out=out[7]);
Not(in=in[8], out=out[8]);
Not(in=in[9], out=out[9]);
Not(in=in[10], out=out[10]);
Not(in=in[11], out=out[11]);
Not(in=in[12], out=out[12]);
Not(in=in[13], out=out[13]);
Not(in=in[14], out=out[14]);
Not(in=in[15], out=out[15]);
}