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

DMux4Way, dumb

Changeset 7f0d3feedb0b

Parent a89509a1dd5a

by Profile picture of Benjamin PollackBenjamin Pollack

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

Change 1 of 1 Show Entire File 01/​DMux4Way.hdl Stacked
 
16
17
18
19
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
17
18
 
 
 
19
20
21
22
23
24
25
26
27
28
29
30
31
@@ -16,5 +16,16 @@
  OUT a, b, c, d;     PARTS: - // Put your code here: -} \ No newline at end of file
+ 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); +}