This commit is contained in:
Nemo 2020-05-19 18:12:52 +05:30
parent ad2e1f5747
commit ab0cd97270
227 changed files with 77088 additions and 77077 deletions

View File

@ -1,3 +1,4 @@
# nand2tetris
Download the latest `nand2tetris.zip` from the book website, and overwrite everything in the `projects` and `tools` directory.
- Download the latest `nand2tetris.zip` from the book website, and overwrite everything in the `projects` and `tools` directory.
- Remember to run `chmod +X tools/*.sh` if you're on \*nix.

View File

@ -15,4 +15,6 @@ CHIP And {
PARTS:
// Put your code here:
Nand(a=a, b=b, out=w);
Nand(a=w, b=w, out=out);
}

View File

@ -14,4 +14,5 @@ CHIP Not {
PARTS:
// Put your code here:
Nand(a=in,b=in,out=out);
}

View File

@ -9,10 +9,15 @@
* 0 otherwise
*/
// Or/Xor: These functions can be defined in terms of some of the Boolean functions implemented previously, using some simple Boolean manipulations. Thus, the respective gates can be built using previously built gates.
CHIP Or {
IN a, b;
OUT out;
PARTS:
// Put your code here:
Not(in=a, out=na);
Not(in=b, out=nb);
And(a=na, b=nb, out=nout);
Not(in=nout, out=out);
}

View File

@ -8,10 +8,12 @@
* for i = 0..15 out[i] = (a[i] or b[i])
*/
// Or/Xor: These functions can be defined in terms of some of the Boolean functions implemented previously, using some simple Boolean manipulations. Thus, the respective gates can be built using previously built gates.
CHIP Or16 {
IN a[16], b[16];
OUT out[16];
PARTS:
// Put your code here:
}