PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Engineering

Other simulators in this category — or see all 23.

View category →
NewSchool

Bridge Builder

Place beams and joints. Apply load. See stress distribution.

Launch Simulator
School

Gear Train

Connect gears, adjust teeth count, see speed and torque ratios.

Launch Simulator
NewSchool

Planetary Gear Set

Sun, planets, internal ring: Willis equation, hold Sun/ring/carrier and compare speed ratios.

Launch Simulator
NewSchool

Beam Q, M & N Diagrams

Simply supported beam: point load + UDL; shear, bending moment, and uniform axial diagrams.

Launch Simulator
NewUniversity / research

AM / FM Modulation

Carrier + message: AM envelope vs FM phase; waveform and DFT spectrum snapshot.

Launch Simulator
NewSchool

Planar Truss (triangle)

Symmetric 3-bar truss: bar forces and reactions vs span, height, and apex load.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Engineering/Truth Table Generator

Truth Table Generator

Digital logic circuits form the foundation of modern computing, built from fundamental gates that perform Boolean operations on binary inputs. This simulator models the behavior of combinational logic circuits, where the output depends solely on the current combination of input values. The core physics involves representing binary states (0 or 1, FALSE or TRUE, LOW or HIGH voltage) and their transformation through logic gates like AND, OR, NOT, NAND, NOR, and XOR. Each gate implements a specific Boolean algebra function. For example, an AND gate outputs 1 only if all its inputs are 1, modeled by the Boolean expression Q = A · B. An OR gate outputs 1 if at least one input is 1 (Q = A + B), while a NOT gate inverts its single input (Q = Ā). The simulator abstracts away the underlying electronic implementation—such as transistors, voltage levels, and propagation delays—to focus on the ideal, instantaneous logical relationship. By constructing circuits and observing the auto-generated truth table, students learn to predict circuit behavior, verify Boolean identities like De Morgan's Laws (e.g., ¬(A ∧ B) = ¬A ∨ ¬B), and understand how complex functions are built from simple gates. This process directly illustrates the principle of functional completeness, demonstrating how a small set of gate types (like just NAND or NOR) can be used to construct any logical function.

Who it's for: High school and undergraduate students in computer science, electrical engineering, or digital electronics courses learning Boolean algebra and combinational logic design.

Key terms

  • Boolean Algebra
  • Logic Gate
  • Truth Table
  • Combinational Logic
  • Binary
  • Boolean Expression
  • De Morgan's Laws
  • Functional Completeness

Truth table

f = A & B
ABOUT
000
010
100
111

Inputs

2

Operators: ! NOT, & AND, | OR, ^ XOR. Use parentheses as needed.

Boolean expression

Presets

Measured values

Rows4
Expression validyes

How it works

Type a combinational Boolean expression using A, B, and optionally C. The simulator parses NOT (!), AND (&), OR (|), and XOR (^), then lists every input combination and the output bit — the full truth table for your function.

Key equations

XOR: A ⊕ B = (A ∨ B) ∧ ¬(A ∧ B)

Frequently asked questions

Why does my circuit's truth table show the same output for different inputs? Isn't that a mistake?
This is likely not a mistake but a feature of your specific circuit's logic function. Some circuits are designed to detect specific input patterns, producing a '1' only for those combinations and a '0' for all others. For example, a circuit that checks if two bits are equal will output 1 for (0,0) and (1,1), and 0 for (0,1) and (1,0). Review your Boolean expression to understand the logical condition your circuit implements.
How is this abstract logic related to real physical computers?
The logic gates you build with are abstractions of physical electronic components, primarily transistors arranged into circuits called CMOS. A '1' typically represents a high voltage (e.g., 3.3V) and a '0' a low voltage (e.g., 0V). The simulator ignores real-world timing delays and power consumption, but the logical relationships are identical. Every operation in your computer's processor is ultimately performed by vast networks of these microscopic logic gates.
What is the difference between a truth table and a Boolean expression?
A truth table and a Boolean expression are two equivalent ways to define the same logical function. The truth table is an exhaustive list of all possible input combinations and their corresponding outputs. The Boolean expression is a compact algebraic formula using variables and operators (AND, OR, NOT). The simulator automatically derives one from the other, showing their direct equivalence. For complex circuits, the expression is more concise, while the truth table makes the function's behavior completely explicit.
Can I build a circuit that 'remembers' a state, like a light switch, with this simulator?
No, this simulator specifically models *combinational* logic, where outputs depend only on current inputs. A circuit that remembers or stores state requires *sequential* logic, which incorporates feedback loops and clock signals to create elements like flip-flops and latches. These are fundamental for building memory and are a crucial next topic after mastering the combinational circuits modeled here.