How to use the Binary to Base 7 tool
- Type or paste the bits into the Binary number box. Leave out spaces and separators.
- Select Convert to express the same value in base 7.
- Read the septenary digits in the Result box.
- Select Copy to keep the result, or Clear to empty the form.
Base 7 and the seven-day week
Septenary place values are 1, 7, 49, 343 and 2,401. The clearest everyday use is time: a count of days written in base 7 separates whole weeks from leftover days. Forty-five days is 63 in base 7, which reads as six weeks and three days.
The last digit of a base-7 number is its remainder when divided by seven. That is exactly the quantity calendar code needs. If today is a Monday, the weekday 45 days from now is three days later, a Thursday.
Binary to base 7 worked example
Take the sample 101101. Its decimal value is 32 + 8 + 4 + 1 = 45. Dividing by seven gives 6 with a remainder of 3, and 6 is already less than seven. The digits are therefore 6 and 3.
For 1100100, which is 100: 100 / 7 = 14 remainder 2, 14 / 7 = 2 remainder 0, and 2 / 7 = 0 remainder 2. Reading upward gives 202, or two 49s and two units.
101101 -> 63
1100100 -> 202
110001 -> 100 (49 is 7 squared)
11111111 -> 513Why seven is an awkward radix
Seven is prime and unrelated to two, so nothing about a binary string hints at its base-7 form. There is no grouping trick and no trailing-zero rule to carry over. A septenary number ends in 0 only when the value is a multiple of seven.
Fractions are awkward too: among unit fractions only sevenths and their powers terminate. This tool sidesteps the issue by handling whole numbers only. A binary point in the input is rejected as an invalid digit.
Accepted input
Give the converter one integer per run. These rules decide what the Binary number box will take and what is turned away.
- Bits must be contiguous. 1010 1010 fails, 10101010 works.
- Put a minus sign first for a negative number. -101101 returns -63.
- 0b101101 is accepted. The prefix is removed before conversion.
- Zeros at the front are harmless and do not appear in the result.
- Inputs longer than 4,096 characters are refused.
Frequently asked questions
What digits does base 7 use?
Base 7 uses seven digits: 0, 1, 2, 3, 4, 5 and 6. Seven is written 10, and forty-nine is written 100. The digits 7, 8 and 9 never occur in a septenary number.
How do I change binary into base 7 manually?
Add up the place values of the 1 bits to get the decimal value, then divide by 7 again and again. The remainders, taken in reverse order, form the base-7 number.
How can base 7 help with dates?
Write a number of days in base 7 and everything left of the last digit is the count of whole weeks, in base 7, while the last digit is the number of extra days. That last digit gives the weekday offset.
Is there a shortcut from binary to base 7?
Not a digit-level one. Because 7 is not a power of 2, each output digit depends on the whole input. Software does it with big-integer division, as this tool does.
How do I go from base 7 back to binary?
Open the Base 7 to Binary tool and enter the septenary digits. Entering 63 there returns 101101.