Solution - Base conversion
B04
Step-by-step explanation
1. Parse base conversion function input
Identify the source number, source base, and target base before converting through base 10.
2. Convert source to base 10
Since the source base is 10, no expansion change is needed.
The source is already base 10, so the base-10 value stays .
3. Conclude target-base conversion
Use repeated division by the target base.
Record quotient and remainder for this division cycle.
Record quotient and remainder for this division cycle.
Record quotient and remainder for this division cycle.
Read remainders from last to first to form target-base digits.
Final converted representation in the target base.
Repeatedly divide by , collect remainders, and read them in reverse to get .
Why learn this
Learn more with Tiger
Base conversion is foundational for computer science, digital systems, and number theory.