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.