4-bit shift register: build and simulate it online

Four D flip-flops in a chain: each clock moves every bit one place along.

Build the 4-bit shift register in the free online simulator — it checks your circuit automatically.

What you need

  • 2 logic switches labelled DIN, CLK
  • 4 probes labelled Q0, Q1, Q2, Q3
  • 4 D flip-flops

Step by step

  1. Inputs and outputs. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Switches DIN, CLK; Probes Q0, Q1, Q2, Q3
  2. Four D flip-flops. All share CLK; DIN → D of the first; each Q → D of the next.
  3. Prove it. Shift in 1, 0, 1, 1 and watch it march along.

Expected sequence

#inputsclockQ0Q1Q2Q3
1DIN=1↑1000
2DIN=0↑0100
3DIN=1↑1010
4DIN=1↑1101

Frequently asked questions

How do you build a 4-bit shift register?

Four D flip-flops in a chain: each clock moves every bit one place along. In short: inputs and outputs, then four d flip-flops, then prove it.

How does a 4-bit shift register behave clock by clock?

It is checked over 4 steps: DIN=1, DIN=0, DIN=1, DIN=1. The table on this page shows the expected Q0, Q1, Q2, Q3 after each clock.

What parts do you need for a 4-bit shift register?

4 D flip-flops — plus logic switches for the inputs and probes for the outputs.

Can I simulate a 4-bit shift register online for free?

Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every clock cycle is simulated and marked for you. No download or sign-up needed.

Part of DSD 34 · Shift registers in the free BitForBytes digital system design course.

More counters & registers builds