All about Number Systems

Chitti Naidu
5 min readJul 14, 2021
Photo by Nick Hillier on Unsplash

From college to career, shopping to social media the only thing that never leaves us Number. Number systems are required for us to understand how computers calculate and process signals. Here we are going to discuss Base-n Number Systems.

Decimal Number System or Base-10 Number System

The decimal number system is a basic system that we use every time we need to deal with numbers. The digits are from 0 to 9 which is a total of 10 digits to the name Base-10.

Example: 5, 89,60

Generally, a number expressed in a base-n system has coefficients multiplied by powers of r. And the number is represented with a base ‘r’.

(101)₁₀ represent Hundred and One in The decimal number system, as (101)₂ represents 5 in the binary number system.

Here a from n to -m are coefficients and r is the base value

Binary Number System or Base-2 number system

Binary means having only 2 things 0 and 1. All electronics devices from calculators to computers use only 0’s and 1’s to perform calculations. Since only two digits are there, it is called the base-2 number system.

Example: 1001, 11001.

Octal number system or base-8 number system

Octal similar to the decimal number system but limited to digits from 0 to 7 total of 8.

Example: (245) translated to (165)₁₀

The hexadecimal number system of the base-16 number system

Hexa means 16. Extending the decimal number system 0 to 9, it also includes letters A, B, C, D, E, and F which translates to 10, 11, 12, 13, 14, and 15 respectively in the decimal system.

Example: (A58C)₁₆ translated to (42380)₁₀

Conversions

Decimal to Binary

To convert the digits before the decimal point the number is repeatedly divided by 2 it becomes 0 and note from bottom to up and to convert the digits after the decimal point, multiply by 2 till we get 0 or required accuracy is obtained

Example: (714)₁₀ = (1011001010)

Example: (0.24)₁₀ = (0.001111010111)₂

Decimal to Octal and Decimal to Hexadecimal

Same as a decimal to binary, for octal divide with 8 before the decimal point and note down from bottom to top and multiply by 8 after the decimal point and note down from top to bottom. And for hexadecimal divide with 16 before the decimal point and multiply by 16 after the decimal point.

Example: (714)₁₀ = (1312) = (2CA)₁₆

Binary to Decimal

Multiply each digit in the binary code with raised power of 2, while power increasing by 1 from binary point to left starting from 0and decreasing by 1 from binary point to right starting from -1.

Example:

  • (1 0 1 1 0 0 1 0 1 0) = (714)₁₀
  • (0.0 0 1 1 1 1 0 1 0 1 1 1)₂ = (0.24)₁₀

Binary to Octal, Octal to Binary and Binary to Hexadecimal, Hexadecimal to Binary

All four conversions are similar and based upon the table given above.

  • When converting from Binary to Octal, starting from the right for the integer part, group three digits and starting from left for fraction part, group three digits. In the end, if 3 binary digits are not there append 0s as required.
  • When converting from Octal to Binary, write each digit in the binary form respectively.
  • When converting from Binary to Hexadecimal, starting from the right for the integer part, group four digits and starting from left for fraction part, group three digits. In the end, if 4 binary digits are not there append 0s as required.
  • When converting from Hexadecimal to Binary, write each digit in the binary form respectively.

Example:

  • (1312) = (0 0 1 0 1 1 0 0 1 0 1 0)
  • (0.1727)₈ = (0.0 0 1 1 1 1 0 1 0 1 1 1)₂
  • (2CA)₁₆ = (0 0 1 0 1 1 0 0 1 0 1 0)₂
  • (0.3D70)₁₆ = (0. 0 0 1 1 1 1 0 1 0 1 1 1 0 0 0 0)₂

Octal to Hexadecimal and Hexadecimal to Octal

To convert from Octal to Hexadecimal or Hexadecimal to Octal, first, convert them to binary and from binary to respective form.

Example: (2 C A) = (0 0 1 0 1 1 0 0 1 0 1 0) = (1 3 2 1)₁₆

Now we have understood what are number systems and how to convert them from one base to another. There are other ways for conversion apart from these. You can use what ever easy for you.

Thank you for stopping by. Keep learning!

Please comment if corrections required.

Reference

‘’Digital Design’’ by Morris Mano.

--

--