diff options
Diffstat (limited to 'chips/Inc16.hdl')
-rw-r--r-- | chips/Inc16.hdl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chips/Inc16.hdl b/chips/Inc16.hdl new file mode 100644 index 0000000..8142695 --- /dev/null +++ b/chips/Inc16.hdl @@ -0,0 +1,18 @@ +// 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/02/Inc16.hdl
+
+/**
+ * 16-bit incrementer:
+ * out = in + 1 (arithmetic addition)
+ */
+
+CHIP Inc16 {
+ IN in[16];
+ OUT out[16];
+
+ PARTS:
+ // Put you code here:
+ Add16 (a=in, b[0]=true, b[1..15]=false, out=out);
+}
|