This chapter bridges the gap between basic electronics and digital logic. You are learning how physical electronic components (transistors) are wired together to create the 1s and 0s (logic gates) you studied earlier.
Transistors can act as amplifiers or switches. In digital logic, we only care about them acting as switches (On/Off = 1/0).
TTL is an older logic family built using BJTs. You must memorize these standard definitions, as they are guaranteed exam questions.
TTL gates are built using multiple emitter BJTs at the input and a "Totem-Pole" output stage.
CMOS is the modern standard. It uses both p-channel (PMOS) and n-channel (NMOS) MOSFETs.
| Parameter | TTL | CMOS |
|---|---|---|
| Power Consumption | High (Static power draw) | Very Low (Only draws power during switching) |
| Speed | Fast | Slower than TTL (but modern CMOS is incredibly fast) |
| Noise Margin | Lower | Higher (Better immunity to electrical noise) |
| Fan-out | Low (~10) | Very High (Virtually limited only by capacitance, ~50+) |
Every CMOS gate requires a Pull-up Network (PUN) using PMOS, and a Pull-down Network (PDN) using NMOS.
Standard logic has two states: 1 (High) and 0 (Low). Three-state (Tri-state) logic introduces a third state: High-Impedance (High-Z).
If you have four 7-segment displays, controlling them directly requires 28 pins (4 x 7). Multiplexing solves this by tying all the segments (A-G) of the displays together, requiring only 7 data pins plus 4 control pins (to turn on one specific display at a time).
How it works: The microcontroller rapidly flashes each display one by one (e.g., 50 times a second). Human persistence of vision makes it look like all four displays are turned on continuously.
A frequency counter measures the frequency of an unknown input signal. It uses a known time base (a highly accurate oscillator) to open a "gate" for exactly 1 second. While the gate is open, a digital counter counts the number of pulses of the unknown signal. The final count represents the frequency in Hertz ($Hz$).
This is the inverse of the frequency counter. To measure the time width of an unknown pulse, the unknown pulse is used to open the "gate". While the gate is open, the counter counts pulses from a high-frequency, highly accurate internal clock. By knowing the period of the internal clock and the total count, the exact time width of the unknown signal is calculated.