Clock

Inputs

PinTypeDescription
No input pins

This element has no inputs.

Outputs

PinTypeDescription
QbitToggles between 0 and 1 on each simulation step

How It Works

An orchestra plays at the tempo set by the conductor's baton. The clock generator is the baton of the whole digital circuit: on every simulation step it toggles 0 ↔ 1, and all the registers of the computer live by these beats.

The key property: a full cycle takes two steps — the rising edge 0→1 and the falling edge 1→0. On the edge, every sequential element whose clock input is wired to the generator captures data at the same moment; on the fall, the combinational logic calmly computes the next values. This is what synchronization means: while the program counter turns from 0 to 1 on the edge, the accumulator commits its result in that very same instant — nobody rushes ahead and nobody lags behind.

A nuance: the Clock itself has no inputs at all — you cannot steer it with a wire. In tickMode levels the tempo is commanded by the Clock Control panel buttons: Play — continuous run, Step — one tick, Pause — a stop.

Examples (generator ticks)

StepGenerator QWhat happens in the circuit
10 → 1 (rising edge)registers capture the values on their inputs
21 → 0 (falling edge)combinational logic computes the next values
30 → 1 (rising edge)the program counter increments, registers update
41 → 0 (falling edge)the circuit prepares for the next edge

Two steps make one clock cycle; the circuit writes only on rising edges.

Usage

No clocked circuit works without the Clock: D flip-flops (level 11), registers (level 12), the program counter (level 14) and the whole processor (levels 16–29) all wait for the edge. One generator hands the tempo to everyone — its Q output fans out to the clock inputs of the entire circuit, and in the sandbox it is always available.

A concrete use: connect Q to the clock inputs of all sequential elements, pick a speed with the slider on the Clock Control panel — and the program comes alive. For debugging press Pause and use Step: the circuit will move one tick per press.

Build it yourself →

Related components

Related articles

Frequently Asked Questions

What is clock frequency?

How many times per second Clock switches from 0 to 1: the higher the frequency, the faster the circuit runs.

How is Clock different from Manual Clock?

Clock toggles on its own every simulation step, while Manual Clock emits a pulse only when you press the Tick button — it is the step-by-step debugging tool.

What happens if you don't connect Clock to a register?

The register never sees an edge and never stores a single value — the clocked part of the circuit stays frozen in an undefined state.