summaryrefslogtreecommitdiff
path: root/tools/builtInChips/DMux8Way.hdl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/builtInChips/DMux8Way.hdl')
-rw-r--r--tools/builtInChips/DMux8Way.hdl22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/builtInChips/DMux8Way.hdl b/tools/builtInChips/DMux8Way.hdl
new file mode 100644
index 0000000..c5536b8
--- /dev/null
+++ b/tools/builtInChips/DMux8Way.hdl
@@ -0,0 +1,22 @@
+// This file is part of www.nand2tetris.org
+// and the book "The Elements of Computing Systems"
+// by Nisan and Schocken, MIT Press.
+// File name: tools/builtIn/DMux8Way.hdl
+
+/**
+ * 8-way demultiplexor.
+ * {a,b,c,d,e,f,g,h} = {in,0,0,0,0,0,0,0} if sel == 000
+ * {0,in,0,0,0,0,0,0} if sel == 001
+ * etc.
+ * {0,0,0,0,0,0,0,in} if sel == 111
+ */
+
+
+CHIP DMux8Way {
+
+ IN in, sel[3];
+ OUT a, b, c, d, e, f, g, h;
+
+ BUILTIN DMux8Way;
+}
+