/* mux: multiplexor constructed using basic digital circuits (gates)

   Note: simulator also provide built-in multiplexors...
*/

Switch 1a sw0 ZERO;
Switch 2a sw1 ZERO;
Switch 3a sw2 ZERO;
Switch 4a sw3 ZERO;
Switch 6a sw4 ZERO;
Not    7a sw4 not-out-a;
Switch 8a sw5 ZERO;
Not    7a sw5 not-out-b;

And 1c sw0 not-out-a not-out-b out-1;
And 2c sw1 not-out-a sw5 out-2;
And 3c sw2 sw4 not-out-b out-3;
And 4c sw3 sw4 sw5 out-4;
Or  3d out-1 out-2 out-3 out-4 or-out;

Probe 3e or-out;
