Carry propagation [mp]
Micro pattern¶
Description¶
Pass overflow from one positional digit or bit to the next more significant position.
Problems¶
Decimal carry¶
Separate an output digit from its carry with quotient and remainder.
- 66. Plus One (Top Easy)
- 2. Add Two Numbers (Top Medium)
- 445. Add Two Numbers II (Google Prep)
Binary carry¶
Compute sum bits with XOR and carry bits with AND and a left shift.
- 371. Sum of Two Integers (Top Medium)