B1.1 Module 5.2
B1.1 Module 5.2
B1.1 Module 5.2
MODULE 5
Sub Module 5.2
NUMBERING SYSTEMS
Contents
INTRODUCTION................................................................................... 1
NUMBERING SYSTEMS ...................................................................... 2
GENERAL ............................................................................................. 3
DECIMAL NUMBER SYSTEM ............................................................. 4
BINARY NUMBER SYSTEM ................................................................ 4
OCTAL NUMBER SYSTEM ................................................................. 4
HEXADECIMAL NUMBER SYSTEM ................................................... 5
DECIMAL TO BINARY CONVERSION ................................................ 6
DECIMAL TO OCTAL CONVERSION ................................................. 8
DECIMAL TO HEXADECIMAL CONVERSION ................................. 10
BINARY TO DECIMAL CONVERSION .............................................. 12
BINARY TO OCTAL CONVERSION .................................................. 13
BINARY TO HEXADECIMAL CONVERSION.................................... 15
OCTAL TO BINARY CONVERSION .................................................. 17
OCTAL TO DECIMAL CONVERSION ............................................... 19
OCTAL TO HEXA DECIMAL CONVERSION .................................... 20
HEXADECIMAL TO BINARY CONVERSION.................................... 20
HEXADECIMAL TO OCTAL CONVERSION ..................................... 21
HEXADECIMAL TO DECIMAL CONVERSION ................................. 22
INTRODUCTION
Since the early days of civilization, man has been using The basic distinguishing feature of a numbering system is its
numbers for the purpose of counting quantities in his base or radix. The base indicates the number of distinct
environment. Early men could have started this concept with symbols or numerals used to represent quantities in that
strokes on the bark of a tree. Fortunately, the human anatomy number system. In digital electronic systems, a base-2 system
came with an in-built counting machine – the fingers! The ten could be implemented with better convenience than a base-10
fingers in the two hands, which we have been using instinctively system. Such a system is called binary, and has the two
for counting since childhood, are said to have formed the basis numerals: 0 and 1. The two numerals in the binary system can
of a number system based on ten. That system is called the be represented conveniently with two discrete levels of voltage.
decimal number system. This could be implemented with electronic switching devices
such as transistors. For example: transistor on – binary 0,
The basic symbols used in a number system are called transistor off –binary 1. Binary numbers become long strings of
numerals. The decimal number system has ten numerals: 0, 1, 0s and 1s for large values. Therefore base-8 (octal) or base-16
2, 3, 4, 5, 6, 7, 8, and 9. Any higher number can be formed with (hexadecimal) is typically used in representing large numbers.
a proper combination of these numerals. Any of the ten However, the electronic implementation of these number
numerals is called a digit. For example 83516 is a five-digit systems also is in the binary form, using the same hardware like
number. Incidentally, in anatomy, digit is a finger or a toe. In a switching transistors. A binary digit is given the name bit.
number, the leftmost bit is called the most significant bit and the
rightmost bit is called the least significant bit, owing to the
weight assigned by the position. For example, in the number
83516, if we substitute 8 with 9, the resulting number would
increase its value by 1000, whereas substituting 6 with 9
changes the value by just 3. Thus numbers to the right
contribute less to the value of the number, and hence less
significant.
NUMBERING SYSTEMS numbers have different values is that digits of different values
occupy positions of different weights:
The majority of digital computers are wired to understand one
particular code. This code usually is not the English language
102 101 100
or the decimal numbering system but is instead the binary
numbering system. A binary code capable of representing 3 6 5
letters of the alphabet, decimal numbers, punctuation marks
and special control symbols is used by most digital computers The first position 100 carries a weight of one. (Any number,
on the market today. Before discussing the binary numbering except zero, when raised to the zero power is equal to one).
system and its use in computers, a few rules concerning all
numbering systems will be presented. The second position 101 carries a weight of 10 and the third
position 102 carries a weight of 100 etc. Note that each position
There are three basic characteristics of any number system;
is ten times greater than the preceding position.
BASE (OR RADIX).
Each digit in a number has a value which exists between zero
and the value of the base minus one. For example in the
POSITION VALUE. decimal system, the digits range in value from zero to nine.
Nine is one less that the base of the system which is ten.
DIGIT VALUE.
The position of a digit, counting from the right hand end, The base-8 number system is called octal and it has got the
determines its weight. The least significant digit (2) of the above symbols: 0, 1, 2, 3, 4, 5, 6, and 7. A four-digit octal number is
number represents the number of units and the next one (7) the assessed below in the weighted system for finding the decimal
number of tens followed by the number of hundreds and the equivalent:
number of thousands. Similarly, a number with a decimal point
can be broken down as follows: 4372(8) = (4 x 8 3 + 3 x 8 2 + 7 x 8 1 + 2 x 8 0)
= (2048 + 192 + 56 + 2)10
34.72 = 30 + 4 + 7/10 + 2/100 = 2298(10)
= 3 X 10 1 + 4 X 100 + 7 x 10-1 + 2 x 10-2
1. The first method involves breaking the number down into a Successive
succession of numbers that are each powers of 2 and then Division Remainder
placing the relevant digit (either a 0 or a 1) in the respective
digit position. 2 19 1
29 1
24 0
Example: 22 0
21 1
SELF TEST
(a) 25
(b) 43
(e) 132
(c) 65
Successive Remainder
Division
8 95 7
8 11 3
8 1 1
0
9510 = 1378
SELF TEST
(a) 25
(b) 43
(e) 13
(c) 65
Decimal to hexadecimal conversion is achieved through Example 2: Convert 103 into hexadecimal form.
successive division of the decimal number by 16. The
remainder, when recorded in the reverse order, would read the
hexadecimal equivalent.
Successive Remainder
Division
16 572 C
16 35 3
16 2 2
0
SELF TEST
(a) 25
(b) 43
(e) 13
(c) 65
In order to convert a binary number to its equivalent decimal Convert the following binary numbers to decimal:
number we can determine the value of each successive binary (a) 10101
digit, multiply it by the column value (in terms of the power of (b) 110011
the base) and then simply add the values up. For example, to (c) 1001001
convert the binary number 1011, we take each digit and multiply (d) 10101011
it by the binary weight of the digit position (8, 4, 2 and 1) and (e) 1111.111
add the result, as shown in Fig.
Example:
11101110102 = 16728
11101110102 = 16728
SELF TEST
(a) 101110
(b) 111111000
(e) 100011100
(c) 10101010
Hexadecimal equivalent: 2 B A
10101110102 = 2BA16
SELF TEST
(a) 101110
(b) 111111000
(e) 100011100
(c) 10101010
Octal numbers can be converted to binary by converting each Decimal Binary Octal
digit into binary in a three-bit format.
1 001 01
Example 1: Convert 36748 into binary form.
2 010 02
Octal digits 3 6 7 4 3 011 03
Binary equivalent: 011 110 111 100
4 100 04
5 101 05
36748 = 0111101111002
6 110 06
Example 2: Convert (214)8 into binary form.
7 111 07
SELF TEST
(a) 25
(b) 43
(e) 13
(c) 65
In order to convert a binary number to a decimal number we can Convert the following octal numbers to decimal:
determine the value of each successive octal digit, multiply it by
the column value (in terms of the power of the base) and simply (a) 37
add the values up. For example, the octal number 207 is
converted by taking each digit and then multiplying it by the
octal weight of the digit position and adding the result, as shown
in Figure.
(b) 41
(c) 65
Convert the following hexadecimal numbers to Binary: Hexadecimal to octal conversion proceeds by first converting
the hexadecimal digits to 4-bit binary values, then regrouping
(a) A10
the binary bits into 3-bit octal digits.
(b) ABC
(c) 23B
To binary:
3 F A 5
0011 1111 1010 0101
then to octal:
0 011 111 110 100 101
0 3 7 6 4 5