Free digital logic tools and reference
Truth tables, Karnaugh maps, boolean algebra and circuit diagrams, worked out as you type. Plus a full reference for the seven logic gates, flip-flops and the circuits built from them, and a simulator to try it all in.
Free and open source. No account, nothing to install.
Every table and identity here is generated, then property-tested.
A live half adder. Take over by clicking the inputs.
| A | B | sum | carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Free digital logic tools
Type an expression and get the table, the map, the minimal form or the diagram. Every one of them works on its own, in the browser, with no account. See all nine on the tools page.
The reference behind the tools
The theory the tools rest on: how each gate behaves, how flip-flops hold a value, and how the standard building blocks are put together. Every truth table and identity on these pages is generated from the same engine the tools use, so the two can never disagree.
And a simulator to build circuits in
The tools above answer one question at a time. The simulator is the other way round: wire up gates on a canvas and watch the signals move.
AND All the basic gates
AND, OR, NOT, XOR, NAND and NOR, plus clock, delay, counter, button, toggle and display nodes for interactive, time-dependent circuits.
0 1 Truth table generator
Build a circuit and read off its complete truth table. It works the other way too: fill in a truth table and the simulator constructs a working circuit from it. There is a standalone truth table generator here too.
A·B Boolean expressions
Turn any circuit into its boolean formula, or paste an expression and get a circuit back. The boolean algebra calculator simplifies and compares expressions on their own.
+ Custom nodes
Package a circuit into a reusable component. Build a half adder once, then drop it into bigger designs, up to counters and registers.
JSON Yours to keep
Circuits autosave in your browser. Export a design to a file, import it back, or copy a selection to your clipboard as JSON someone else can paste onto their canvas. Nothing is uploaded.
undo Proper editor tools
Pan, zoom to cursor, undo and redo, copy and paste, layers, a minimap, and keyboard shortcuts (ctrl+/ shows the list). Built-in examples include a working calculator.
How to use it
- Add gates. Pick nodes from the toolbar menus: Input for a toggle or a button, Logic for the gates themselves, Output for a display. Start with two toggles, one gate, and a display.
- Wire them up. Drag from a node's output point to another node's input. Signal states show live: high, low.
- Experiment. Toggle the inputs and watch the circuit respond. Then generate the truth table and see your circuit as algebra.
Every gate, and what it does
The seven logic gates, with the boolean expression the editor writes for each. Every name links to that gate's page, with its truth table, symbol and uses.
| Gate | Expression | Output is high when… |
|---|---|---|
| AND | a ∧ b | every input is high |
| OR | a ∨ b | at least one input is high |
| NOT | ¬a | its single input is low |
| XOR | a ⊻ b | its two inputs differ |
| NAND | ¬(a ∧ b) | any input is low |
| NOR | ¬(a ∨ b) | every input is low |
| XNOR | ¬(a ⊻ b) | its two inputs are equal· in the editor: an XOR into a NOT |
AND, OR, NAND and NOR take as many inputs as you need, not just two. Expressions render in five notations, from a ∧ b to a && b to a · b — pick one in the settings.
Circuits to open right now
Each of these links opens the simulator with the circuit already loaded, wired and running.
- Introduction A guided first circuit. Start here if gates are new to you.
- Rising edge detector A gate and a delay, firing one pulse the moment a signal goes high.
- Falling edge detector The mirror image: one pulse as the signal drops back to low.
- 7 segment decoder Four input bits and a web of gates lighting the seven segments of a digit.
- Four bit calculator Two 4-bit inputs, an adder, and three decoded digits. The full build.
Good ones to build yourself next: a half adder (an XOR and an AND), a full adder made from two half adders, an SR latch from two NOR gates feeding back into each other, and a multiplexer. The learning path walks through all of them in order.
Made for learning digital logic
The simulator, originally released as Logic Nodes, started as a way to understand logic gates properly and grew into a full circuit editor. It's well suited for boolean algebra homework, building an SR latch or a half adder for the first time, or experimenting with feedback and clocks. Teachers can share example circuits with a link, and students need nothing but a browser.



Built with the editor itself. Open the simulator to poke at circuits like these.
Questions
Is LogicGates.org free?
Yes. Every tool, reference page and practice question is free, open source under Apache 2.0, and runs entirely in your browser. No account, no install, no tracking.
What can I do on this site?
Three things. Look something up: the seven logic gates, their symbols in both standards, flip-flops, counters, shift registers, the common circuits and all the laws of boolean algebra. Work something out: truth tables, Karnaugh maps with don’t cares, boolean simplification, sum of products and product of sums, NAND and NOR conversion, circuit diagrams, and binary and Gray code conversion. Or practise: generated questions that never repeat, and printable worksheets with an answer key.
How do I get a truth table from a boolean expression?
Type it into the truth table generator and the full table appears as you type, including several outputs at once if you separate them with semicolons. Every operator notation works, from AND and OR through to the symbols and the programming operators.
How do I simplify a boolean expression?
Three tools do it, and they agree because they share one engine. The boolean algebra calculator shows the working line by line with the law named at each step. The Karnaugh map solver draws the map with each group highlighted, for two to six variables. The sum of products calculator gives the canonical and minimal SOP and POS with the minterm and maxterm lists.
Which logic gates does the simulator support?
AND, OR, NOT, XOR, NAND and NOR, and XNOR as an XOR into a NOT. AND, OR, NAND and NOR take as many inputs as you need, not just two. On top of the gates there are input, toggle, button, constant and microphone nodes, display, output, counter and tone nodes, and interval, delay, splitter, label and HTML overlay nodes.
Can the simulator generate a truth table?
Yes, and in both directions. Build a circuit and the simulator prints its full truth table; or start from an empty canvas, fill in a truth table, and it builds a working circuit that matches.
Can it turn a circuit into a boolean expression?
Yes, and back again: paste a boolean expression onto an empty canvas and you get the circuit. Expressions can be shown in five notations, from the mathematical one to programming operators. Optional simplification runs through Wolfram Alpha and needs your own free App ID in the settings.
Where are my circuits saved?
In your own browser, using localStorage, with an autosave ten seconds after a change. You can also export a design to a JSON file and import it again later. Nothing is uploaded to a server.
Can I share a circuit with someone else?
Export it to a file and send that, or select the nodes and copy: the circuit lands on your clipboard as JSON that anyone can paste straight onto their own canvas. The built-in examples also have direct links, such as logicgates.org/simulator#example:Calculator.
Does it work on a phone or tablet?
It is built for a mouse and keyboard. Nodes come from the toolbar menus, panning and zooming use the scroll wheel, and there is no pinch to zoom or touch panning yet, so a laptop or desktop is the better experience.
Does it need an internet connection?
Only to load the page. Simulation, saving, truth tables and expressions all run locally in your browser. The single optional exception is Wolfram Alpha simplification, which sends your expression to their API by way of a CORS proxy — the proxy is a setting, so you can point it at your own.
Ready to build something?
Open the simulatorThe built-in examples include a working calculator. Start from one of those if a blank canvas feels like a lot.