notesonly.in

One notebook for every subject — open it anywhere.

Log in

Digital Logic Gates and Boolean Algebra Basics For students.

Logic gates are tiny circuits that take binary inputs (0 or 1) and produce a binary output according to a fixed rule. Boolean algebra is the mathematics of these 0s and 1s, invented by George Boole. Together they are the alphabet of all digital electronics: every app, photo, and video on your phone is processed by billions of gates.

This matters because once you can read a truth table and simplify a Boolean expression, you can design circuits that use fewer gates — meaning cheaper, faster, cooler-running hardware. It is also the foundation of programming conditions like if-statements.

Key Concepts

  • AND: output 1 only when ALL inputs are 1. Symbol: · or just AB.
  • OR: output 1 when ANY input is 1. Symbol: + (A + B).
  • NOT: flips the input (1 becomes 0). Symbol: A' or overbar.
  • NAND: AND followed by NOT. NOR: OR followed by NOT. Both are universal gates: any circuit can be built from NAND gates alone.
  • XOR: output 1 when inputs are DIFFERENT. XNOR: output 1 when inputs are the SAME.
  • Truth table: a table listing the output for every input combination. De Morgan's laws: (AB)' = A' + B' and (A + B)' = A' × B'.

Formulas

  • Key identities: A + A' = 1, A × A' = 0, A + 1 = 1, A × 0 = 0, A + A = A, A × A = A. These hold for every Boolean variable.
  • Absorption: A + AB = A and A(A + B) = A. Used to remove redundant terms.
  • Distributive: A(B + C) = AB + AC and A + BC = (A + B)(A + C). The second form has no ordinary-algebra equivalent — learn it as is.
  • XOR: A ⊕ B = A'B + AB'. Useful for adders and parity checkers.

Worked Example

Simplify Y = A'B + AB' + AB and then find Y when A = 1, B = 0. Step by step:

  1. Group the last two terms: AB' + AB = A(B' + B) = A × 1 = A.
  2. Now Y = A'B + A. Apply absorption in reverse: A + A'B = A + B (since A + A'B = (A + A')(A + B) = 1 × (A + B)).
  3. Simplified: Y = A + B, which is just an OR gate — three product terms reduced to one gate.
  4. Check with A = 1, B = 0: original Y = 1'×0 + 1×0' + 1×0 = 0 + 1 + 0 = 1. Simplified Y = 1 + 0 = 1. Both agree.

Common Misconceptions

  • "Boolean + means normal addition." No. In Boolean algebra 1 + 1 = 1, not 2. The + sign means OR, a completely different operation from arithmetic.
  • "NAND is just a fancy AND." It is the opposite: NAND = NOT-AND. Confusing them flips every output in your circuit.

Real-World Applications

  • Processors: ALUs add and compare numbers using XOR and AND gate networks.
  • Error detection: XOR trees compute parity bits in RAM and network packets.
  • Control logic: washing machines, traffic lights, and elevators run on gate-based decision circuits.

Logic gates implement AND, OR, NOT, NAND, NOR, XOR, and XNOR, and Boolean algebra lets you shrink messy expressions into minimal ones using identities like A + AB = A and De Morgan's laws. Practice simplifying by hand and verifying with truth tables, and digital circuit design stops feeling like magic.