The Number System

ABHISHEK
The Startup
Published in
6 min readJun 3, 2020
Number system
The Number System by Splash Math

We all have been working with numbers since our childhood. But did you know that the decimal representation, the number system we all have been familiarized with from the start, is only one of the many type of number system available out there?

WHAT IS A NUMBER SYSTEM ?

The Number System, also known as the Numeral System, is the system of naming or representing numbers. Most of us who haven’t heard the term binary or octal or hexadecimal are likely only familiar with the decimal system in which we represent numbers using digits 0 to 9. But, the representation of a given number changes as we change the base. But, wait…what’s a base?

BASE IN A NUMBER SYSTEM

In, Number System, a Base or Radix is the number of different digits or combination of digits and letters that a system of counting uses to represent numbers.

The most common number system used today is the Decimal Number System in which the base is 10 (because dec means 10). This means that, in our decimal system, we use a total of 10 digits to represent any number in that system.

In the same way, there are other Number Systems as well that use a different base to represent all the numbers in that system. There are a few commonly used Number Systems which are described below.

COMMONLY USED NUMBER SYSTEMS

  • Decimal Number System (Base-10) — As we all know, this system uses 10 digits from 0 to 9 to represent any number.
  • Binary Number System (Base- 2) — This system uses 2 digits which are 0 and 1 for number representation. For example, the number 10 in decimal is represented as 1010 in binary.
  • Hexadecimal Number System (Base-16) — This system uses 16 digits which are 0 to 10 and A to F ( YES ! Letters in numbers) for number representation. For example, the number 30 in decimal is represented as 1E in binary.
  • Octal Number System (Base- 8) — This system uses 8 digits from 0 to 8 for number representation. For example, the number 9 in decimal is represented as 11 in octal.
Number system conversion

NUMBER SYSTEM CONVERSION

How do we interpret a number in another number system? Well, for us (for now), interpreting a number from different system means knowing its value in our well known decimal numbering system since that’s the system we have been familiar till now. We will learn to read the different numbers in different system in the same way we learnt to read decimal numbers. How do we read a number like 9,05,000 ? We start from right-most digit and take its base value as 1(10⁰) and each time we move one digit to left the base value increases by 10 times(10¹, 10², and so on…) the previous base value, right ? And at last we sum the products of all digits of multiplied by their respective base value. Well, its done in the same fashion in all number systems.

  • Binary Numbers — Let’s take our binary number to be 101010.
Representing a binary number as a decimal number

To convert the number into decimal system, we start from the right-most digit (commonly known as Least Significant Bit or LSB). In the adjoining image, we can see the base value of each digit . We increment it in the same way as we did for decimal system moving towards left. But, since our base in this case is 2, so our base value progresses as 2⁰, 2¹, 2² and so on… as we go towards left. So our binary number — 101010 can be converted to decimal number system using base value of each digit, multiplying it by the corresponding digit and summing them all. So 101010 in binary is equivalent to —

( 0 x 2⁰ ) +(1 x 2¹) +( 0 x 2²) +(1 x 2³) +( 0 x 2⁴) +(1 x 2⁵) = 42
  • Hexadecimal Numbers — Let’s take a hexadecimal number- 5C8A.
Representing a hexadecimal number as a decimal number

We will convert this number into decimal equivalent number in the same way as we did before. We start from LSB, and take the starting base value to be 16⁰. We increment it in the same way moving towards left. So our base value will be 16⁰, 16¹, 16², and so on… as we go towards left.One small difference is we have A to F letters in our hexadecimal format. We just consider them to be numbers after 9, i.e , A-10, B-11, C-12, D-13, E-14,F-15. So, lets convert 5C8A in hexadecimal to its equivalent decimal number

( 10 x 16⁰ ) + ( 8 x 16¹ ) +( 12 x 16² ) +( 5 x 16³ ) = 23690

And lastly, octal (As you must have guessed, they have base 8) are converted into decimal format in the same way. With the knowledge you have gained so far, try and see if you can now convert it on your own !

WHY ALL THE COMPLEXITY ?

Why the seemingly unnecessary complexity in numbering?

Well, because only one number system can’t be put into all kinds of applications. We all are very familiar with decimal numeral system and are very comfortable with performing operations using this system. But other application require us to use different system for efficient operations.

  • Binary System In computers, we use binary language. A computer only understands binary numbers- 0s and 1s. All you are type, read, store or do any operation on computer, at the very fundamental level, it’s processed by computer as sequence of 0s and 1s. Using binary system helps to keep the calculations simple and to keep the amount of necessary circuitry less which results in the least amount of space, energy consumption, and cost.
  • Hexadecimal system — Hexadecimal numbering system is often used by programmers to simplify the binary numbering system. Few examples where hexadecimal numbering is used includes defining locations in memory, storing colors(#RRGGBB where each is an hex digit), MAC addressing, IPv6 addressing,etc.
  • Octal System — Octal used to be used widely within IT basically how hexadecimal is used today. It was used as an ideal abbreviation of binary because the bit size (amount of bits that could be handled at one go) of the CPUs that were used at the time that being 26 and 36 bit. However, now-a-days, hexadecimal have become more popular with the advent of modern computers.

Apart from these, there are various other numbering system as well which are less-popular but still used. They all serve their purpose in one application or another. Understand the different kinds of number representations help us gain a better understanding of how number systems work in general.

--

--