Digital Logic Tutorial

Counting Sequencer

This circuit is here to demonstrate the idea of sequencing data through a circuit over time. It combines several of the circuits and ideas we have seen already: The Register, the T-Flip Flop, and of course, the NAND, from which all of those are made.

As soon as the simulation starts, the clock will supply a pulse to the T-Flip Flop. The output is inverted (yes we could have used the inverted output) so there are two "phases" to the signal: Phase A goes to the left register, and Phase B goes to the right register. The output of the left register is added to the number input (use the left digit) and that is saved in the output register on the right during Phase B. After the end of Phase B, the output of the right register (the current count) is fed back to the left register during Phase A. This instantly changes the output of the adder, but has no effect on the circuits output becuase the right register is not saving during the A phase.

At first, nothing happens, because the registers are at zero, and the input is at zero. Change the left input digit to "1" by pressing the up arrow in the far upper left corner. Watch the circuit count up. Because it is a 4 bit system, it will count to 9, then A, B, C, D, E, F; it is counting in hexadecimal. After F, it will cycle back to 0 when the adder overflows. Change it to "2" and watch it count by twos.

Next:

A simple ALU

Advanced:

Can you make this circuit count down one at a time? Hint: You don't have to change the circuit at all; just the input!

See also: