Optimized SEC-DED code with minimum odd-weight columns for energy efficiency. Uses syndrome parity to distinguish single from double errors. Widely used in ECC memory and cache protection.
| Property | Value |
|---|---|
| Category | Error Correction |
| Sub-category | Linear Code |
| Security status | π Educational Only |
| Complexity | Intermediate |
| Inventor | Ming-Yao (M. Y.) Hsiao |
| Year | 1970 |
| Origin | πΊπΈ United States |
| Source | algorithms/ecc/hsiao-code.js |
Status: π Educational Only
| Issue | Description | Mitigation |
|---|---|---|
| Double Error Detection Only | Can detect but not correct double-bit errors. Uses syndrome parity to identify error type. | β |
| Triple Error Miscorrection | Triple errors may be miscorrected as single errors if syndrome parity appears odd. | β |
3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Hsiao (8,4) all zeros
| Field | Value |
|---|---|
input |
00000000 |
expected |
0000000000000000 |
Vector 2 β Hsiao (8,4) all ones
| Field | Value |
|---|---|
input |
01010101 |
expected |
0101010101010101 |
Vector 3 β Hsiao (8,4) pattern test
| Field | Value |
|---|---|
input |
01000100 |
expected |
0001000101000100 |