Even parity check ensuring total number of 1 bits is even Fundamental error detection using XOR operations.
| Property | Value |
|---|---|
| Category | Checksums |
| Sub-category | Parity Check |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | Richard Hamming |
| Year | 1950 |
| Origin | πΊπΈ United States |
| Source | algorithms/checksum/parity.js |
Status: π Educational Only
| Issue | Description | Mitigation |
|---|---|---|
| Single Error Detection Only | Can only detect odd numbers of bit errors, not even numbers | β |
| No Correction Capability | Can detect errors but cannot correct them | β |
| Weak Against Burst Errors | Poor performance against consecutive bit errors | β |
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Empty data
Source: Even parity of empty data is 0
| Field | Value |
|---|---|
input |
(empty) |
expected |
00 |
Vector 2 β Single byte 0xFF
Source: 8 bits set - even parity
| Field | Value |
|---|---|
input |
ff |
expected |
00 |
Vector 3 β Single byte 0x0F
Source: 4 bits set - even parity
| Field | Value |
|---|---|
input |
0f |
expected |
00 |
Vector 4 β Single byte 0x07
Source: 3 bits set - odd parity needs correction
| Field | Value |
|---|---|
input |
07 |
expected |
01 |