You are on page 1of 5

NUMBER SYSTEM

The study of number systems is useful to the student of computing due to the fact that
number systems other than the familiar decimal(base 10) number system are used in the
computer field.
Digital computers internally use the binary (base 2) number system to represent data
and perform arithmetic calculations. The binary number system is very efficient for
computers, but not for humans. Representing even relatively small numbers with the binary
system requires working with long strings of ones and zeroes. The most common number
systems are the decimal, binary, octal and hexadecimal system.

DECIMAL SYSTEM
The decimal system is the most familiar to us because we use this number system in
our daily activities. It has a radix or base of 10 and is composed of the numbers or symbols 0,
1, 2, 3, 4, 5, 6, 7, 8 and 9. The place value of the number right next to the left of a number is
ten times greater. To illustrate, see examples below.

Example 1.
2,58310 = (2 x 103) + (5 x 102) + (8 x 101) + (3 x 100)
= 2, 000 + 500 + 80 + 3
= 2, 58310

Example 2.
757.1510 = (7 x 102) + (5 x 101) + (7 x 100) + (1 x 10-1) + (5 x 10-2)
= 700 + 50 + 7 + 0.1 + 0.05
= 757.1510

BINARY SYSTEM
The binary system has a radix or base of 2 and is composed of two numbers only.
These numbers are 0 and 1, which may correspond to OFF and ON or HIGH and LOW
respectively in digital circuits. The place value of the number right next to the left of a
number is two times greater. To determine the value of a binary number in decimal, see
examples below.

Example 1.
10,1112 = (1 x 24) + (0 x 23) + (1 x 22) + (1 x 21) + (1 x 20)
= 16 + 0 + 4 + 2 + 1
= 2310

Example 2.
101.1112 = (1 x 22) + (0 x 21) + (1 x 20) + (1 x 2-1) + (1 x 2-2) + (1 x 2-3)
= 4 + 0 + 1 + 0.5 + 0.25 + 0.125
= 5.87510

OCTAL SYSTEM
The octal system has a radix or base of 8 and is composed of numbers or symbols 0, 1,
2, 3, 4, 5, 6 and 7. The place value of the number right next to the left of a number is eight
times greater. To determine the value of an octal number in decimal, see examples below.

Example 1.
17628 = (1 x 83) + (7 x 82) + (6 x 81) + (2 x 80)
= 512 + 448 + 48 + 2
= 101010

Example 2.
345.628 = (3 x 82) + (4 x 81) + (5 x 80) + (6 x 8-1) + (2 x 8-2)
= 192 + 32 + 5 + 0.75 + 0.25 + 0.03125
= 229.7812510

HEXADECIMAL SYSTEM
The hexadecimal system has a radix or base of 16 and is composed of numbers or
symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. The number or symbols A, B, C, D, E and
F has the value of 10, 11, 12, 13, 14 and 15 respectively in decimal system. The place value
of the number right next to the left of a number is sixteen times greater. To determine the
value of a hexadecimal number in decimal, see the following examples.

Example 1.
1AC216 = (1 x 163) + (10 x 162) + (12 x 161) + (2 x 160)
= 4096 + 2560 + 192 + 2
= 685010

Example 2.
F4.A216 = (15 x 161) + (4 x 160) + (10 x 16-1) + (2 x 16-2)
= 240 + 4 + 0.625 + 0.0078125
= 244.632812510

CONVERSION OF DECIMAL TO BINARY


Steps:
1. For whole numbers, divide whole numbers continuously by 2 and place the remainders
at the right until the result becomes zero.
2. Copy the remainders from the bottom going to the top.
3. For fractional part(if any), multiply the fractional part continuously by 2 until the result
becomes zero.
4. Copy the numbers before the decimal point in downward direction.

Example 1. Convert the decimal number 2310 to binary.


Solution:
23 ÷ 2 = 11 remainder 1
11 ÷ 2 = 5 remainder 1
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
---stop---
Therefore, 2310 = 101112

Example 2. Convert the decimal number 15.125 10 to binary.


Solution:
For whole numbers For the fractional part
15 ÷ 2 = 7 remainder 1 0.125 x 2 = 0.25
7 ÷ 2 = 3 remainder 1 0.25 x 2 = 0.5
3 ÷ 2 = 1 remainder 1 0.5 x 2 = 1.0
1 ÷ 2 = 0 remainder 1 ---stop---
---stop---

