# Ohmforge Logic Minimiser (multi-output, Petrick, K-map groups) > Truth table with several outputs → all minimal SOP/POS forms, grouped K-maps, gates and Verilog. Paste a truth table with up to 6 inputs and 8 outputs (rows with - for "either value", x for don't care) or a list of equations. For each output you get every minimum sum of products or product of sums (Quine–McCluskey primes and Petrick's method), the Karnaugh map with the chosen groups drawn in, the prime implicant chart, a two-level gate schematic, a Verilog module and a simulator netlist that is simulated and compared with the table. Compare mode checks whether two Boolean expressions are equivalent and lists counterexamples. Part of usefulweb.app (https://usefulweb.app/). Part of [Ohmforge](https://ohmforge.usefulweb.app/) (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://ohmforgelogicminimizer.usefulweb.app/ (interactive tool at https://ohmforgelogicminimizer.usefulweb.app/tool) - JSON API: POST https://ohmforgelogicminimizer.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://ohmforgelogicminimizer.usefulweb.app/api/v1/tool) - OpenAPI: https://ohmforgelogicminimizer.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://ohmforgelogicminimizer.usefulweb.app/mcp - tool `ohmforge_logic_minimizer` ## Inputs - mode (select): Input - table (textarea): Truth table - Header "A B C | F G" (inputs | outputs), then one row per line: "0 1 1 | 1 0" (spaces optional). - in the inputs covers 0 and 1; x or - in the outputs is a don't care. Up to 6 inputs (a letter with an optional number) and 8 outputs. # starts a comment. - unlisted (select): Rows not listed - equations (textarea): Equations - For "Equations": one per line, e.g. "S = A xor B xor C" and "Co = AB + AC + BC". Same operators as the truth-table tool (' or ! NOT, · & or nothing AND, + | OR, ^ XOR). - form (select): Minimal form - check (textarea): Check against (optional) - Your own solution per output, e.g. "a = B3 + B1 + B2B0 + B2'B0'": each is compared with the table (don't-care rows ignored) and mismatching rows are listed. - left (text): Expression 1 - For "Compare two expressions", up to 16 variables. - right (text): Expression 2 ## Method - Truth table: every row with - in an input stands for both values; rows not listed are 0 or don't care (your choice); a row given twice with different outputs is an error that names both lines. - Quine–McCluskey: for each output the 1 rows and don't cares are merged into prime implicants (the 0 rows and don't cares for the product of sums). - Petrick's method: "each 1 row must be covered" is written as a product of sums over the primes that are not essential and multiplied out with absorption (X + XY = X); every product with the fewest terms, then the fewest literals, is a minimum cover. The expansion is pruned with the cost of a branch-and-bound cover, which cannot remove a minimum; above 20,000 partial products only that one cover is returned and marked as incomplete. - Karnaugh maps use Gray-code order; 5 and 6 inputs are drawn as 2 or 4 maps selected by the first inputs. Each group of the chosen cover is a numbered, coloured outline (groups that wrap around the edge appear as pieces on both sides). - The gate schematic and the Verilog module realise the chosen cover with NOT, AND and OR gates. The same cover is written as a netlist for the logic simulator (shared inverters and terms, 1 time unit per gate), simulated for every input row and compared with the table, so the result is checked independently of the minimiser. - Equivalence checks evaluate both sides for every input combination (don't-care rows excluded when checking against the table). ## Limits - Each output is minimised on its own as a two-level circuit (terms, then literals); shared terms between outputs are reused in the netlist but not optimised for. Multi-level, XOR-based or FPGA LUT mappings can be smaller. Simulation and learning, not FPGA synthesis.