I am experimenting with digital counters and for one application it would be useful to generate a set of four pairs of 3-bit values used for comparing (Cx) and resetting (Rx) a counter. Since there are four possible outputs I think that it's possible to use two SPDT switches (Sx) that can be connected to GND and VCC to create these values.
Proposed truth table:
Calculating Cx and Rx values can be easily done with standard logic gates as follows:
C2= (¬S1) and (¬S0) = S1 nor S0;
C1= S1 xor S0;
C0 = S0;
R2 = 0;
R1 = ¬S1;
R0 = ¬S0;
In terms of used components (4000-series ICs) this would require a Hex Inverter (CD4049), a XOR Gate (CD4070) and either a NOR gate (CD4001) or an AND Gate (CD4081). Total of 3 ICs.
I was wondering if there is a more elegant solution for such a simple task. Perhaps problematic C2 and C1 value can be generated using discrete components. I would appreciate any improvement suggestions.