Skip to content
BetterDL

Clock

Also called: clock signal, CLK, system clock

A square wave that repeats at a fixed rate and tells every flip-flop in a synchronous circuit when to update.

A clock is a signal that alternates between 0 and 1 forever, at a steady rate. Every flip flop in a synchronous circuit watches it and acts only at its active edge, usually the rising edge. Between edges, stored values hold.

The clock turns a messy, continuous world into neat steps. Inputs and logic can wiggle as much as they like during a cycle; only the values present at the edge count.

The numbers that describe a clock:

  • Period T: the time for one full cycle, high part plus low part.
  • Frequency f: cycles per second, in hertz. f = 1 / T.
  • Duty cycle: the fraction of the period the clock is high. A symmetric clock is 50 %.
  • One rising edge and one falling edge per period.

How fast can a clock be? Each cycle must be long enough for data to leave one register, pass through the logic and arrive at the next register in time. That's the setup constraint, and it gives the maximum clock frequency. Real clocks range from a few MHz on a small microcontroller to several GHz in a laptop CPU.

CLK

Worked example

Example

Describing a clock

A clock runs at 200 MHz and is high for 40 % of each cycle. Find its period, the high and low times, and when its rising edges occur if the first one is at t = 0.

  1. 1.

    Period: T = 1 / f = 1000 ÷ 200 = 5 ns.

  2. 2.

    High time: 40 % of 5 ns = 2 ns. Low time: 5 − 2 = 3 ns.

  3. 3.

    Rising edges come once per period: t = 0, 5, 10, 15 ns, and so on.

  4. 4.

    Falling edges come 2 ns after each rising edge: t = 2, 7, 12 ns, and so on.

Common mistakes

  • Thinking a faster clock has a longer period. Frequency and period are reciprocals: faster means shorter.

  • Counting the high time alone as the period. The period is high time plus low time.

  • Assuming flip-flops react throughout the high phase. Edge-triggered flip-flops act only at the edge.

Practice Clock

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Clock is taught in Timing and Sequential Logic and Latches and Flip-Flops.