mirror of
https://github.com/captn3m0/nand2tetris.git
synced 2024-07-26 20:43:02 +00:00
Adds XOR
This commit is contained in:
parent
1b1b3f4cdd
commit
627d56f1eb
@ -14,4 +14,7 @@ CHIP Xor {
|
||||
|
||||
PARTS:
|
||||
// Put your code here:
|
||||
}
|
||||
Nand(a=a, b=b, out=w);
|
||||
Or(a=a, b=b, out=x);
|
||||
And(a=x, b=w, out=out);
|
||||
}
|
||||
|
5
projects/01/Xor.out
Normal file
5
projects/01/Xor.out
Normal file
@ -0,0 +1,5 @@
|
||||
| a | b | out |
|
||||
| 0 | 0 | 0 |
|
||||
| 0 | 1 | 1 |
|
||||
| 1 | 0 | 1 |
|
||||
| 1 | 1 | 0 |
|
Loading…
Reference in New Issue
Block a user