# Ohmforge Truth Table & Logic Minimiser > Boolean expression or minterms → truth table, minimal SOP/POS, Karnaugh map and a gate circuit. Enter a Boolean expression (A·B + A'·C, !(A & B) | C, A xor B …) or a list of minterms with don't cares. You get the truth table, the canonical forms, the minimal sum of products and product of sums (Quine–McCluskey with an exact minimum cover), the Karnaugh map for up to six variables, gate counts and an Ohmforge circuit of 2-input gates that is simulated for every row. Part of usefulweb.site (https://usefulweb.site/). Part of [Ohmforge](https://ohmforge.usefulweb.site/) (ownerApp: ohmforge). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ohmforgetruthtable.usefulweb.site/ (interactive tool at https://ohmforgetruthtable.usefulweb.site/tool) - JSON API: POST https://ohmforgetruthtable.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://ohmforgetruthtable.usefulweb.site/api/v1/tool) - OpenAPI: https://ohmforgetruthtable.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://ohmforgetruthtable.usefulweb.site/mcp - tool `ohmforge_truth_table` ## Inputs - mode (select): Input - expression (text): Expression - Variables: a letter with an optional number (A, b, x1); AB means A·B. NOT: ' after or ! ~ before; AND: · & * or nothing; OR: + |; XOR: ^. Words AND, OR, NOT, XOR, NAND, NOR, XNOR work too. - variables (text): Variables in order (optional) - Comma-separated, first = most significant bit, e.g. A, B, C, D. Expression: empty = alphabetical. Minterm list: empty = A, B, C, D. - minterms (text): Minterms (1 rows) - For "Minterm list": numbers and ranges, e.g. 0, 2, 5-7. - dontCares (text): Don't cares (optional) - Rows whose output does not matter; the minimiser may use them. - circuit (select): Circuit form ## Method - The expression is parsed with the precedence NOT > AND > XOR > OR (NAND/NOR/XNOR at the level of their base operator) and evaluated for every input row; the first variable is the most significant bit of the row number. - Quine–McCluskey: minterms and don't cares are merged pairwise into cubes until no merge is possible; the unmerged cubes are the prime implicants. A minimum cover of the 1 rows is then chosen exactly: essential primes first, then branch and bound on the remaining rows (fewest terms, then fewest literals). The product of sums is the minimum cover of the 0 rows, complemented with De Morgan. - Karnaugh maps use Gray-code row and column order (00, 01, 11, 10); five and six variables are shown as two or four 4 × 4 maps selected by the first variables. - Gate counts: one NOT per inverted variable, one AND per product with two or more literals and one OR (dual for POS); "2-input gates" counts a k-input gate as k − 1 two-input gates. - The circuit uses Ohmforge's behavioural 2-input gates (5 V, threshold 2.5 V), input switches with 10 kΩ pull-downs and a logic probe; for up to 40 gates the DC operating point is solved for every defined row and compared with the truth table. ## Limits - Two-level minimisation counts terms and literals; it ignores propagation delay, hazards, fan-out and the cost of real gate packages. Multi-level or XOR-based circuits can be smaller (parity functions are the classic example).