Skip to lesson content

Digital Electronics · Activity 1.2.4

Sequential Logic: Counters

Build and test flip-flop counters in Multisim, measure their frequencies, and verify your circuit on hardware.

Equipment Multisim · 2 × 74LS74 ICs · #22 wire · Breadboard / DMS hardware

Keep a copy of your work. Your answers may be saved on this device, but they are not guaranteed to remain if you leave this page, restart your computer, or switch devices. When finished, download and print your completion PDF as evidence of your work.

Review a Single D Flip-Flop in Multisim

Build the circuit in Multisim

  1. Build the single D flip-flop circuit shown below with Q̅ fed back to D.
  2. Use switches S and R to set PRESET and CLEAR HIGH. Run the simulation and toggle the clock several times.
  3. Use switch S to set PRESET LOW and switch R to set CLEAR HIGH. Record the initial state of Q and Q̅, then toggle the clock several times and record what changes.
  4. Use switch S to return PRESET HIGH and switch R to set CLEAR LOW. Record the initial state of Q and Q̅, then toggle the clock several times and record what changes.
74LS74D D flip-flop toggle circuit with PRESET, CLEAR, clock, Q, and NOT_Q probes

Record what you observe

Normal clocking · S HIGH, R HIGH
WhenQQ̅
Initial state
Pulse 1
Pulse 2
Pulse 3
PRESET active · S LOW, R HIGH
WhenQQ̅
Initial state
Pulse 1
Pulse 2
Pulse 3
CLEAR active · S HIGH, R LOW
WhenQQ̅
Initial state
Pulse 1
Pulse 2
Pulse 3

What connection makes a D flip-flop toggle on every active clock edge?

1. Single flip-flop screenshot

Save a screenshot of your Multisim circuit and the observed PRESET or CLEAR behavior.

Take a screenshot of your work andCtrl + Voror drop a file here

Build and Trace the 2-Bit Counter

Cascade two toggle stages and you get a binary counter. Stage A changes every clock cycle; stage B changes half as often.

Multisim task

  1. Build the 2-bit counter using the dual D-type flip-flop in Multisim.
  2. Use a switch for Clock-In and probes for outputs A and B.
  3. Keep the asynchronous SET/PRESET and RESET/CLEAR inputs inactive during normal operation.
  4. Initialize both outputs LOW. One cycle means LOW → HIGH → LOW on Clock-In.
  5. Record A and B after each cycle and explain the pattern you observe.

A is the least-significant bit. To read the number normally, write the state as B A.

Corrected Multisim two-bit ripple counter with two 74LS74D flip-flops, Q-bar clock cascade and labeled Q outputs.

2-Bit Counter Explorer

Optional rehearsal model. Record observations from your own Multisim circuit in the table; this explorer never fills your answers.

Clock cycles
0
Binary state (B A)
00
Decimal
0
B02s bit
A01s bit

Counter reset to 00.

States you have observed:
00

The counter explorer needs JavaScript to pulse or reset. The diagram, procedure, and count sequence remain available above and below.

Clock-InQ (A · 1s)Q (B · 2s)
Initial values
Cycle 1
Cycle 2
Cycle 3
Cycle 4
Cycle 5
Cycle 6
Cycle 7
Cycle 8
Cycle 9

The current 2-bit state is B A = 10. What state should come after one more complete clock cycle?

2. Two-bit counter screenshot

Save your Multisim counter circuit or a clear screenshot of its output sequence.

Take a screenshot of your work andCtrl + Voror drop a file here

Measure Clock-In, A, and B

A ripple counter is also a frequency divider. Every flip-flop stage toggles once for every two cycles of the signal driving it.

Oscilloscope setup from the activity

  1. Replace the manual switch with a CLOCK_VOLTAGE.
  2. Set it to 5 V, 50% duty cycle, 60 Hz.
  3. Connect scope channel 1 to Clock-In, channel 2 to A (first Q), and channel 3 to B (second Q). Keep a common ground.
  4. Set the oscilloscope time-base to 20 ms/div and each channel vertical scale to 10 V/div. Adjust Y positions so all three traces are visible.
  5. Measure period with the cursors first, then calculate frequency with f = 1/T.
Measure first, then calculate frequency
SignalPeriod (ms)Frequency (Hz)
Clock-In
B
A

Multisim circuit and oscilloscope setup

Use this circuit as a reference while connecting the counter to the oscilloscope.

