# Basic number systems commonly used in computers

This post is lesson 6 of 42 in the subject Computer Hardware

To perform calculations and process information, people have created different number systems. Let’s learn the basic number systems commonly used in computers.

## 1. What is the number system?

The number system is a set of symbols (digit, letter) to represent numbers. Each number system consists of a finite set of digits. The number of digits of each number system is called “base” or “radix”.

The basic number systems in computers are:

• Binary number system – base 2
• Octal number system – base 8
• Decimal number system – base 10
• Hexadecimal number system – base 16

## 2. Binary number system (base 2)

• Represented by 2 digits: 0 and 1
• Binary numbers have the form: A(2)=anan-1an-2…a0.-1a-2…a-m
• The value of A in base 10 is calculated as follows: A(10)=an2n+an-12n-1+an-22n-2+…+a020+a-12-1+a-22-2+…+a-m2-m
• Example: 101(2) = 1.22 + 0.21 + 1.20 = 5(10)

## 3. Octal number system (base 8)

• Represented by 8 digits: 0, 1, 2, 3, 4, 5, 6, 7
• Octal numbers have the form: A(8)=anan-1an-2…a0.-1a-2…a-m
• The value of A in base 10 is calculated as follows: A(10)=an8n+an-18n-1+an-28n-2+…+a080+a-18-1+a-28-2+…+a-m8-m
• Example: 43(8) = 4.81 + 3.80 = 35(10)

## 4. Decimal number system (base 10)

• Represented by 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Decimal numbers have the form: A(10)=anan-1an-2…a0.-1a-2…a-m
• The value of A in base 10 is calculated as follows: A(10)=an10n+an-110n-1+an-210n-2+…+a0100+a-110-1+a-210-2+…+a-m10-m
• Example: 536(10) = 5.102 + 3.101 + 6.100 = 536(10)