DE Notes
Comprehensive introduction to logic gates in digital electronics covering basic gates, their symbols, truth tables, Boolean expressions, and how they form the foundation of all digital systems.
Logic gates are the fundamental building blocks of all digital circuits. Every processor, memory chip, and digital system is constructed from combinations of these basic gates. Understanding logic gates is the first step toward designing any digital system.
What is a Logic Gate?
A logic gate is an electronic circuit that performs a logical operation on one or more binary inputs and produces a single binary output. The relationship between inputs and output follows strict Boolean algebra rules.
Key Properties of Logic Gates
- Binary operation: Inputs and outputs are only 0 (LOW, typically 0V) or 1 (HIGH, typically 3.3V or 5V)
- Deterministic: Same inputs always produce the same output
- No memory: Output depends only on current inputs (combinational, not sequential)
- Voltage-based: Logic levels defined by voltage thresholds
Gate Symbols (IEEE/ANSI Standard)
Quick Truth Table Summary
| A | B | AND | OR | NAND | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Physical Implementation
Logic gates are implemented using transistors:
- TTL (Transistor-Transistor Logic): Uses BJTs
- CMOS (Complementary Metal-Oxide Semiconductor): Uses MOSFETs
- ECL (Emitter-Coupled Logic): Fastest, uses BJTs without saturation
Gate IC Packages
| IC Number | Gate Type | Gates per IC | Family |
|---|---|---|---|
| 7408 | AND (2-input) | 4 | TTL |
| 7432 | OR (2-input) | 4 | TTL |
| 7404 | NOT (inverter) | 6 | TTL |
| 7400 | NAND (2-input) | 4 | TTL |
| 7402 | NOR (2-input) | 4 | TTL |
| 7486 | XOR (2-input) | 4 | TTL |
| 4011 | NAND (2-input) | 4 | CMOS |
Gate Characteristics
Propagation Delay
Time between input change and output change. Typically 5-20 ns for TTL, 1-10 ns for modern CMOS.
Fan-in
Number of inputs a gate can accept. Standard: 2-8 inputs.
Fan-out
Number of gate inputs a single output can drive. TTL: ~10, CMOS: ~50.
Power Dissipation
Static and dynamic power consumed by the gate.
Multi-Input Gates
Gates can have more than 2 inputs:
For XOR with 3+ inputs: output is 1 when ODD number of inputs are 1.
Positive vs Negative Logic
| Positive Logic | Negative Logic | |
|---|---|---|
| HIGH voltage | Logic 1 | Logic 0 |
| LOW voltage | Logic 0 | Logic 1 |
| AND gate in positive | AND function | OR function |
| OR gate in positive | OR function | AND function |
A positive-logic AND gate becomes a negative-logic OR gate!
Applications of Logic Gates
| Application | Gates Used |
|---|---|
| Arithmetic (adders) | XOR, AND, OR |
| Data selection (MUX) | AND, OR, NOT |
| Memory (flip-flops) | NAND, NOR |
| Comparators | XOR, AND |
| Encoders/Decoders | AND, OR, NOT |
| Parity generators | XOR |
| Control logic | All types |
Timing Considerations
| Input A | ─────┐ ┌───────────── |
| Output Y | ─────────┐ ┌───────── |
| with B=1 | └─────┘ |
Summary
| Gate | Symbol | Expression | Output = 1 when... |
|---|---|---|---|
| AND | D shape | Y = AB | All inputs = 1 |
| OR | Curved | Y = A+B | Any input = 1 |
| NOT | Triangle+bubble | Y = A\' | Input = 0 |
| NAND | D shape+bubble | Y = (AB)\' | Any input = 0 |
| NOR | Curved+bubble | Y = (A+B)\' | All inputs = 0 |
| XOR | Double curve | Y = A⊕B | Inputs differ |
| XNOR | Double curve+bubble | Y = A⊙B | Inputs same |
Interview Questions
Q1: Why are NAND and NOR gates called universal gates?
Because any Boolean function can be implemented using ONLY NAND gates or ONLY NOR gates. You can create AND, OR, and NOT (the complete set) using just NAND or just NOR. This is important for manufacturing since fabricating one gate type is cheaper.
Q2: What is the difference between a buffer and a NOT gate?
A buffer (Y=A) passes the signal unchanged but provides signal regeneration and isolation. A NOT gate (Y=A\') inverts the signal. Both have one input and one output, but a buffer has no bubble while NOT has a bubble on the output.
Q3: How many transistors are needed for a 2-input CMOS NAND gate?
4 transistors: 2 PMOS in parallel (pull-up network) and 2 NMOS in series (pull-down network). For CMOS NOR: 2 PMOS in series and 2 NMOS in parallel.
Q4: What happens when you connect the output of a gate to its own input?
For NOT (inverter): it creates an unstable oscillation (ring oscillator). For NAND/NOR with tied inputs: acts as an inverter. Feedback in gates is the basis for latches and flip-flops in sequential circuits.
Q5: Why is XOR important in arithmetic circuits?
XOR gives the sum bit in binary addition (0⊕0=0, 0⊕1=1, 1⊕0=1, 1⊕1=0 — same as addition without carry). Combined with AND (which gives the carry), XOR forms the basis of half adders and full adders.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Introduction to Logic Gates – Building Blocks of Digital Circuits.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, logic, gates, introduction, introduction to logic gates – building blocks of digital circuits
Related Digital Electronics Topics