Public » Elements of Computing
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Way better DMux4Way

Changeset 3df578dd6198

Parent 7f0d3feedb0b

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at 3df578dd6198 Showing diff from parent 7f0d3feedb0b Diff from another changeset...

Change 1 of 1 Show Entire File 01/​DMux4Way.hdl Stacked
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
 
 
31
 
16
17
18
 
 
 
 
 
 
 
 
 
 
 
 
19
20
21
22
@@ -16,16 +16,7 @@
  OUT a, b, c, d;     PARTS: - Not(in=sel[0], out=notsel0); - Not(in=sel[1], out=notsel1); - - And(a=notsel1, b=notsel0, out=picka); - And(a=notsel1, b=sel[0], out=pickb); - And(a=sel[1], b=notsel0, out=pickc); - And(a=sel[1], b=sel[0], out=pickd); - - And(a=in, b=picka, out=a); - And(a=in, b=pickb, out=b); - And(a=in, b=pickc, out=c); - And(a=in, b=pickd, out=d); + DMux(in=in, sel=sel[1], a=ab, b=cd); + DMux(in=ab, sel=sel[0], a=a, b=b); + DMux(in=cd, sel=sel[0], a=c, b=d);  }