Numbers Systems & Computers

Shiro Han
4 min readJun 17, 2020

In the early days of the human race, lines were scratched into bones or cave walls in order to keep count. This obviously wasn’t the most efficient way to communicate the number of things, so mankind came up with several other number systems before deciding on a universal one. In the modern era, every child learns the 10 digit number system from a young age and uses them for the rest of their life. Similarly, every computer operates using the binary number system as its fundamental building blocks.

Instead of the 10 numbers we are familiar with, binary is only comprised of 2 numbers: 0 and 1. Instead of the numbers going up to nine and then wrapping around to make a 2 digit number at ten, there are only two numbers and they wrap around each time the rightmost digit reaches 1.

While it seems to be against common sense to use less digits when computers are working with far more data than humans are, it is because of the way computers (and humans) are made that they use this number system. Humans have 10 fingers, which is why it’s so easy to count in multiples of 10. The hardware for a computer is comprised of many different electrical charges. While it’s true that there are many varying degrees of charge, it is much more efficient to read charges as either off or on (0 or 1) rather than try and make 10 different numbers based on the amount of charge. A single unit of this type of data is called a bit, and 8 bits are grouped together to make a byte. Bytes are grouped together to create the almost too familiar megabytes and gigabytes we use everyday. 8 is a much more practical group for computers to deal with than 10 because 8 is a power of 2 (2³). Powers of 2 fit neatly into a base 2 system, similarly to how powers of 10 fit neatly into human’s base 10 system. Any calculations done with a power that fits into the system that calculation will be much easier to do. (In base-10, it is much easier to multiply any number by 10 than it is to multiply a number by 7.)

If you’re a beginner programmer and are wondering when you need to learn binary math, chances are that you already have worked with it! A boolean is a data type that only has 2 values. The same boolean logic you use with AND/OR operators is the same way computers produce calculations.

Number systems aren’t just limited to base 10 and binary. Hexadecimal is a number system that has 16 digits, and acts like a bridge between the other 2 number systems. The first 10 digits are the same as our base 10 numbers: 0–9. The next 6 are the letters A-F. At this point, you might be wondering how is it possible for a number system with more digits than the other two combined to be more efficient than doing everything in base 10. The answer is simple; 16 is a power of 2 (2⁴) while 10 is not. Binary can be converted way more efficiently into a power of 2 more effectively than base-10. Hexadecimal is also way easier for a human programmer to work with than binary; it’s much closer to base-10. It also holds the same amount of data as binary but in less characters.

Maybe one day, someone will create another number system useful enough to be commonly used like how our ancestors created base-10 many millennia ago. Until then, the main number systems used by mathematicians and programers will be base-10, binary, and hexadecimal.

--

--

Shiro Han

Software Engineering Student at the Flatiron School. Fighting Game Nerd