Logic Gates & Digital Circuits
Boolean operations AND, OR, NOT, XOR. Aligned with Logic Gates simulator.
Logic Gates & Digital Circuits
Logic Gates & Digital Circuits
What you'll learn
- Review basic logic gates (AND, OR, NOT, NAND, NOR, XOR).
- Apply Boolean algebra laws and theorems.
- Simplify Boolean expressions using De Morgan's theorems.
- Build simple combinational circuits (half adder, full adder).
Key concepts
Boolean Algebra Laws
| Law | OR form | AND form |
|---|---|---|
| Identity | A + 0 = A | A · 1 = A |
| Null | A + 1 = 1 | A · 0 = 0 |
| Idempotent | A + A = A | A · A = A |
| Complement | A + A' = 1 | A · A' = 0 |
| Double Negation | (A')' = A | — |
| Commutative | A + B = B + A | A · B = B · A |
| Associative | A+(B+C) = (A+B)+C | A(BC) = (AB)C |
| Distributive | A(B+C) = AB + AC | A+BC = (A+B)(A+C) |
| Absorption | A + AB = A | A(A+B) = A |
De Morgan's Theorems
(A · B)' = A' + B' (A + B)' = A' · B'
"Break the bar, change the sign."
Example: Simplify (A + B)'
- By De Morgan: A' · B' → NOR gate output
Gate Symbols & Expressions
| Gate | Expression | Truth (2-input) |
|---|---|---|
| AND | Y = A·B | 1 only when both 1 |
| OR | Y = A+B | 0 only when both 0 |
| NOT | Y = A' | Inverts |
| NAND | Y = (A·B)' | 0 only when both 1 |
| NOR | Y = (A+B)' | 1 only when both 0 |
| XOR | Y = A⊕B | 1 when inputs differ |
| XNOR | Y = (A⊕B)' | 1 when inputs same |
Universal Gates
NAND and NOR are universal — any Boolean function can be built using only NAND (or only NOR) gates.
Building NOT from NAND: Connect both inputs of a NAND → output = (A·A)' = A'
Half Adder
Adds two 1-bit numbers:
| A | B | Sum (S) | Carry (C) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
- S = A ⊕ B (XOR gate)
- C = A · B (AND gate)
Full Adder
Adds three 1-bit numbers (A, B, Carry-in):
- S = A ⊕ B ⊕ Cin
- Cout = (A·B) + (B·Cin) + (A·Cin)
Chain full adders for multi-bit addition (ripple carry adder).
Simplification Example
Simplify: Y = A'B + AB' + AB
Step 1: Y = A'B + A(B' + B) Step 2: Y = A'B + A·1 Step 3: Y = A'B + A Step 4: Y = (A + A')(A + B) — using absorption Step 5: Y = A + B ← simplified
Combinational vs Sequential Circuits
| Type | Output depends on | Memory | Example |
|---|---|---|---|
| Combinational | Current inputs only | No | Adder, MUX, decoder |
| Sequential | Inputs + past state | Yes (flip-flops) | Counter, register |
Quick check
- State De Morgan's first theorem and verify with a truth table for A=1, B=0.
- Draw the circuit for a half adder and write its Boolean expressions.
- Simplify: Y = AB + AB' + A'B.
- Why is NAND called a universal gate?
- What is the difference between combinational and sequential circuits?
Open the Practice tab for graded questions on Logic Gates & Digital Circuits.
Key Takeaways (TL;DR)
- What you'll learn
- Key concepts
- Quick check
Master this topic with Drishti OS
Get unlimited mock tests, AI-powered mentorship, and complete video courses when you join.
Start Free Practice