Logic Gates Guide

The Basic Logic Gates

AND: output is 1 only if BOTH inputs are 1. OR: output is 1 if AT LEAST ONE input is 1. NOT: inverts the input (0→1, 1→0). NAND (NOT AND): output is 0 only if BOTH inputs are 1 — inverse of AND. NOR (NOT OR): output is 1 only if BOTH inputs are 0 — inverse of OR. XOR (exclusive OR): output is 1 if inputs are DIFFERENT (one 0 and one 1). XNOR: output is 1 if inputs are SAME (both 0 or both 1) — inverse of XOR. NAND and NOR are 'universal gates' — any logic circuit can be built from NAND gates alo

Boolean Algebra

Logic gates are described by boolean algebra (George Boole, 1854). Key identities: A AND 1 = A. A AND 0 = 0. A OR 0 = A. A OR 1 = 1. A AND A = A. A OR A = A. A AND (NOT A) = 0. A OR (NOT A) = 1. De Morgan's laws: NOT (A AND B) = (NOT A) OR (NOT B). NOT (A OR B) = (NOT A) AND (NOT B). These laws are used to simplify complex circuits. Simplification reduces the number of gates needed, reducing cost, power consumption, and signal delay in integrated circuits.

Logic Gates in Computers

Every computation in a CPU is performed by combinations of logic gates. Adder circuit: a half adder (1-bit addition) uses XOR (for the sum bit) and AND (for the carry bit). Full adder: two half adders combined. A 64-bit adder requires 64 full adders. Flip-flops: made from NAND or NOR gates in a feedback configuration. Store 1 bit of memory — the building block of RAM and registers. Modern CPUs contain billions of transistors implementing these gates. Each transistor switches between 0 and 1 by h

Logic Gates in Everyday Electronics

Alarm systems: an AND gate — alarm triggers only if sensor is triggered AND system is armed. Traffic lights: complex combinational logic controls sequencing. Lifts: OR gates detect any floor button press. Priority circuits: NAND gates create interrupt priority systems in microcontrollers. Parental controls: AND gate — signal passes only if content rating allows AND parental control permits. Security keypads: multi-input AND gates — all digits of the correct code must be entered (each digit check

Logic Gate & Truth Table Calculator

Results update automatically as you type

Enter values above to calculate