DEV Community

Kevin Naidoo
Kevin Naidoo

Posted on

The math of BASE-10 and binary

Do you know that in math, we count from 0, and then the single digits stop at 9?

This is the base 10 system. We only have 10 symbols to represent numbers (0-9). There's no "10" or "11"; all these numbers are a combination of the 0-9 symbols.

I say "symbol" because this is the foundation of language and math. At some point in our history we just drew a bunch of shapes and then associated meaning to those shapes.

For example, we all know this is the "screaming" emoji 😱. It seems obvious now, but show this to someone from a thousand years go, chances are they'll have no clue what this means.

For math, we chose 0-9, but at some point in our counting, we ran out of numbers. This is why we have the base-10 system.

Every time we get to 9. We have no more symbols to represent these numbers, thus, we replace each 9 with a zero and add a 1 in front.

9 -> 10
99 -> 100
999 -> 1 000
Enter fullscreen mode Exit fullscreen mode

In binary, each digit represents an electrical signal "on" or "off", so there's not much more symbolism needed, hence why 0-1 was selected.

Anyway, if you want to learn how to convert from binary to base-10 and learn more about essential engineering concepts you need to understand as a programmer, please check out my recent Engineering 101 tutorial here.

Retry later

Top comments (0)

Retry later