End-Around Carry Correction in Digital Arithmetic
End-around carry correction is a technique used in one’s complement arithmetic (and also in related carries handling) to ensure results are correct when addition generates a carry out of the most-significant bit. In an -bit one’s complement sum, if there is an “end-around” carry (a carry out of the MSB), that carry is added back into the least-significant bit (LSB) to form the corrected result. This is often described as “end-around” because the carry “wraps around” from the left end of the adder to the right end.
A typical workflow:
- Add two -bit one’s complement numbers normally (modulo addition).
- If a carry out occurs, perform an end-around addition of 1 to the lower bit of the result.
This correction is required because one’s complement representations have two zeros ( and ) and the arithmetic rules ensure that “overflow” from the MSB is treated specially rather than discarded.
Core idea as a rule
If the uncorrected -bit sum produces a carry out , then the end-around corrected result is:
(with addition again interpreted in the same one’s complement word format).
Why it’s needed (intuition)
In modulo addition, the carry-out is lost; but one’s complement arithmetic defines addition so that the discarded carry contributes back into the word. That “re-injection” restores the correct numeric value in the one’s complement system.
Key terms you’ll see:
- one’s complement
- carry-out
- modulo addition
- wrap-around carry
Important: The exact behavior around overflow differs across number systems (e.g., two’s complement does not use end-around carry correction; it uses overflow flags or different rules). End-around carry correction is characteristic of one’s complement (and sometimes related carry-correction schemes).
End-Around Carry (One’s Complement Addition) - Concept Video
How End-Around Carry Correction Works (One’s Complement Addition)
- 1Step 1
Ensure both numbers use one’s complement encoding and have the same word length .
- 2Step 2
Add the two -bit words as you would in hardware. Record the -bit sum and the carry-out from the MSB.
- 3Step 3
If , no correction is needed.
- 4Step 4
Compute the corrected result by adding 1 to the LSB of the -bit sum (end-around correction).
- 5Step 5
If the “add back” generates another carry, it is handled according to the same one’s complement end-around rule (effectively may repeat depending on the representation rules, but for the common case of adding back 1 to an -bit result, the correction is typically a single re-injection).
Concrete example (illustrative)
Consider 4-bit one’s complement addition. Suppose you add two numbers whose encoded forms produce a carry out from the MSB. In one’s complement, that carry is not discarded—it is added back to the LSB.
A compact way to see it algebraically:
- Let the true (ideal) integer values correspond to one’s complement interpretation.
- The raw -bit adder effectively computes:
- If exceeds the representable range, there will be a carry-out such that:
- End-around correction replaces discarding the term by adding back :
Mermaid view of the “wrap”
type="tip" title="Pro Tip" content="In one’s complement arithmetic, always ask: “Did the adder produce a carry out of the MSB?” If yes, you must perform end-around carry correction by adding that carry back into the LSB."
type="warning" title="Common Confusion" content="End-around carry correction is not the same as two’s complement overflow handling. In two’s complement, overflow is typically handled by checking the overflow flag, and you do not add the MSB carry back into the LSB."
End-around carry correction vs. typical two’s complement handling
Qualitative comparison of what you do with carry-out from the MSB.
Where End-Around Carry Correction Appears
One’s complement numbers
Representation levelNegatives are bitwise inverted; arithmetic must preserve the defined numeric mapping."
MSB carry-out is produced
Adder stageNormal addition yields an -bit sum plus a carry-out."
End-around carry correction
Correction stageIf carry-out=1, add it back to the LSB."
Further arithmetic / comparisons
Result usageCorrected word is treated as the canonical one’s complement sum."
FAQ: End-Around Carry Correction
Knowledge Check
In one’s complement addition, what do you do if the adder produces a carry-out from the MSB?