Outline of What to Do
Since it is often a bit of a challenge to absorb information across many pages, I have decided consolidate all the steps into one short page that should give a better picture of carrying out this shortcut method.
- Step 1: Find out how many stages you need
- Use either the 2n > Final Count or 2n >= Modulo inequalities where n is equal to the number of stages needed
- Step 2: Create a Generic Base-2 Counter
- The T input of each stage requires that all the Qs of the previous stages be ANDed together.
- You can stop here if you are creating a mod-2n counter
- Step 3: Create a Comparison Table
- There are four rows: Final Count, Mod-N, Return #, and Gates
- The number of columns in the table is equal to the number of stages that you have
- Use the following rules:
- First Comparison
- If the mod-n bit matches that of the bit for the return number, you put a dash in the "Gates" row.
- If the mod-n bit is different than the bit for the return number, you will have to compare the final count bit and the mod-n bit (second comparison).
- Second Comparison
- If the final count bit is different than the mod-n bit, you put an INV-AND in the "Gates" row.
- If the final count bit is the same as the mod-n bit, you put an OR in the "Gates" row.
- Step 4: Insert in the Required Gates
- For INV-AND: Place an AND gate between the T-input of the stage you are targeting and the output from the previous AND gate. Wire up an INV to the new AND gate's inputs and leave it hanging for now.
- For OR: Place an OR gate between the T-input of the stage you are targeting and the output from the previous AND gate. Leave the other input of the OR gate dangling for now.
- Step 5: Wire up to the Final Count
- For any stage that has a one on the comparison table's "final count" row, we take its output to be the input to a new AND gate that will be connected to the dangling inputs of the logic we added in the previous step.
- If there is just 1 one on the comparison table's "final count" row, we just take that and feed it into the dangling inputs.