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
- Build the single D flip-flop circuit shown below with Q̅ fed back to D.
- Use switches S and R to set PRESET and CLEAR HIGH. Run the simulation and toggle the clock several times.
- 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.
- 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 what you observe
| When | Q | Q̅ |
|---|---|---|
| Initial state | ||
| Pulse 1 | ||
| Pulse 2 | ||
| Pulse 3 |
| When | Q | Q̅ |
|---|---|---|
| Initial state | ||
| Pulse 1 | ||
| Pulse 2 | ||
| Pulse 3 |
| When | Q | Q̅ |
|---|---|---|
| Initial state | ||
| Pulse 1 | ||
| Pulse 2 | ||
| Pulse 3 |
What connection makes a D flip-flop toggle on every active clock edge?
Think about what D must be before the next clock edge if Q is supposed to become the opposite of its current state.
Connect Q̅ back to D. Q̅ is always the opposite of Q, so every clock edge loads the opposite state.
1. Single flip-flop screenshot
Save a screenshot of your Multisim circuit and the observed PRESET or CLEAR behavior.
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
- Build the 2-bit counter using the dual D-type flip-flop in Multisim.
- Use a switch for Clock-In and probes for outputs A and B.
- Keep the asynchronous SET/PRESET and RESET/CLEAR inputs inactive during normal operation.
- Initialize both outputs LOW. One cycle means LOW → HIGH → LOW on Clock-In.
- 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.
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
Counter reset to 00.
00The counter explorer needs JavaScript to pulse or reset. The diagram, procedure, and count sequence remain available above and below.
| Clock-In | Q (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?
Read B A as a two-bit binary number. The counter advances by one each cycle.
11. The sequence is 00 → 01 → 10 → 11 → 00.
2. Two-bit counter screenshot
Save your Multisim counter circuit or a clear screenshot of its output sequence.
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
- Replace the manual switch with a CLOCK_VOLTAGE.
- Set it to 5 V, 50% duty cycle, 60 Hz.
- Connect scope channel 1 to Clock-In, channel 2 to A (first Q), and channel 3 to B (second Q). Keep a common ground.
- 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.
- Measure period with the cursors first, then calculate frequency with
f = 1/T.
| Signal | Period (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.
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?
One toggle stage is a divide-by-two circuit.
100 Hz. Each stage halves frequency and doubles period.
3. Oscilloscope screenshot
Save the Clock-In, A, and B traces you measured in Multisim.
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
| Signal | Period (ms) | Frequency (Hz) |
|---|---|---|
| Clock-In | 1000 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
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
- 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.
- 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.
- 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?
An n-bit counter has 2ⁿ unique states, starting at zero.
A 5-bit counter has 2⁵ = 32 states, numbered 0 through 31.
4. Four-bit counter screenshot
Save your Multisim circuit or its completed 0000–1111 sequence.
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
- Use the 74LS74 datasheet pin diagram to build the four-flip-flop counter on the breadboard using two 74LS74 packages.
- Wire the four counter outputs to Y3, Y2, Y1, Y0 in descending binary order.
- Connect DIO3 to the clock input of the first flip-flop.
- Open the NI ELVISmx Instrument Launcher and select DigOut.
- Set Lines to Write: 0–3, Pattern: Ramp 0–15, and enable continuous running.
- Run the Digital Writer and verify the four outputs count in binary. Faster digital outputs can be explored after the DIO3 version works.
- Have the instructor verify the finished counter.
| Symptom | Check |
|---|---|
| Nothing changes | Check VCC/GND, the clock source, and whether PRE/CLR pins are accidentally asserted. |
| One bit is stuck | Check that stage's D-to-Q̅ feedback and its output/clock wiring. |
| The sequence skips | Check which complementary output drives the next stage and verify the correct clock-edge behavior for your device. |
| It works in Multisim but not on hardware | Re-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.
Review & export
Progress by stage
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.