A logic gate is not just an abstract mathematical concept; it is a physical network of transistors with specific voltage thresholds, propagation delays, and current limits. While textbooks teach logic gates and truth tables using ideal 1s and 0s, bench work requires you to select the right integrated circuit (IC) family to match your microcontroller’s I/O voltage and your system's noise environment. This reference guide bridges the gap between Boolean theory and physical component selection, providing exact part numbers, voltage thresholds, and derating rules.
The Master Reference: Logic Gates, Truth Tables, and IC Part Numbers
The table below maps the fundamental Boolean operations to their standard truth tables and provides concrete, purchasable IC part numbers across the two most common voltage domains: 5V/3.3V (HC/LVC families) and 12V (4000B series).
| Gate Type | Symbol (IEEE/IEC) | Truth Table (Inputs → Output) | Standard 5V/3.3V Part | Standard 12V Part |
|---|---|---|---|---|
| AND | & / DCC | 0,0→0 | 0,1→0 | 1,0→0 | 1,1→1 | SN74HC08 / SN74LVC08 | CD4081BE |
| OR | ≥1 / OR | 0,0→0 | 0,1→1 | 1,0→1 | 1,1→1 | SN74HC32 / SN74LVC32 | CD4071BE |
| NOT (Inverter) | 1 / NOT | 0→1 | 1→0 | SN74HC04 / SN74LVC04 | CD4069UBE |
| NAND | &+o / NAND | 0,0→1 | 0,1→1 | 1,0→1 | 1,1→0 | SN74HC00 / SN74LVC00 | CD4011BE |
| NOR | ≥1+o / NOR | 0,0→1 | 0,1→0 | 1,0→0 | 1,1→0 | SN74HC02 / SN74LVC02 | CD4001BE |
| XOR | =1 / XOR | 0,0→0 | 0,1→1 | 1,0→1 | 1,1→0 | SN74HC86 / SN74LVC86 | CD4030BE |
Logic Family Specifications and Derating Rules
Knowing the gate type is only half the battle; you must select the correct semiconductor family. The Texas Instruments Logic Family Guide and the IEEE Std 91/91A standard define how these ICs behave electrically. The table below details the critical electrical characteristics for the four most common logic families used by hobbyists and engineers.
| Logic Family | VCC Range | VIL (Max Low) | VIH (Min High) | tpd (Typ Delay) | Max IOL (Sink) |
|---|---|---|---|---|---|
| 74LS (TTL) | 4.5V – 5.5V | 0.8V | 2.0V | 9 ns | 8 mA |
| 74HC (CMOS) | 2.0V – 6.0V | 0.3 × VCC | 0.7 × VCC | 8 ns (at 5V) | 4 mA (at 4.5V) |
| 74LVC (Low-V CMOS) | 1.2V – 3.6V | 0.3 × VCC | 0.7 × VCC | 4 ns (at 3.3V) | 24 mA (at 3.0V) |
| 74AHCT (TTL-CMOS) | 4.5V – 5.5V | 0.8V | 2.0V | 6 ns | 8 mA |
| CD4000B (Std CMOS) | 3.0V – 15.0V | 0.3 × VCC | 0.7 × VCC | 50 ns (at 10V) | 0.5 mA (at 5V) |
Which Column Applies to Your Installation?
If you are interfacing with a 3.3V microcontroller (like an ESP32 or Raspberry Pi Pico), the VIL and VIH columns are your most critical constraints. A 74HC family chip powered at 3.3V requires a minimum of 2.31V (0.7 × 3.3V) to register a Logic High. Since a 3.3V MCU outputs ~3.2V, it barely meets this threshold, leaving zero noise margin. In this scenario, you must look at the 74LVC family, which guarantees reliable switching at lower voltages, or use a 74HCT family powered at 5V (which accepts 2.0V as a Logic High, easily driven by a 3.3V pin).
How Derating Modifies the Base Value
Datasheet values for propagation delay ($t_{pd}$) and output current ($I_{OL}$) are typically measured at 25°C and nominal $V_{CC}$. In practice, these values derate significantly under stress. For example, a 74HC00 NAND gate has a typical $t_{pd}$ of 8ns at 5V and 25°C. However, if your $V_{CC}$ sags to 3.0V and the ambient temperature rises to 85°C (common in enclosed automotive or solar inverter housings), the $t_{pd}$ derates to over 25ns, and the guaranteed output sink current ($I_{OL}$) drops by roughly 30%. If you are driving high-capacitance loads (like long ribbon cables or multiple gate inputs), this derating will cause signal edge degradation and potential timing violations in high-speed clock circuits.
Decision Path: Choosing the Right Logic IC Family
Use this decision tree to terminate your selection process with a concrete part number. Do not mix families on the same data bus without verifying voltage compatibility.
| System Condition | If True... | Concrete Pick (Part Number) |
|---|---|---|
| MCU is 3.3V, Load is 3.3V | Need high drive current and low voltage operation. | SN74LVC1G08 (Single AND gate, 3.3V native) |
| MCU is 3.3V, Load requires 5V logic | Need 5V output but must accept 3.3V input as a valid "High". | SN74AHCT125 (Quad buffer, 5V VCC, TTL-compatible inputs) |
| System runs on 12V (Automotive/Industrial) | Need wide VCC tolerance; speed is secondary (<100kHz). | CD4011BE (Quad NAND, operates up to 15V) |
| Battery-powered wearable (1.8V to 3.0V) | Need ultra-low voltage and minimal quiescent current. | SN74AUC08 (Operates down to 0.8V, ultra-low power) |
| Legacy 5V TTL replacement | Need exact pinout and threshold match for old 74LS boards. | SN74HCT00 (Drop-in replacement with CMOS power savings) |
What the Truth Table Cannot Tell You
Truth tables assume ideal binary states. Physical silicon introduces edge cases that will destroy your circuit or cause phantom current draw if ignored.
- Floating Inputs: A truth table does not show what happens when an input is left unconnected. In CMOS families (74HC, CD4000B), a floating input acts as an antenna, picking up electromagnetic noise. This causes the internal push-pull output transistors to rapidly toggle, resulting in massive $I_{DD}$ current spikes that can overheat and destroy the IC. Rule: Never leave a CMOS input floating. Tie unused inputs to VCC or GND via a 10kΩ resistor.
- Analog Noise Margins: The transition between Logic 0 and Logic 1 is not instantaneous. The undefined region between $V_{IL}$ and $V_{IH}$ is the noise margin. If your signal spends too much time in this linear region (due to slow rise times from long wires or high capacitance), the gate will oscillate.
- Bus Contention: Truth tables assume one driver per input. If you wire two standard push-pull logic outputs together (e.g., tying the output of a 74HC08 AND gate directly to a 74HC32 OR gate output), and one drives High while the other drives Low, you create a dead short through the silicon. This results in "bus contention," melting the internal bond wires. Use open-drain (e.g., 74HC03) or tri-state (e.g., 74HC125) buffers for shared buses.
Wiring and Interfacing Rules for Mixed-Voltage Logic
When bridging different logic families, the physical wiring topology is just as critical as the Boolean math. If you are driving a 5V 74HC input from a 3.3V ESP32 GPIO, the 3.3V output falls short of the 74HC's 3.5V $V_{IH}$ threshold (0.7 × 5V). The gate will read the signal as an undefined state, leading to erratic outputs.
The Fix: Do not use a simple resistor voltage divider to step up logic levels; it ruins edge transition times. Instead, use a dedicated level-shifter IC like the TXB0108 or 74LVC8T245, or power the receiving logic gate with a 74HCT family IC, which is specifically designed with TTL-compatible input thresholds ($V_{IH}$ = 2.0V) while running on a 5V rail.
Finally, always place a 100nF (0.1µF) ceramic bypass capacitor as close to the VCC and GND pins of the logic IC as physically possible. Logic gates draw high-frequency current spikes during state transitions; without local decoupling capacitance, these spikes will bounce across your power rails, injecting noise into sensitive analog sensors or causing microcontroller brownouts.






