Neatbo.

Choose DNF or CNF for an explicit care set

Compare OR-of-AND and AND-of-OR costs, distinguish dont-care from global equivalence and gate count, and keep a complete verifiable delivery.

Choose the cost you mean to compare

DNF is an OR of AND terms, useful for checking input combinations that make the function true. CNF is an AND of OR clauses, useful for the restrictions represented by the false set. Both requests two completed covers within one tool; one form’s cost does not replace the other’s.

For the synthetic (A & B) | (A & C) under dontCare=False, DNF costs two terms and four literals. CNF (B | C) & A costs two clauses and three literals. Fewer CNF literals do not establish a minimum-gate-count circuit.

Keep the comparison units consistent
RequestStructureExact objective
DNFOR of AND termsMinimum terms, then literals
CNFAND of OR clausesMinimum clauses, then literals
BothFinish both forms separatelySame source, care set and total budget

Dont-care does not mean “output true”

A true dontCare condition allows the output to change on that row; it is not the new output value. Constraints come from every row where dontCare=false. The complete truth table still shows the original and all requested outputs on every row.

With dontCare changed to ~A in the small example, only A=1 rows are checked: DNF B | C, CNF (B | C). The four A=0 rows are dont-care, so an originally false row may become true. This is not equivalence over all eight rows, and A must remain in the source variable identities.

Make constants and an empty care set explicit

When every row is dont-care, the explicit policy returns DNF False and CNF True, each at cost (0 terms/clauses, 0 literals). Both are allowed because there is no care constraint; keep the original, settings and complete table so that this reason stays visible.

For a nonempty universal target, one mask-0 cube costs (1 term/clause, 0 literals): DNF True or CNF False. The report’s constant means the final function value. A short-looking expression or a lower-cost candidate does not replace a completed exact search.

A gate diagram expresses the selected cover

The diagram preserves each variable name, bit/mask and each selected cube’s term or clause mapping, with every literal and constant. It is a reviewable picture of this expression; it does not optimize multi-level logic, delay, fan-out or gate count.

For a practical handoff, fix the complete JSON and care condition, run and check truth/costs, then deliver all requested-form SVGs, complete CSV, report, settings, expressions and original together.

  • Keep form, dontCare and variable/bit/mask identities with the figure.
  • Compare term or clause counts within the same form, then literals.
  • Verify every care row and retain rows allowed to change.
  • Save the complete mapping and every diagram; a limited preview is not whole-task evidence.

Keep source history and finite limits visible

The real question describes inconsistent dont-care paths and includes a notebook. The author later corrected a suggested diff that did not match then-current master/1.14.0; the saved timeline closed COMPLETED via PR 28842. This tool does not apply that diff, assess a released fix or execute the notebook.

This is an independently written bounded JavaScript route, without SymPy, Pyodide or Espresso at runtime. The 64 KiB, 8-variable, 10,000,000-total-work and single 60-second limits all apply; any excess refuses the entire task. Retry the same original/parameters after cancellation and record deliberate reductions. The example illustrates the shown function; larger requests must still fit every limit.

References

  • HaydenMcT — inconsistent dont-care handling

    The complete saved question, both comments and attached notebook were read. The author corrected a suggested diff that did not match then-current master or 1.14.0. The saved timeline closed COMPLETED on 2025-12-31 via PR 28842; that PR’s implementation or released fix was not assessed. The notebook was read, not executed; this page’s three-variable examples are synthetic.

  • SymPy logic documentation

    Saved SOPform, POSform and simplify_logic documentation explains normal forms and dont-care conditions. This tool uses an independently written bounded JavaScript route; it does not run SymPy, Pyodide or Espresso and does not claim general library compatibility or an applied upstream patch.

Tools in this category

Expand a tool to see its steps, options and supported formats, then open its workspace.

Boolean logic minimizerMinimize DNF, CNF or both under an explicit dont-care set, verify every care row, and keep the full truth table, variable mapping, costs and gate SVGs.

Define which inputs may change, then minimize terms or clauses before literals. The complete truth table and gate diagrams let you review every required input.

Steps

  1. Choose paste or file mode and supply the complete JSON; explicitly record expression, dontCare and form.
  2. Use ~ or !, &, ^, | and parentheses for safe Boolean expressions; check that inputs marked true by dontCare may really change.
  3. After running, check completion, equivalence on every care row, term/clause and literal costs, and the variable-to-bit/mask mapping.
  4. Download each requested form’s SVG, the full truth CSV, report, settings, expression text and original; copy a complete expression or the complete report.

Available options

Input mode
Paste complete JSON · Select one original JSON File

Only the current mode’s complete source is processed; there is no automatic fallback.

Capabilities and limits

  • Choose paste or file mode explicitly. Paste processes only active text; file mode processes exactly one original File, with no automatic fallback. Supply one complete strict UTF-8 JSON source, up to 64 KiB. The form belongs in the JSON; the workbench control selects only the input mode. One leading UTF-8 BOM is accepted and retained in the exact original; an original File name is limited to 512 UTF-8 bytes without control characters or BOM.
  • JSON uses an expression string, form (dnf, cnf or both), and an optional dontCare string that defaults to False. The grammar accepts ASCII variables, True/False (also true/false), ~ or !, &, ^, | and parentheses; it never executes code. Case-sensitive identifiers match [A-Za-z_][A-Za-z0-9_]*.
  • At most 8 distinct variables, each identifier at most 128 ASCII bytes; 4,096 combined tokens and 1,000 total expression/dontCare AST nodes. Parser recursion and parentheses are each limited to depth 64, including redundant parentheses.
  • Variables are the union of both expressions, sorted by ASCII. Variable i binds to bit i and mask 1<<i; all at most 256 rows are enumerated. Rows where dontCare is true do not constrain the result, but retain original, dont-care and minimized values.
  • Each requested form must finish an exact cover: minimum term count (clause count for CNF), then minimum literal count for equal term counts, followed by all-care-row verification. At most 6,561 candidate cubes and 10,000,000 total work units; unfinished search or any budget excess refuses the whole task.
  • Download the complete truth CSV, all requested expressions, report, effective settings, exact original JSON and one complete gate SVG per requested form. The report retains all variable/bit/mask, prime/selected-cube mappings, costs and completion state. SVG shows the selected cover and does not establish minimum gate count.
  • Complete files plus all full copy text are limited to 8 MiB; typed compact JSON has a separate 8 MiB limit, their aggregate 16 MiB, and binary plus complete transfer metadata 32 MiB. Memory reservation budget is 256 MiB. These guards are not measured browser-heap promises. Bounded previews never shorten exports.
  • One 60-second deadline starts before source checks, native File metadata/read, loading and Worker creation, and includes full validation, cleanup and first publication after await; it never resets. Cancellation, timeout or changed input clears old success and publishes no partial or late output. Retry the same original and parameters.
Open Boolean logic minimizer →