Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Exclusive-or gate:
- * out = not (a == b)
- */
- CHIP Xor {
- IN a, b;
- OUT out;
- PARTS:
- Nand(a=a, b=b, out = i);
- Nand(a=a, b=a, out = na);
- Nand(a=b, b=b, out = nb);
- Nand(a=na, b=nb, out = j);
- Nand(a = i, b = j, out = q);
- Nand(a = q, b = q, out = out);
- }
Add Comment
Please, Sign In to add comment