Therefore, 15.12510 = 1111.0012

CONVERSION OF DECIMAL TO OCTAL


Steps:
1. For whole numbers, divide whole numbers continuously by 8 and place the remainders
at the right until the result becomes zero.
2. Copy the remainders from the bottom going to the top.
3. For fractional part(if any), multiply the fractional part continuously by 8 until the result
becomes zero.
4. Copy the numbers before the decimal point in downward direction.
Example 1. Convert the decimal number 17510 to octal.
Solution:
175 ÷ 8 = 21 remainder 7
21 ÷ 8 = 2 remainder 5
2 ÷ 8 = 0 remainder 2
---stop---
Therefore, 17510 = 2578

Example 2. Convert the decimal number 253.1875 10 to octal.


Solution:
For whole numbers For the fractional part
253 ÷ 8 = 31 remainder 5 0.1875 x 8 = 1.5
31 ÷ 8 = 3 remainder 7 0.5 x 8 = 4.0
3÷8=0 remainder 3 ---stop---
---stop---
Therefore, 253.187510 = 375.148

CONVERSION OF DECIMAL TO HEXADECIMAL


Steps:
1. For whole numbers, divide whole numbers continuously by 16 and place the
remainders at the right until the result becomes zero.
2. Copy the remainders from the bottom going to the top.
3. For fractional part(if any), multiply the fractional part continuously by 16 until the result
becomes zero.
4. Copy the numbers before the decimal point in downward direction.

Example 1. Convert the decimal number 2873210 to hexadecimal.


Solution:
28732 ÷ 16 = 1795 remainder 12 or C
1795 ÷ 16 = 112 remainder 3
112 ÷ 16 = 7 remainder 0
7 ÷ 16 = 0 remainder 7
---stop---

Therefore, 2873210 = 703C16


Example 2. Convert the decimal number 983.03125 10 to hexadecimal.
Solution:
For whole numbers For the fractional part
983 ÷ 16 = 61 remainder 7 0.03125 x 16 = 0.5
61 ÷ 16 = 3 remainder 13 or D 0.5 x 16 = 8.0
3 ÷ 16 = 0 remainder 3 ---stop---
---stop---
Therefore, 983.0312510 = 3D7.0816

CONVERSION OF BINARY TO OCTAL


Steps:
1. Starting at the decimal point, divide the binary digits into groups containing three digits
going to the left and to the right. If the number of digits is less than three, add zero/s to
complete three digits as one group.
2. In every group, write the corresponding equivalent of the binary number in octal and
bring down the decimal point.

Example:
Convert the binary number 11011101.01001112 to octal
Solution:

011 011 101. 010 011 100


3 3 5 . 2 3 4

Therefore, 11011101.01001112 =335.2348

CONVERSION OF BINARY TO HEXADECIMAL


Steps:
1. Starting at the decimal point, divide the binary digits into groups containing four digits
going to the left and to the right. If the number of digits is less than four, add zero/s to
complete four digits as one group.
2. In every group, write the corresponding equivalent of the binary number in
hexadecimal and bring down the decimal point.

Example:
Convert the binary number 11011101.01001112 to hexadecimal

Solution:
1101 1101. 0100 1110
13 13 . 4 14
or
D D. 4 E

Therefore, 11011101.01001112 = DD.4E16

Note: To convert hexadecimal to binary, just reverse the process above.

CONVERSION OF OCTAL TO HEXADECIMAL


To convert octal numbers to hexadecimal, it should either converted first into decimal
or into binary then to hexadecimal. The two processes will be illustrated below.

Example: Convert 6248 to hexadecimal


Solution:
First method
Octal → Decimal → Hexadecimal
6248 = (6 x 82) + (2 x 81) + (4 x 80) 404 ÷ 16 = 25 remainder 4
= 384 + 16 + 4 25 ÷ 16 = 1 remainder 9
= 40410 1÷ 16 = 0 remainder 1

Therefore, 6248 = 19416


Second method
Octal → Binary → Hexadecimal

6 2 4
110 010 100
Therefore, 6248 = 19416

0001 1001 0100


1 9 4

You might also like