/* Mux macro
*/

Define MyMux i3 i2 i1 i0 c0 c1 | z;
  Not    fb   c1 not_c1;
  Not    fb   c0 not_c0;

  And    dc   i0 not_c1 not_c0    out_0;
  And    ec   i1 not_c1     c0    out_1;
  And    bc   i2     c1 not_c0    out_2;
  And    ac   i3     c1     c0    out_3;
  Or     cd   out_3  out_2  out_1 out_0   z;
Endef;

Switch aa sw3 '3' ZERO;
Switch ba sw2 '2' ZERO;
Switch ca sw1 '1' ZERO;
Switch da sw0 '0' ZERO;

Switch gb sw4 '4' ZERO;
Switch gc sw5 '5' ZERO;

MyMux ab-ec sw3 sw2 sw1 sw0 sw5 sw4 | out;

Probe ce  out;
