Clock
A Clock is a circuit that changes its output state periodically over time.
The simplest clock is made of a single Inverter connected to itself, either directly or with a delay. A single inverter clock alternates ON and OFF every tick. With delayer components, it will have a longer period.
Terminology
- Period is the duration of the entire cycle of the clock, measured in ticks. It includes the duration of the ON output and the OFF output.
- Duration of a signal is the number of ticks the signal remains unchanged.
With delay components the duration of a signal is calculated as follows:
The full period will be:
|
|
|
In advanced circuits or during construction you may require clocks with different periods, signal shapes, and functionality. Good clocks are essential in complex designs.
Construction
This article is mostly agnostic towards the period of the clock. This means you may add different features that will work regardless of the period.
To make a good clock you need to know what functionality you require. Here is a list of possible features you may want:
- Turning on/off
- Manually adjustable period
- Digitally adjustable period
- Specific signal shape
This article will show how to add features to a clock, starting from the simplest to the most advanced.
Turning on/off

Any clock has an inverter, therefore it can always be turned off with an ON signal applied to it. It's good practice to add a switch to all clocks. You can also use buttons to turn on/off the clock. With 1 button you will need a T Flip Flop. With 2 buttons you can use a Set Reset Trigger.
Adjustable period
You can adjust the period either manually or digitally.

If you are using a delayer you can edit its delay up to 30 ticks. Remember that with the inverter, the total duration will be 1 tick longer. For more than 30 ticks, you will need to connect several delayers one after another.
Another approach is to build several clocks with different periods and enable one of them. With this approach you can also control the period digitally or programmatically, by selecting the clock with the required period, usually with a multiplexer.
Signal shape
Quite often you will need a clock with a long period, but produces 1 tick pulse each cycle.
It is possible to achieve this by building a loop with multiple buffers and passing a 1-tick signal through it, but it will quickly become impractical.
A more efficient way is to attach a separate pulse generator to a normal clock. It will work with any clock configuration.
For long periods and long pulses, you can use the following design: clock → pulse generator → signal extender.
"Multitool" clock example

The total period here is 8 ticks, and you can see the signal shape on the next screenshot. It is a good idea to construct a small but efficient clock for general use. It should have everything described above. The screenshot below demonstrates an example. It has a turn-off switch, adjustable period, and a pulse output.


