# cherry-txt/hamming-code-detector- architecture

> Architecture diagram of the GitHub repository cherry-txt/hamming-code-detector-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cherry-txt/hamming-code-detector-
- Repository: https://github.com/cherry-txt/hamming-code-detector-

## Overview

This repository contains a small interactive Hamming(15,11) detector: a user enters 15 bits, the script calculates four even-parity checks, combines them into a syndrome, and flips the indicated bit when the syndrome is nonzero. The README also describes a C codeword generator, but its source is absent from the provided tree, so it is not mapped as an implemented component. The workflow is based on the excerpted Python script and README.

Main entry points: [`Hammingdetect.py`](https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py) (Bit input)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_bit_input["Bit input<br/>[Hammingdetect.py]"]
node_parity_checks["Parity checks<br/>[Hammingdetect.py]"]
node_syndrome["Syndrome<br/>[Hammingdetect.py]"]
node_bit_correction["Bit correction<br/>[Hammingdetect.py]"]

node_user -->|"enters bits"| node_bit_input
node_bit_input -->|"checks bits"| node_parity_checks
node_parity_checks -->|"forms syndrome"| node_syndrome
node_syndrome -->|"flips indicated bit"| node_bit_correction

click node_bit_input "https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py"
click node_parity_checks "https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py"
click node_syndrome "https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py"
click node_bit_correction "https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_bit_input,node_parity_checks,node_syndrome,node_bit_correction toneTeal
```

## Components

### Other components

- **User**
- [Bit input](https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py): `Hammingdetect.py`
- [Parity checks](https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py): `Hammingdetect.py`
- [Syndrome](https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py): `Hammingdetect.py`
- [Bit correction](https://github.com/cherry-txt/hamming-code-detector-/blob/main/Hammingdetect.py): `Hammingdetect.py`

## Connections

- User → Bit input: enters bits (evidence: `README.md`)
- Bit input → Parity checks: checks bits (evidence: `Hammingdetect.py`)
- Parity checks → Syndrome: forms syndrome (evidence: `Hammingdetect.py`)
- Syndrome → Bit correction: flips indicated bit (evidence: `Hammingdetect.py`)
