The devutils collection

Boolean gate workbench

Predict and verify AND, OR, NOT and XOR with two inputs and complete truth tables.

On this page

Prerequisites

Predict before you toggle

Start with A = 0 and B = 0. Write down a prediction, then change an input and compare the output. The tables give every possible input combination, so you can reproduce the complete experiment without JavaScript.

Understand the result

AND requires both inputs. OR accepts either input, including two inputs of 1. XOR accepts exactly one input of 1. NOT inverts A and does not use B. The workbench and tables implement these definitions; they are original educational examples.

What this experiment does not measure

The model has no voltage, current, propagation delay, power use or component failure. It does not connect to hardware. Its output is a Boolean result, not evidence that a physical circuit will meet electrical or timing requirements.

Reproduce the experiment

Requirements

  • A current browser; no installation or account
  • JavaScript for the interactive controls; static tables are always available

Steps

  1. Select AND and try all four input combinations
  2. Repeat with OR and XOR; compare their outputs for A = 1 and B = 1
  3. Select NOT and vary A; B has no effect
  4. Use Reset inputs to return both inputs to 0

Expected results

  • AND produces 1 only for two inputs of 1
  • OR produces 0 only for two inputs of 0
  • XOR produces 1 only when the inputs differ
  • NOT produces the inverse of A

Boolean gate workbench

Choose an operation and toggle the inputs. NOT uses only A. This is a logical simulation, not an electrical measurement.

The full truth tables below work without JavaScript. Read an input row to find its output.

AND

AND truth table
ABOutput
000
010
100
111

OR

OR truth table
ABOutput
000
011
101
111

NOT

NOT truth table
AOutput
01
10

XOR

XOR truth table
ABOutput
000
011
101
110

Verification record

  • Sources assessed by Codex (assistant)
  • Example checks recorded
  • Independent human review pending

Selected claims have been assessed against the passages below. This record does not certify every sentence or guarantee correctness.

Inspect claims, evidence and limitations

Source assessment: . 2 of 2 selected claims marked supported by the assessor. This is not a coverage percentage for the article.

  1. The lab’s four operations use the standard stated Boolean definitions.

    Assessor finding: supported · definition · Article passage

    Truth-table and model tests validate the logical behavior only.

  2. The workbench is a logical simulation with no electrical measurements.

    Assessor finding: supported · model · Article passage

    The absence of voltage/current/timing models is explicit in our implementation; it is not evidence about a physical device.

Reproducible checks

  • All AND/OR/XOR input combinations and NOT independence from B.

    Passed on 2026-10-27

    node --test --test-name-pattern='gate model covers every binary combination and NOT ignores B' src/library/roadmap.test.ts

Limits and open work

  • The model does not simulate voltage, propagation delay, power or failure.
  • Browser interaction checks are separate from this recorded model check.

Independent human review

Pending. No independent human reviewer has signed off this version.

Content fingerprint: 652d25e51269942f5ac5ac5ad8d109bc3e151e37a7e9a544604d185f4502879e. An article change invalidates this assessment.

Sources

  1. Shannon, A Symbolic Analysis of Relay and Switching Circuits (1938) — switching logic context
  2. Cornell CS 3410, Gates and Logic — definitions and arithmetic

Published by devutils · Updated · Original explanatory text; sources retain their own terms.