Skip to lesson content

Ohm Digital Electronics

1.2.4Unit 1 · Sequential Logic

Introduction to Sequential Logic: Counters

Follow the PLTW 1.2.4 activity sequence: review one D flip-flop in Multisim, build and trace a 2-bit counter, measure divide-by-two behavior, analyze a 4-bit counter, then build and verify it on hardware.

Equipment Multisim 2 × 74LS74 ICs #22 solid wire Breadboard / DMS hardware
Activity reference ↓
Activity map
  1. Review a Single D Flip-Flop in Multisim
  2. Build and Trace the 2-Bit Counter
  3. Measure Clock-In, A, and B
  4. Analyze and Run the 4-Bit Counter
  5. Build and Verify the Hardware Counter
Loading saved work… Work stays in this browser. Clearing browser data can remove it. Use your teacher’s assigned classroom system for submission.

Review a Single D Flip-Flop in Multisim

Begin where the PLTW activity begins: build the single 74LS74 circuit in Multisim and test normal clocking, PRESET, and CLEAR before moving on to counters.

Your task

Do this 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.

Record your flip-flop observations

Fill in each table before opening the expected-behavior reference below.

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

Single flip-flop screenshot

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

Paste an image here, drop it here, or choose a file. One image is saved for this step.

D flip-flop rule

On each active clock edge, Q takes the value at D. Q̅ is the opposite of Q. Connect Q̅ to D, and Q alternates 0 → 1 → 0 on successive clock edges.

74LS74D D flip-flop toggle circuit with PRESET, CLEAR, clock, Q, and NOT_Q probes
Connecting Q̅ back to D makes the stored bit toggle on each active clock edge.

Active-LOW SET and RESET

The asynchronous SET/PRESET and RESET/CLEAR pins override the normal D/clock behavior. Keep both inactive at logic HIGH during normal counting.

Check the expected PRESET / CLEAR behavior after you test it
PRESETCLEARExpected behavior
HIGHHIGHNormal clocked operation
LOWHIGHQ forced HIGH; Q̅ LOW
HIGHLOWQ forced LOW; Q̅ HIGH

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

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.

Two-bit ripple counter using D flip-flops Clock-In FLIP-FLOP A CLK D Q = A Q̅ FLIP-FLOP B CLK D Q = B Q̅ A̅ clocks B Read the binary value as B A: B is the 2s bit, A is the 1s bit.
A̅ clocks stage B. Read the outputs as B A so B is the 2s bit and A is the 1s bit.

2-Bit Counter Explorer

Use the pulses to rehearse the same A/B sequence you record from your Multisim circuit.

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.

Record the 2-bit count in your activity document
Clock-InAB
Initial values
Cycle 1
Cycle 2
Cycle 3
Cycle 4
Cycle 5
Cycle 6
Cycle 7
Cycle 8
Cycle 9

2-bit counter screenshot

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

Paste an image here, drop it here, or choose a file. One image is saved for this step.

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.

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

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.

CLK A B time → Clock-In A B
Use the waveform spacing as a visual guide, but measure period in Multisim before calculating each frequency.

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. Display Clock-In, A, and B on the oscilloscope.
  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
SignalPeriodFrequency
Clock-In
B
A

Oscilloscope screenshot

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

Paste an image here, drop it here, or choose a file. One image is saved for this step.

Check the ideal divide-by-two relationship after measuring

With a 60 Hz input, the ideal frequencies are 30 Hz at the first divide-by-two stage and 15 Hz at the next; their periods double correspondingly.

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?

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.

4-Bit Binary Counter

Use this only as a visual check after you analyze the 1 kHz counter and run the PLTW Multisim version.

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 binary reference remain available.

Analyze, then simulate

Analyze the 1000 Hz counter before simulating it

Start with a 1000 Hz Clock-In. Each stage halves the frequency and doubles the period.

SignalPeriodFrequency
Clock-In1000 Hz
D
C
B
A
Check the ideal values after completing the table

For an ideal 1 kHz input: A = 500 Hz, B = 250 Hz, C = 125 Hz, and D = 62.5 Hz; the period doubles at each stage.

4-bit counter screenshot

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

Paste an image here, drop it here, or choose a file. One image is saved for this step.

Binary count reference: 0 through 15
0 = 00004 = 01008 = 100012 = 1100 1 = 00015 = 01019 = 100113 = 1101 2 = 00106 = 011010 = 101014 = 1110 3 = 00117 = 011111 = 101115 = 1111

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

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 PLTW 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.

Required evidence

Insert a clear image of your completed breadboarded counter into the response document assigned by your teacher. The photo should make the IC orientation, clock connection, and four output connections visible.

Completed breadboard photo

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

Paste an image here, drop it here, or choose a file. One image is saved for this step.

Conclusion

  1. Explain why these 2-bit and 4-bit circuits are called divide-by-two counters. Connect the physical order of the flip-flops to binary place value.
  2. If a fifth bit were added, what would be the highest number the counter could represent? Explain how you know.
  3. Identify 3–5 everyday products that could contain a counter and state what each one might count.

Why does stage B represent a higher binary place value than stage A?

Stage B changes half as often as A. A completes the 1s-place pattern first; B advances only after A completes its two-state cycle, so B represents the 2s place.

Activity reference

Learning objectives

  1. Explain how a D flip-flop stores one bit and becomes a toggle stage when D is connected to Q̅.
  2. Trace a 2-bit ripple counter through its binary state sequence.
  3. Determine the frequency and period of each stage in a divide-by-two counter.
  4. 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.