Logic Gate Calculator

Logic Gate Calculator

Simulate basic logic gates and see their outputs

Output is 1 only when both inputs are 1

0
0
0
A · B

Boolean expression

📊 Truth Table Preview

A=0, B=0 → Output=0

A=0, B=1 → Output=0

A=1, B=0 → Output=0

A=1, B=1 → Output=1

💡 How Logic Gates Work

  • • AND: Both inputs must be 1 for output 1
  • • OR: At least one input must be 1 for output 1
  • • NOT: Output is the opposite of input
  • • XOR: Output 1 when inputs are different
  • • NAND: Opposite of AND gate
  • • NOR: Opposite of OR gate

Understanding Digital Logic Gates

Logic gates are the fundamental building blocks of digital circuits and computer systems. These electronic circuits take one or more binary inputs (0 or 1, LOW or HIGH) and produce a single binary output based on a specific logical operation. Understanding logic gates is essential for digital electronics, computer architecture, and circuit design.

Basic Logic Gates and Their Operations

  • AND Gate: Output is HIGH only when all inputs are HIGH. Symbol: A · B
  • OR Gate: Output is HIGH when at least one input is HIGH. Symbol: A + B
  • NOT Gate (Inverter): Output is the inverse of the input. Symbol: A'
  • NAND Gate: Output is LOW only when all inputs are HIGH (AND + NOT). Symbol: (A · B)'
  • NOR Gate: Output is LOW when at least one input is HIGH (OR + NOT). Symbol: (A + B)'
  • XOR Gate (Exclusive OR): Output is HIGH when inputs are different. Symbol: A ⊕ B
  • XNOR Gate (Exclusive NOR): Output is HIGH when inputs are the same. Symbol: A ⊙ B
  • Buffer: Output follows the input (used for signal amplification). Symbol: A

Boolean Algebra and Logic Design

Logic gates implement the operations of Boolean algebra, which uses variables that can have only two values: TRUE (1) or FALSE (0). The relationships between these variables are described using logical operators:

  • Commutative Law: A · B = B · A and A + B = B + A
  • Associative Law: (A · B) · C = A · (B · C) and (A + B) + C = A + (B + C)
  • Distributive Law: A · (B + C) = (A · B) + (A · C)
  • De Morgan's Theorems: (A · B)' = A' + B' and (A + B)' = A' · B'

This calculator provides a comprehensive tool for simulating individual logic gates, generating complete truth tables, building complex circuits, and evaluating boolean expressions. It's invaluable for students learning digital logic, engineers designing circuits, and anyone working with binary systems.

Frequently Asked Questions