Skip to content
BetterDL

Synchronous clear

Also called: sync clear, synchronous reset, sync reset, clocked clear, synchronous clear input

A clear input built from logic in front of each D input, so the register resets to 0 only at the next active clock edge, not immediately.

A synchronous clear resets a register to 0, but only at the next clock edge. It is ordinary logic in front of each flip-flop's D input that makes the next value 0.

For a register that loads data N at every edge, with clear input C:

D =

With C = 0, D = N and the register loads normally. With C = 1, D = 0, so at the next edge every bit loads 0.

With a load enable as well, clear normally has priority, so C goes on the outside:

D =

Why priority: clear is how you recover a known state. If load could override it, a stuck or noisy load signal could stop the reset from working.

Compared with an asynchronous clear:

  • A synchronous clear obeys the same edge rule as every other input, so it causes no timing surprises. Many FPGA and chip designers prefer it.
  • But it needs a running clock, and a pulse that starts and ends between two edges is missed completely.

A synchronous clear is just one more candidate for the D-input logic to choose, alongside keep and new. The same trick gives a synchronous set (force a 1) by ORing instead of ANDing.

D
00000
00011
00100
00111
01000
01010
01101
01111
10000
10010
10100
10110
11000
11010
11100
11110

Worked examples

Example

Waiting for the edge

A register bit loads N = 1 at every edge unless C = 1. Q starts at 0. C rises in slot 5, while CLK is low.

CLKCQ
  1. 1.

    Slots 2 and 4: edges with C = 0. Q loads 1.

  2. 2.

    Slot 5: C = 1, but there is no edge. Q stays 1.

  3. 3.

    Slot 6: edge with C = 1. D = 0, so Q = 0.

  4. 4.

    Slot 7: C returns to 0. No edge, so Q stays 0.

  5. 5.

    Slot 8: edge with C = 0. Q loads 1 again.

Example

Clear and load at the same edge

A 4-bit register with synchronous clear (priority over load) holds 1101. At the next edge C = 1, L = 1 and the data is 0110.

  1. 1.

    C = 1 forces every D to 0, whatever L and the data are.

  2. 2.

    After the edge the register holds 0000.

  3. 3.

    If C were 0, L = 1 would load 0110.

Common mistakes

  • Expecting the register to clear the moment C rises. It clears at the next edge.

  • Putting load on the outside, so a load can override the clear.

  • Assuming it works with the clock stopped. It needs an edge.

Practice Synchronous clear

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

Latches and Flip-Flops lesson full course

Learn it step by step

Synchronous clear is taught in Registers, Latches and Flip-Flops and Counters.