TRUTH TABLE
Complete input → output map
| A | B | Y |
|---|
COMPUTER SCIENCE & TECHNOLOGY • DIGITAL LOGIC
Drive binary inputs through real gate symbols, watch the output change, step through every truth-table row and compare Boolean behavior across seven fundamental gates.
TRUTH TABLE
| A | B | Y |
|---|
Use manual inputs when you want to test a specific case. Use Step or Play when you want the simulator to enumerate the complete truth table and expose the pattern automatically.
The lower canvas keeps a short history of recent A, B and Y states. It is a logical state history—not an electrical timing or propagation-delay model.
LEARN WITH THE SIMULATION
Logic gates implement Boolean functions by mapping discrete input states to an output. A single input setting is only one row of that function, so this laboratory pairs the live gate drawing with the complete truth-pattern signature for AND, OR, XOR, NAND, NOR, XNOR and NOT. The premium inspector shows the current expression, current output, number of true rows and the entire output pattern so learners can reason about a gate as a function rather than memorizing isolated examples.
BUILD THE IDEA
TRY IT YOURSELF
One matching row does not make two Boolean functions equivalent. A truth table compares the complete mapping. Complementary gates invert every output row, while gates such as AND and OR differ only on particular input combinations.
WHY IT WORKS 01
For two Boolean inputs there are four possible input rows: 00, 01, 10 and 11. Listing the output for all four completely defines a two-input Boolean function. Looking at only the current A and B values can hide important differences because several gates may produce the same output on one row while differing elsewhere.
WHY IT WORKS 02
NAND is NOT-AND, NOR is NOT-OR and XNOR is NOT-XOR. Their truth patterns are bitwise complements of the underlying gate's pattern. NAND and NOR are especially important because either one alone can be combined repeatedly to construct NOT, AND, OR and therefore any Boolean function.
WHY IT WORKS 03
XOR outputs one when exactly one of two inputs is one, giving the pattern associated with odd parity for two bits. XNOR outputs one when the inputs match. This equality-versus-difference interpretation makes XOR/XNOR useful for adders, checksums, comparison logic and controlled bit toggling.
DO NOT MIX THESE UP
OR is inclusive, so 1 OR 1 is 1; XOR is the gate that is true only when the two inputs differ. NOT is unary even if an interface displays another input nearby. Logic levels are abstract 0/1 states in this model, not fixed real-world voltages or propagation-delay behavior.
PRACTICE CHALLENGE
A two-input gate is identified by all four outputs, not by one sample. Complementary gates reverse each row: NAND complements AND, NOR complements OR and XNOR complements XOR. NOT is unary and therefore needs only the two A rows 0 and 1.
MODEL BOUNDARIES
Every simulation simplifies reality or a mathematical system. These are the assumptions and limits to keep in mind while interpreting the results.
CONNECT IT
WORDS THAT MATTER
NEXT STEP