Multisim frequency-divider circuit with a 60 Hz clock, two 74LS74D flip-flops, and oscilloscope connections to the clock and both Q outputs

Why every stage divides frequency by two

A toggle flip-flop changes state on each active edge, so it needs two input events to return to the same state. That makes one full output period take two periods of the signal driving that stage.

If a toggle stage is driven by 200 Hz, what frequency appears at its Q output?

3. Oscilloscope screenshot

Save the Clock-In, A, and B traces you measured in Multisim.

Take a screenshot of your work andCtrl + Voror drop a file here

Analyze and Run the 4-Bit Counter

Four toggle stages create sixteen unique states: 0000 through 1111. The same divide-by-two rule lets you predict every output frequency before you ever run the simulation.

Analyze, then simulate

Analyze the 1000 Hz counter before simulating it

Predict period and frequency from a 1000 Hz clock
SignalPeriod (ms)Frequency (Hz)
Clock-In1000 Hz
D
C
B
A

4-Bit Binary Counter

Use this explorer to check the binary count. The 1 kHz table above is for calculations; use about 2 Hz for your Multisim simulation.

Clock cycles
0
Binary state (D C B A)
0000
Decimal
0
D08s bit
C04s bit
B02s bit
A01s bit

Counter reset to 0000.

The counter explorer needs JavaScript to pulse or reset. The frequency table and authored instructions remain available.

Build and test in Multisim

  1. Extend the two-bit circuit to four toggle stages using two 74LS74 packages. Feed each Q̅ back to its D and to the next stage’s clock.
  2. Keep PRESET and CLEAR HIGH, initialize all Q outputs LOW, and set the 5 V clock to approximately 2 Hz so you can watch each output change.
  3. Measure A, B, C, and D and compare with your predictions. Read the count as D C B A.

What is the highest unsigned value a 5-bit counter can represent?

4. Four-bit counter screenshot

Save your Multisim circuit or its completed 0000–1111 sequence.

Take a screenshot of your work andCtrl + Voror drop a file here

Build and Verify the Hardware Counter

The simulation proves the logic. The breadboard proves that you can translate the logic into real pin-level wiring and troubleshoot the result.

Build the 4-bit counter

  1. Use the 74LS74 datasheet pin diagram to build the four-flip-flop counter on the breadboard using two 74LS74 packages.
  2. Wire the four counter outputs to Y3, Y2, Y1, Y0 in descending binary order.
  3. Connect DIO3 to the clock input of the first flip-flop.
  4. Open the NI ELVISmx Instrument Launcher and select DigOut.
  5. Set Lines to Write: 0–3, Pattern: Ramp 0–15, and enable continuous running.
  6. Run the Digital Writer and verify the four outputs count in binary. Faster digital outputs can be explored after the DIO3 version works.
  7. Have the instructor verify the finished counter.
Troubleshooting guide
SymptomCheck
Nothing changesCheck VCC/GND, the clock source, and whether PRE/CLR pins are accidentally asserted.
One bit is stuckCheck that stage's D-to-Q̅ feedback and its output/clock wiring.
The sequence skipsCheck which complementary output drives the next stage and verify the correct clock-edge behavior for your device.
It works in Multisim but not on hardwareRe-check the actual datasheet pin numbers instead of copying symbolic pin positions from the simulator.

Conclusion questions

Answer each question using your observations from Multisim and the breadboard.

Required evidence

5. Completed breadboard photo

Save a clear image that shows IC orientation, the clock connection, and all four output connections.

Take a screenshot of your work andCtrl + Voror drop a file here

Review & export

Activity reference

Learning objectives

  • Explain how a D flip-flop stores one bit and becomes a toggle stage when D is connected to Q̅.
  • Trace a 2-bit ripple counter through its binary state sequence.
  • Determine the frequency and period of each stage in a divide-by-two counter.
  • Build and troubleshoot a 4-bit counter using dual D-type flip-flop ICs.

Vocabulary

Sequential Logic
Logic whose output depends on the present inputs and on stored past state.
D Flip-Flop
A one-bit memory element that copies D to Q on its active clock edge.
Ripple Counter
A counter where each flip-flop stage is clocked by the preceding stage rather than by one common clock.
Frequency Divider
A circuit whose output frequency is a fraction of its input frequency. Each toggle stage divides by two.
Active LOW
An input that performs its function when held at logic 0. A bar over a signal name indicates active LOW.