-
Notifications
You must be signed in to change notification settings - Fork 1
/
Not16.hdl
48 lines (30 loc) · 938 Bytes
/
Not16.hdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/01/Not16.hdl
/**
* 16-bit Not:
* for i=0..15: out[i] = not in[i]
*/
CHIP Not16 {
IN in[16];
OUT out[16];
PARTS:
// Put your code here:
Nand(a=in[0],b=in[0],out=out[0]);
Nand(a=in[1],b=in[1],out=out[1]);
Nand(a=in[2],b=in[2],out=out[2]);
Nand(a=in[3],b=in[3],out=out[3]);
Nand(a=in[4],b=in[4],out=out[4]);
Nand(a=in[5],b=in[5],out=out[5]);
Nand(a=in[6],b=in[6],out=out[6]);
Nand(a=in[7],b=in[7],out=out[7]);
Nand(a=in[8],b=in[8],out=out[8]);
Nand(a=in[9],b=in[9],out=out[9]);
Nand(a=in[10],b=in[10],out=out[10]);
Nand(a=in[11],b=in[11],out=out[11]);
Nand(a=in[12],b=in[12],out=out[12]);
Nand(a=in[13],b=in[13],out=out[13]);
Nand(a=in[14],b=in[14],out=out[14]);
Nand(a=in[15],b=in[15],out=out[15]);
}