Logic Gate Simulator
One function, F, seen four ways. The tabs along the top are Expression, Table & map, Circuit and Reference. Down the middle, the blue Input card is where you type F and choose how many Variables it has; the green Output card under it shows F as it stands and counts its gates, literals, inputs, rows at 1 and minimal SOP, with buttons to see it as a gate network, a truth table and K-map, or a circuit. The Settings panel on the right holds Shape the output and your Saved functions; each section folds from its heading, and Hide puts the panel away.
Writing an expression
Type into the box in the Input card, after F =. It is at the top of every view, so you can change F while looking at its table or its circuit, and / jumps back to it from anywhere. Under the box, a tick says which variables it read; anything it could not read is named in red, and the output keeps the last F that worked. Every other view follows as you type.
| You type | It reads as | Meaning |
|---|---|---|
A' !A ~A | A′ | NOT |
AB A*B A.B A&B | A·B | AND — letters written together |
A+B A|B | A + B | OR |
A^B | A ⊕ B | XOR |
( ) | Brackets group | |
0 1 | Constants |
- Precedence is NOT, then AND, then XOR, then OR — so
AB + Cis (A·B) + C. - On the Expression tab, the keypad under the box types the variables and symbols for you; ⌫ deletes and clear empties it.
- Try loads an example in one click, picked for the number of variables:
AB + BC + AC,A(B+C),A ⊕ B ⊕ C,A′B′C′for three. - Variables, at the top right of the Input card, sets how many inputs F has — 2 to 8, named A to H — with − and +.
- A typo never blanks the page: the last working function stays on screen while you fix it.
Gate network and canonical forms
Under the expression, Gate network draws F as gates, with a count of each kind (for example 1 OR · 3 AND).
Canonical forms shows F two more ways: the Disjunctive · SOP form, as minterms Σm(…) and written out in full, and the Conjunctive · POS form, as maxterms ΠM(…). Use this on either makes that form the new F.
Truth table and K-map
The Table & map tab lays F out row by row.
- Click a value in the F column to flip that row. The expression, the map and every other view change to match what you set — a quick way to design from a table.
- Click anywhere else in a row to probe it: on the Circuit tab, the wires carrying 1 for that row light up.
- Gate columns adds a column for every gate in the network, so you can follow a signal through the circuit row by row.
- The Karnaugh map is in Gray-code order (one pane per value of the extra variables beyond four: two for five, up to sixteen for eight). With Simplify on, each colour is one prime implicant of the minimal cover; a cell in two colours is simply covered twice.
- Working lists, with Simplify on, the laws of Boolean algebra applied one step at a time.
Simplify and gate families
- Simplify (under Transform the output, on the right) reduces F by the laws of Boolean algebra, De Morgan first, and shows the steps under Working.
- Gate family rebuilds the network from one kind of gate: As written, NAND only, NOR only, AND + NOT or OR + NOT. A note says how the conversion works, and the readout's gate count lets you compare them.
NAND and NOR are universal: every function can be built from either one alone, which is why a lab kit of 74LS00s goes so far. See Logic gates.
The circuit
The Circuit tab is F drawn as gates and wires — the same function the Output card shows, after Simplify and the gate family. It is a picture of the expression, not something you edit: change F in the Input card and the circuit is redrawn and framed again.
- Look around: drag to move, scroll (or pinch) to zoom from 20% to 250%; Fit frames the whole circuit again.
- Probe it: click an input pin, or its button above the circuit, to flip that input. Every wire carrying 1 lights up, and F= shows the output for that combination. Picking a row in the truth table sets all the inputs at once.
Saving functions
In Saved functions, on the right, type a name (or leave it blank to use the expression) and press Save or Enter. Click a saved function to load it back, with its variable count; × deletes it. Opened from a project, the panel says in this project and the functions are kept there.
The Reference tab
A cheat sheet that stays beside your work: how the tool fits together, the laws of Boolean algebra (identity, null, idempotent, complement, involution, commutative, associative, distributive, absorption, De Morgan, consensus), the gates with their truth tables, the accepted notation, why NAND and NOR are universal, and the Karnaugh grouping rules.