<aside> 💡

Computers think in binary (base 2) but speak in hexadecimal (base 16) – a curious duality that shapes how they process and represent data.

</aside>

The base of a number system determines how much each column's value increases compared to the column’s on its right.

eg. In our universal base 10 system, each column represents a value 10 times the column to its right. Each has a set of digit symbols, the number of which is equal to the base. In our base 10, we have 10 symbols, from 0 to 9.

Note: In any given number base, the base itself can never be expressed in a single digit! Why? → Because in any base-N system, the digits only represent values from 0 to N-1, so N itself always requires two digits (written as "10").

Octal

octal applies the same rule that I talked about i.e. each column has a value 8 times that of the next column to the right.

Now, here comes the weird stuff. Counting in octal goes like 1, 2, 3, 4, 5, 6, 7, 10..and so on.

So where did the 8 and 9 go? apparently its still there but with different name.

In Octal, when we say 10, actually mean 8 and 11 means 9.

Weird right? i don’t know about you but i was definitely confused and curious after hearing that. Let me tell you the simple why behind this:

→ Think of a number system like a bucket that can only hold a certain number of digits before it overflows into the next column.

→ In octal (base 8), you have only eight digits: 0, 1, 2, 3, 4, 5, 6, and 7.

→ Now, when you count in decimal (base 10), after 9, you run out of digits and roll over to 10 (which means "one group of ten and zero left").

→ Similarly, in octal: