I’ve noticed a grouping method when converting from binary to hexadecimal and binary to octal.
When converting from binary to octal, my math book says to group the binary numbers into groups of three, starting from the right. Also, it says to pad zeroes to the left of the last number, if the amount of binary numbers isn’t divisible by three.
When converting from binary to hexadecimal, the books tells you to do the same as one would for binary to octal. However, the book tells you to make groups of four, rather than three.
Can someone point me in the direction of where I might find the reason for this method?
I can, somewhat, understand groups of four going from binary to hexadecimal because four is a factor of sixteen, which, of course, are the number of digits in hexadecimal, but, that doesn’t hold for binary to octal, because three isn’t a factor of eight.
Any help would be appreciated. Thanks!
Happy (early) Pi Day!


An analogy: Converting from base ten to base one thousand is very easy (and familiar). The place values are ones, thousands, millions, billions, etc. It works out very well because one thousand is an exact power of ten. Digits are a bit of a problem in base one thousand since we don't have a thousand digit symbols. But there's a simple solution: commas. So the base ten numeral $38219746081$ becomes the base thousand numeral $38,219,746,081$ (thirty-eight billions, two hundred nineteen millions, seven hundred forty-six thousands, eighty one units).
A very similar thing happens from binary to octal because eight is an exact power of two. So we could write the binary numeral $1101000111010$ as an octal numeral in the form $1,101,000,111,010$, where each grouping of three bits takes up one octal place. However, because we only need eight symbols for octal digits, we just use the familiar symbols and write this number as $15072_{\rm eight}$
Tldr: Base conversions are easy if one base is a power of the other base.