Source: https://guthlabs.ai/docs/instruments/parity-bit-simple-ecc-demo/

instrument / verified-clean

# Parity Bit / Simple ECC Demo

The current ledger marks this instrument verified clean within the source-bound verification corpus.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Inspectable records

[01**Overview**Purpose and lifecycle](<https://guthlabs.ai/docs/instruments/parity-bit-simple-ecc-demo/>)[02**Mechanism**Method and assumptions](<https://guthlabs.ai/docs/instruments/parity-bit-simple-ecc-demo/mechanism/>)[03**Implementation**Binding and validation](<https://guthlabs.ai/docs/instruments/parity-bit-simple-ecc-demo/implementation/>)[04**Qualification**Evidence and errata](<https://guthlabs.ai/docs/instruments/parity-bit-simple-ecc-demo/qualification/>)

## Ledger state

The current ledger marks this instrument verified clean within the source-bound verification corpus.

**Area**: Computing & Information

**Tranche**: tranche-4

**Evidence ID**: t4-277

**Ledger rows**: 1

No ledger note is attached.

## Review findings

The parity portion is standard only after defining even parity as XOR and odd parity as its complement. The Hamming portion needs the exact bundled generator and parity-check matrices, bit ordering, parity convention, syndrome interpretation, and multi-error policy before implementation can be formula-verified. The honest educational-simplification label is appropriate but should explicitly state that parity alone detects but does not correct errors.

### Formula and scope findings

- XOR of all data bits is the correct appended parity bit for even parity, assuming the total transmitted sequence must contain an even number of 1 bits. For odd parity, the parity bit must be the complement of the XOR result; the specification does not state this explicitly.

- A parity check detects any single-bit error, but it does not locate or correct the error and does not detect errors affecting an even number of bits.

- The Hamming(7,4) generator and parity-check matrices are not supplied, and the bit ordering, parity convention, syndrome calculation, and decoder behavior are unspecified. Therefore the exact Hamming formula cannot be verified.

- Hamming(7,4) single-error correction is valid only for zero or one corrupted bit under the selected standard convention; multiple-bit corruption can produce an incorrect correction.

### Unit assumptions

- Inputs are binary bits with values exactly 0 or 1; no physical units apply.

- Parity is evaluated over the data bits, and the returned parity bit is appended to the sequence.

- The test vectors assume even-parity Hamming(7,4) with positions 1, 2, and 4 as parity bits; data occupies positions 3, 5, 6, and 7.

- The test vectors assume syndrome bits are calculated as s1 over positions 1,3,5,7; s2 over positions 2,3,6,7; and s4 over positions 4,5,6,7, with syndrome value s4s2s1 interpreted as a binary position number.

## Boundary hardening

**BREAK_CLAIMED** · SELF_FLAGGED

The arithmetic is well-defined for valid binary inputs, but the specification does not state invalid-input rejection behavior and does not identify the exact Hamming(7,4) matrix or bit-order convention. Non-binary input can yield an invalid parity result under JavaScript coercion, and alternative Hamming conventions can yield different codewords and syndromes.

## Errata and corrections

No applied erratum is attached to this unique-name record.

## Inspectable example

4 review vectors are recorded. One source-bound sample is shown below.

````
{
  "inputs": {
    "bits": [
      0,
      0,
      0,
      0
    ],
    "parity_type": "even"
  },
  "expected_outputs": {
    "parity_bit": 0
  },
  "working": "XOR all bits: 0 XOR 0 = 0; 0 XOR 0 = 0; 0 XOR 0 = 0. Even-parity bit = 0. Total 1 bits after appending = 0, which is even."
}
````

## Related workflows

[Crypto & Number Theory Classroomcoding 2](<https://guthlabs.ai/docs/instrument-workflows/crypto-classroom/>)

## Sources and evidence

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

- `VERIFIED_LEDGER.json · VERIFIED_CLEAN`

- `evidence-tranche4/tranche4-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
