Skip to content
technique

Digit-by-Digit Arithmetic

Perform arithmetic or numeric transformation directly over a digit representation, maintaining position-wise state such as carry, borrow, partial products, or reconstructed digits.

Tagged articles

Digit-by-Digit Arithmetic articles

4 articles in this tag.

Lush green pine tree with a vibrant blue sky background, perfect for nature-themed projects.
beginner
11 min read

Add Binary

You receive two binary strings, a and b, and must return their sum as another binary string. The inputs contain only '0' and '1', have lengths from 1 to…

View solution
A person working on a laptop with a red notebook and glasses on a white table.
intermediate
10 min read

Add Two Numbers

The lists already expose digits in the order addition needs. Scan both lists together, track one carry, and keep going until there is no digit or carry…

View solution
Detailed view of tree trunk with visible growth rings, showcasing natural wood texture.
intermediate
10 min read

Multiply Strings

Treat the product as a fixed array of decimal positions. Every digit pair has a predictable destination; carry normalization keeps those positions valid.

View solution
Business professionals reviewing analytics on a tablet during a meeting.
beginner
9 min read

Plus One

Adding one looks trivial until the last digit is 9. Then the problem becomes a compact state-tracking exercise: start where arithmetic begins, propagate a…

View solution