Boolean Expression to CMOS Circuit Generator
Boolean Expression Input
CMOS Circuit
Enter a valid Boolean expression above to see the CMOS implementation.
Truth Table
Enter a Boolean expression to generate truth table
How this tool works, notation reference, and study tips
How the Generator Converts Your Expression
The generator works in three stages. First it parses your Boolean expression, handling operator precedence (NOT before AND before OR) and parentheses. Then it evaluates every input combination to build the truth table: for n variables that is 2n rows. Finally it synthesises the CMOS implementation: the pull-down network of NMOS transistors is derived directly from the expression structure (series for AND, parallel for OR), the pull-up network of PMOS transistors is generated as its dual, and an output inverter is added automatically when your expression is non-inverting.
Accepted Notation
You can write expressions in word form (A AND B, NOT C, A XOR B) or in the compact algebraic form used in textbooks: * or & for AND, + or | for OR, and a trailing apostrophe for NOT (so A'B + C means (NOT A) AND B, OR C). Adjacent terms are treated as an implicit AND, so AB + CD is a valid sum-of-products expression, exactly as you would write it when simplifying a Karnaugh map. Variables are single letters A-Z, and parentheses group sub-expressions to any depth.
Using It for Assignments and Revision
- Verify your K-map simplification: enter both the original and simplified expressions. If the truth tables match, your simplification is correct
- Check a homework circuit: generate the reference circuit and compare it against your hand-drawn answer, transistor by transistor
- Export for reports: download the circuit as a PNG (colour or black-and-white) for lab reports and assignment submissions
- Learn the patterns: generate NAND, NOR, and AND-OR-INVERT gates one after another and watch how series/parallel structures swap between the PUN and PDN
- Then test yourself: practice building circuits from scratch in the CMOS Builder or reading them in the quizzes