For the first time I finished the DMux chips. Not the best way to do it, but its a start.

This commit is contained in:
2021-01-20 15:14:40 -06:00
parent 6cff6afc04
commit 77c62c3504
6 changed files with 85 additions and 1 deletions
+20 -1
View File
@@ -7,7 +7,11 @@
* 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, in, 0, 0, 0, 0, 0} if sel == 010
{0, 0, 0, in, 0, 0, 0, 0} if sel == 011
{0, 0, 0, 0, in, 0, 0, 0} if sel == 100
{0, 0, 0, 0, 0, in, 0, 0} if sel == 101
{0, 0, 0, 0, 0, 0, in, 0} if sel == 110
* {0, 0, 0, 0, 0, 0, 0, in} if sel == 111
*/
@@ -17,4 +21,19 @@ CHIP DMux8Way {
PARTS:
// Put your code here:
Not(in=sel[2], out=out1);
DMux4Way(in=in, sel=sel[0..1], a=outA, b=outB, c=outC, d=outD);
And(a=out1, b=outA, out=a);
And(a=out1, b=outB, out=b);
And(a=out1, b=outC, out=c);
And(a=out1, b=outD, out=d);
DMux4Way(in=in, sel=sel[0..1], a=outE, b=outF, c=outG, d=outH);
And(a=sel[2], b=outE, out=e);
And(a=sel[2], b=outF, out=f);
And(a=sel[2], b=outG, out=g);
And(a=sel[2], b=outH, out=h);
}