Logic Gate & Boolean Algebra Calculator
TRUE (1)
FALSE (0)
TRUE (1)
FALSE (0)
AND (A ∧ B)
OR (A ∨ B)
NOT A (¬A)
XOR (A ⊕ B)
NAND (¬(A ∧ B))
NOR (¬(A ∨ B))
XNOR (¬(A ⊕ B))
Resulting State:
–
Understanding Boolean Logic
Boolean logic is the foundation of modern digital electronics and computer programming. It deals with variables that have two possible values: True (1) and False (0). This system was pioneered by George Boole in the mid-19th century and is used to design circuits, write search engine queries, and develop complex algorithms.
Primary Logical Operators
- AND (Conjunction): Output is True only if both inputs are True. If either input is False, the result is False.
- OR (Disjunction): Output is True if at least one input is True. It only returns False if both inputs are False.
- NOT (Inversion): This is a unary operator that flips the bit. If the input is True, the output is False, and vice versa.
- XOR (Exclusive OR): Output is True only if the inputs are different (one True, one False). If they are the same, the result is False.
Truth Table Reference
| A | B | AND | OR | XOR |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
Practical Example
Imagine a security system. The alarm (Output) should sound only if the "System is Armed" (Input A) AND a "Motion Sensor is Triggered" (Input B). If Input A is 1 and Input B is 1, the logic gate returns 1, activating the alarm.