SECDED Calculator
Encode and decode SECDED Hamming codes, generate Hamming and overall parity bits, calculate syndrome, correct a single-bit error, identify an overall parity-bit error, detect double-bit errors and recover the original binary data.
| Parity | Position | Checked Positions | Ones | Result |
|---|---|---|---|---|
| Enter data and calculate to view SECDED parity analysis. | ||||
What Is SECDED?
SECDED stands for Single Error Correction, Double Error Detection. It extends a standard Hamming code by adding one extra overall parity bit to the entire Hamming codeword.
Standard Hamming parity identifies a single erroneous position through the syndrome. The additional overall parity bit lets the decoder distinguish between a correctable single-bit error and a detected two-bit error.
What This SECDED Calculator Covers
SECDED Encoder
Generates Hamming parity bits and then adds an overall parity bit to create the complete extended Hamming SECDED codeword.
SECDED Decoder
Checks both the Hamming syndrome and the overall parity state of a received codeword.
Single Error Correction
When the syndrome and overall parity indicate one corrupted Hamming bit, the calculator identifies and flips that bit.
Double Error Detection
A nonzero syndrome combined with a valid overall parity check indicates a detected double-bit error that must not be automatically corrected.
SECDED Codeword Structure
SECDED starts with an ordinary Hamming code and adds one overall parity bit.
+
Hamming parity bits
+
1 overall parity bit
=
SECDED codeword
In this calculator, the overall parity bit is displayed as the leftmost bit. Hamming positions inside the remaining code are numbered from the right, with position 1 at the rightmost bit.
How Many Parity Bits Are Required?
For m original data bits, the number of Hamming parity bits r must satisfy:
SECDED then adds one more overall parity bit.
| Data Bits | Hamming Parity Bits | Overall Parity | Total SECDED Bits |
|---|---|---|---|
| 1 | 2 | 1 | 4 |
| 2 | 3 | 1 | 6 |
| 3 | 3 | 1 | 7 |
| 4 | 3 | 1 | 8 |
| 8 | 4 | 1 | 13 |
| 16 | 5 | 1 | 22 |
SECDED Error Classification
The decoder uses two pieces of information: the Hamming syndrome and whether the overall parity check fails.
| Syndrome | Overall Parity | Meaning | Action |
|---|---|---|---|
| 0 | Pass | No error detected | No correction |
| Nonzero | Fail | Single error in Hamming section | Correct syndrome position |
| 0 | Fail | Overall parity bit error | Correct overall parity bit |
| Nonzero | Pass | Double-bit error detected | Do not correct automatically |
How Single Error Correction Works
If the Hamming syndrome is nonzero and the overall parity check also fails, SECDED identifies the error as a single-bit error inside the Hamming portion of the codeword.
Overall parity = FAIL
Meaning:
Single-bit error at Hamming position 5
Action:
Flip position 5
How an Overall Parity-Bit Error Is Detected
If all Hamming parity checks pass but the complete codeword has incorrect overall parity, the additional SECDED parity bit itself is the erroneous bit.
Overall parity = FAIL
Meaning:
Overall parity bit error
Action:
Flip the leftmost overall parity bit
How SECDED Detects a Double-Bit Error
When two bits are corrupted, Hamming parity can produce a nonzero syndrome while the total parity remains valid because two bit flips preserve the overall parity state.
Overall parity = PASS
Meaning:
Double-bit error detected
Action:
Do not use the syndrome as a correction address
This distinction is the key advantage of SECDED over standard Hamming single-error correction.
SECDED vs Standard Hamming Code
| Feature | Standard Hamming | SECDED |
|---|---|---|
| Hamming parity bits | Yes | Yes |
| Overall parity bit | No | Yes |
| Single error correction | Yes | Yes |
| Reliable double error detection | No | Yes |
| Extra overhead | Hamming parity only | One additional overall parity bit |
Even and Odd SECDED Parity
The default convention is even parity. With even parity, every Hamming parity group and the complete SECDED codeword are constructed to contain an even number of ones.
Odd parity follows the same structure but targets an odd number of ones. Encoding and decoding must always use the same convention.
SECDED Applications
ECC Memory
SECDED concepts are widely associated with error-correcting memory designs that need to correct individual bit errors and identify larger faults.
Digital Communications
Extended Hamming codes demonstrate how redundant parity information can improve reliability across noisy channels.
Computer Architecture
Syndrome and overall-parity logic are useful for understanding hardware ECC checking and correction systems.
Coding Theory
SECDED provides a practical example of extending a linear block code to improve its detectable error patterns.
Important SECDED Notes
The overall parity bit is shown as the leftmost bit of the SECDED codeword.
The remaining Hamming positions are numbered from the rightmost bit as position 1.
A nonzero syndrome does not always mean the syndrome position should be corrected. The overall parity result must also be considered.
Syndrome nonzero + overall parity failure means a correctable single-bit Hamming error.
Syndrome zero + overall parity failure means the overall parity bit itself is incorrect.
Syndrome nonzero + overall parity pass indicates a detected double-bit error and the calculator deliberately does not perform an automatic correction.
SECDED guarantees correction of one error and detection of two errors under its design assumptions. It does not provide arbitrary multi-bit error correction.