Skip to content
BetterDL

Clock enable

Also called: enable flip-flop, enabled flip-flop

An input that lets a flip-flop load new data only when enabled, done with a mux in front of D while the clock stays untouched.

Often you want a register to load new data on some clock cycles and hold its value on others. A clock enable does this the safe way:

  • the clock goes straight to the flip-flop, untouched;
  • a 2-to-1 multiplexer in front of D chooses the next value.

With enable E, new data N and current output Q:

D =

When E = 1, D = N and the flip-flop loads. When E = 0, D = Q and the flip-flop reloads its own value, so it appears to hold.

It's the same idea as a register's load enable. The name "clock enable" is common in FPGA flip-flops, which often have a CE pin built in.

Why not just gate the clock? A gated clock lets glitches on the enable become false clock edges and adds clock skew. The mux version keeps every flip-flop on the same clean clock, so synchronous design timing checks still apply.

D
0000
0011
0100
0111
1000
1010
1101
1111

Worked example

Example

Tracing an enabled register bit

A flip-flop with a clock enable starts with Q = 0. At four rising edges, (E, N) = (1, 1), (0, 0), (0, 1), (1, 0).

  1. 1.

    Edge 1: E = 1, so D = N = 1. Q becomes 1.

  2. 2.

    Edge 2: E = 0, so D = Q = 1. Q stays 1, even though N = 0.

  3. 3.

    Edge 3: E = 0, so D = Q = 1. Q stays 1.

  4. 4.

    Edge 4: E = 1, so D = N = 0. Q becomes 0.

Common mistakes

  • Building it by ANDing the enable with the clock. That's a gated clock.

  • Thinking the flip-flop stops being clocked when disabled. It's clocked every edge; it just reloads Q.

Practice Clock enable

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

Learn it step by step

Clock enable is taught in Timing and Sequential Logic and Registers.