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

DMux and Mux

Changeset 5d16e3b714ae

Parent a87f03221d9d

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to 2 files · Browse files at 5d16e3b714ae Showing diff from parent a87f03221d9d Diff from another changeset...

Change 1 of 1 Show Entire File 01/​DMux.hdl Stacked
 
15
16
17
18
 
 
 
19
 
15
16
17
 
18
19
20
21
@@ -15,5 +15,7 @@
  OUT a, b;     PARTS: - // Put your code here: + Not(in=sel, out=notsel); + And(a=in, b=sel, out=b); + And(a=in, b=notsel, out=a);  }
Change 1 of 1 Show Entire File 01/​Mux.hdl Stacked
 
12
13
14
15
16
 
 
 
 
 
 
 
12
13
14
 
 
 
15
16
17
18
19
@@ -12,5 +12,8 @@
  OUT out;     PARTS: - // Put your code here: -} \ No newline at end of file
+ Not(in=sel, out=notsel); + And(a=a, b=notsel, out=w1); + And(a=b, b=sel, out=w2); + Or(a=w1, b=w2, out=out); +}