|
Hi everybody. I have been loving going through this process of building a computer from Nand chips.
My Mux4Way16 chip is implemented as such:
Mux16(a=a[0..15],b=d[0..15],sel=sel[0], out=q);
Mux16(a=c[0..15],b=b[0..15],sel=sel[1], out=z);
Xor(a=sel[0],b=sel[1],out=h);
Mux16(a=q, b=z, sel=h, out = out[0..15]);
However, I get a comparison failure at line seven. Here is the error:
My chips .out:
a| 0001001000110100 b| 1001100001110110 c| 1010101010101010 d| 0101010101010101 sel| 01 out| 1010101010101010 |
Actual .out:
a| 0001001000110100 b| 1001100001110110 c| 1010101010101010 d| 0101010101010101 sel| 01 out| 1001100001110110
I don't understand why an input of 0 0 1 0 with a sel of 01 would output 1, as it does in the third "column" of my input.
|