Boolean Expression to Logic Circuit
Paste a Boolean expression from your homework and get a clean logic gate diagram: AND, OR, NOT, NAND, NOR, and XOR, with labeled inputs and outputs.
Free · no signup · no credit card · daily fair-use limits
Try a homework-style Boolean expression
One click draws the gate-level circuit. The expression stays in the box above, so you can change it and generate your own.
Write the expression the way your textbook does. A prime (X') or an overbar means NOT, juxtaposition (XY) means AND, and + means OR. You can also add a constraint such as "only NAND gates" or "only two-input gates", and the generator builds the circuit gate by gate from inputs on the left to the output on the right.
How to convert a Boolean expression to a logic circuit
Type the expression
Enter it as written, for example F = XY'(W' + Z') + X'Z. Name the inputs and the output if your assignment does.
Add gate rules
Say which gates are allowed, such as only NOT and two-input AND/OR, or NAND-only, so the circuit matches the question.
Generate the circuit
Each sub-term becomes a gate. Inverted literals get a NOT gate, products get AND gates, and sums get OR gates.
Check and download
Trace each path against the expression, then download the diagram as SVG or PNG for your lab report or homework.
From Boolean algebra to gates
A Boolean expression maps directly onto a combinational circuit. Every complemented variable (X') is a NOT gate, every product term (XY') is an AND gate, and every sum (+) is an OR gate. Parentheses tell you which gates feed which: in XY'(W' + Z') the OR of W' and Z' is computed first, then ANDed with X and Y'.
Many assignments restrict the gate set, for example "use only NOT and two-input AND/OR gates". A three-term product like XY'(W'+Z') then becomes a chain of two-input AND gates. Other assignments ask for NAND-only or NOR-only versions; both are universal gate sets, so any expression can be rebuilt with them using De Morgan's laws.
The diagram is a study aid. Always check it against your truth table, and simplify with a Karnaugh map first if the question asks for a minimal circuit.
Frequently asked questions
How do I write NOT in the expression?
Use a prime (X'), an exclamation mark (!X), the word NOT, or describe it in words. All of them are read as an inverted input.
Can I limit the circuit to two-input gates?
Yes. Add "strictly using two-input AND/OR gates" (or NAND-only, NOR-only) to the prompt and the generator chains gates to respect that limit.
Does it simplify the expression first?
It draws the expression you give it. If you want the minimal circuit, simplify it first (Boolean algebra or a Karnaugh map) or ask for the simplified form in the prompt.
Is it free?
Yes. There is no signup or credit card. Generation has hourly fair-use limits, and you can download every result as SVG or PNG.
More logic and engineering diagrams
Gate diagrams, ladder logic, and process flows from a sentence.
Free AI Logic Gate Diagram Maker
Describe any Boolean logic circuit and FreeDiagram draws the gate diagram instantly — gates, inputs, outputs, and signal flow. Free, hourly fair-use limited, no signup.
Free Ladder Logic Maker
Draft PLC programs, motor control circuits, and industrial automation logic visually — no signup, no cost.
Free AI Flowchart Maker
Describe any process in plain English and FreeDiagram draws the flowchart instantly — decision branches, loops, and all. Free, hourly fair-use limited, no signup.
Truth Table Generator
Type a Boolean expression and get a full truth table instantly — including minterm lists. Free, no signup; computation runs locally in your browser.
Karnaugh Map Solver
Simplify Boolean functions with a real minimizer — minimal SOP and POS, optional don’t-cares, and a K-map grid for 2–4 variables. Runs in your browser; free, no signup.