SECDED Error Correction Code

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.

Encode Decode Single Error Correction Double Error Detection Syndrome Overall Parity
SECDED Encoder & Decoder SEC + DED
Encode creates an extended Hamming SECDED codeword.
Encoder and decoder must use the same parity convention.
Enter original data bits. An overall parity bit will be added to the Hamming code.
SECDED Result
Waiting for input.
Original / Received
SECDED Codeword
Hamming Parity Bits
Overall Parity
Syndrome
Error Type
Corrected Codeword
Recovered Data
Error Position
Overall Parity Check
Data Bits
Total Bits
SECDED Analysis
Hamming Parity Analysis
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.

Data bits
+
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:

2^r >= m + r + 1

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.

Syndrome = 5
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.

Syndrome = 0
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.

Syndrome = nonzero
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

Important: this calculator implements extended Hamming SECDED logic using one additional overall parity bit.

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.

SECDED Calculator FAQs

What does SECDED stand for?
SECDED stands for Single Error Correction, Double Error Detection.
How is SECDED different from ordinary Hamming code?
SECDED adds one overall parity bit to a standard Hamming code so the decoder can distinguish a correctable single error from a detected double error.
Can this calculator encode SECDED data?
Yes. Encode mode inserts Hamming parity bits and then generates the additional overall parity bit.
Can it decode a SECDED codeword?
Yes. Decode mode calculates the Hamming syndrome and overall parity state, classifies the error and recovers the data when correction is safe.
Can SECDED correct one error?
Yes. A single corrupted Hamming bit can be identified by the syndrome and corrected.
Can SECDED detect two errors?
Yes. A nonzero syndrome together with a passing overall parity check indicates a double-bit error.
Can SECDED correct a double-bit error?
No. Standard SECDED detects two-bit errors but does not identify enough information to safely correct both corrupted bits.
What happens if only the overall parity bit is wrong?
The syndrome remains zero while overall parity fails, so the decoder identifies and corrects the overall parity bit itself.
What does syndrome zero mean?
It means the Hamming parity checks pass. Overall parity must still be checked to determine whether the overall parity bit has an error.
Where is the overall parity bit placed?
This calculator places the overall SECDED parity bit at the left side of the displayed codeword.
How are Hamming bit positions numbered?
Within the Hamming portion, position 1 is the rightmost bit and parity positions are 1, 2, 4, 8 and so on.
Does this calculator support odd parity?
Yes. Both encoding and decoding support even or odd parity conventions.
Scroll to Top