Decimal to Binary
Write a non-negative base-ten integer in binary while keeping its exact value.
Write a non-negative base-ten integer in binary while keeping its exact value.
How to use
- Enter 1025 using decimal digits only.
- Convert to binary and read the digits from right to left to identify the set bits.
- Compare the set bits with the powers of two that sum to the input.
Worked example
Input
1025Expected result
10000000001Check the result
Only the positions for 1024 and 1 are set in the result.