Source: https://guthlabs.ai/docs/instruments/boolean-expression-simplifier-karnaugh-map/implementation/

instrument implementation / implementation-contract

# Boolean Expression Simplifier (Karnaugh Map) implementation

A source-bound implementation contract for Boolean Expression Simplifier (Karnaugh Map); deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t6-106

**Effect**: Computation or source lookup only

## Input and validation requirements

The specification does not state a variable bit-order convention, so minterm 1 for variables A and B can legitimately simplify to either A'B or AB'. In addition, a 32-bit signed or bitwise JavaScript implementation can mishandle minterm 4,294,967,295 by converting it to -1, even though the exact mathematical result is a 32-literal product.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "variables": [
      "A",
      "B"
    ],
    "minterms": [
      1,
      2,
      3
    ],
    "dont_cares": [],
    "minterm_order": "A is MSB; B is LSB",
    "kmap_order": {
      "rows": "A=0,1",
      "columns": "B=0,1"
    }
  },
  "expected_outputs": {
    "minimal_sop": "A + B",
    "minimal_pos": "(A + B)",
    "kmap_grid": {
      "row_labels": [
        "A=0",
        "A=1"
      ],
      "column_labels": [
        "B=0",
        "B=1"
      ],
      "values": [
        [
          0,
          1
        ],
        [
          1,
          1
        ]
      ]
    },
    "spot_checks": {
      "A=0,B=1": 1,
      "A=1,B=0": 1,
      "A=0,B=0": 0
    }
  },
  "working": "Minterms in binary: 1=01, 2=10, 3=11. Combine 01 with 11: the A bit changes, giving -1 = B. Combine 10 with 11: the B bit changes, giving 1- = A. Minterm 1 is covered only by B, and minterm 2 is covered only by A, so both implicants are essential. Therefore SOP = A + B. The zero-set is only minterm 0 (00), so the minimal POS is the maxterm (A+B). Spot checks: A=0,B=1 gives 0+1=1; A=1,B=0 gives 1+0=1; A=0,B=0 gives 0+0=0."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/boolean-expression-simplifier-karnaugh-map/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/boolean-expression-simplifier-karnaugh-map/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/boolean-expression-simplifier-karnaugh-map/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche6/tranche6-results.json`
