Cover of Code by Charles Petzold - Business and Economics Book

From "Code"

Author: Charles Petzold
Publisher: Microsoft Press
Year: 2000
Category: Computers

🎧 Free Preview Complete

You've listened to your free 10-minute preview.
Sign up free to continue listening to the full summary.

🎧 Listen to Summary

Free 10-min Preview
0:00
Speed:
10:00 free remaining
Chapter 14: Feedback and Flip-Flops
Key Insight 3 from this chapter

Edge-Triggered Flip-Flops, Frequency Dividers, and Binary Counters

Key Insight

Flip-flops can be either level-triggered or edge-triggered. A level-triggered flip-flop's output changes when its Clock input is at a certain level (e.g., 1), reflecting any changes in its Data input while the Clock is active. In contrast, an edge-triggered flip-flop responds only at the precise moment of a Clock signal transition, such as from 0 to 1 (a 'positive transition'). This design ensures that the Data input influences the output only at that specific instant, ignoring Data changes during the stable high or low phases of the Clock signal.

An edge-triggered D-type flip-flop can act as a frequency divider. By connecting an oscillator to its Clock input and feeding its Q bar output back to its D input, the Q output toggles its state (from 0 to 1 or 1 to 0) with every positive transition of the Clock. This effectively halves the input frequency; for example, if the oscillator operates at 20 Hz, the flip-flop's Q output will have a frequency of 10 Hz. This feedback mechanism causes the flip-flop to divide the incoming clock signal's frequency by two.

Cascading multiple edge-triggered flip-flops, where the output of one serves as the Clock input for the next, creates a binary counter. The collective outputs of such a chain represent increasing binary numbers (e.g., a four-flip-flop chain counts from 0000 to 1111). This 'ripple counter' increments by 1 with each positive transition of its primary Clock input. Counters are practical for measuring oscillator frequencies: an 8-bit counter connected to an oscillator's Clock input can be used by timing how long it takes for the counter to complete 256 cycles (e.g., 256 cycles in 10 seconds indicates an oscillator frequency of 25.6 Hz). Some advanced flip-flops also incorporate 'Preset' and 'Clear' inputs, allowing direct setting of Q to 1 or 0, overriding other inputs.

📚 Continue Your Learning Journey — No Payment Required

Access the complete Code summary with audio narration, key takeaways, and actionable insights from Charles Petzold.