COEN 3322 MODULE 2
COMPUTER
NUMBERING SYSTEM
MODULE 2 - COMPUTER NUMBER SYSTEM
At the end of this chapter the students should
be able to:
• Differentiate positional and non-positional
number system
• Identify and represent number in binary,
decimal, octal and hexadecimal numbers.
• Convert from one number system to another
number system.
• Perform basic arithmetic operation to the
different numbering system
MODULE 2 - COMPUTER NUMBER SYSTEM
Non-positional Number System
• Non-positional numbers use symbols such as I for 1,
II for 2, III for 3, IIII for 4, IIIII for 5, etc… Each symbol
represents the same value regardless of its position
in the number. The symbols are simply added to
find out the value of a particular number.
MODULE 2 - COMPUTER NUMBER SYSTEM
Positional Number System
• Use only a few symbols called digits. These symbols
represent different values depending on the position they
occupy in the number the value of each digit is
determined by:
1. The digit itself
2. The position of the digit in the number
3. The base/radix of the number system
• Base/Radix = total number of digits in the number system
• The maximum value of a single digit is always equal to one less than
the value of the base.
MODULE 2 - COMPUTER NUMBER SYSTEM
Binary Number System
The binary number system is a positional number system
which has only 2 symbols or digits (0 and 1). Hence its base
is equal to 2. The maximum value of a single digit is 1 (one
less than the value of the base). Each position of a digit
represents a specific power of the base (2)
This number system is used in computers.
Examples
101012
11012
11001012
10101102
MODULE 2 - COMPUTER NUMBER SYSTEM
Binary Numbering System
• In order to be specific about which number
system we are referring to, it is a common
practice to indicate the base as a subscript.
• Bit
– Bit stands for Binary digit. A bit in computer
terminology means either a 0 or a 1. A binary number
consisting of n bits is called an n-bit number.
MODULE 2 - COMPUTER NUMBER SYSTEM
Octal Number System
Octal number system is another positional number system
which has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7).
Hence, its base is equal 8 the maximum value of a single digit
is 7 (one less than the value of the base. Each position of a
digit represents a specific power of the base (8).
Examples
3548
7778
1758
4128
1128
MODULE 2 - COMPUTER NUMBER SYSTEM
Decimal Number
The decimal number system is another type of a positional number system
which has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Hence, its base is
equal to 10.
The maximum value of a single digit is 9 (one less than the value of
the base). Each position of a digit represents a specific power of the base
(10), we use this number system in our day-to-day life.
Examples
34510
98110
67810
25610
102410
MODULE 2 - COMPUTER NUMBER SYSTEM
Hexadecimal Number System
• A positional number system it has total 16 symbols or digits
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F). Hence its base is
equal 16. The symbols A, B, C, D, E and F represent the
decimal values 10, 11, 12, 13, 14 and 15 respectively. The
maximum value of a single digit is 15 (one less than the
value of the base). Each position of a digit represents a
specific power of the base (16). Since there are only 16
digits, 4 bits (24 = 16) are sufficient to represent any
hexadecimal number in binary.
MODULE 2 - COMPUTER NUMBER SYSTEM
Hexadecimal Numbering System
• Examples
– 56116
– 1AF16
– FADE16
– E6A16
– CAFE16
MODULE 2 - COMPUTER NUMBER SYSTEM
Numbering System Conversion
MODULE 2 - COMPUTER NUMBER SYSTEM
Binary Conversions
MODULE 2 - COMPUTER NUMBER SYSTEM
BINARY TO OCTAL
Group the given binary digits by 3 starting from right
then convert each group into one octal digit.
Example
Convert 1100111012 to ________8
110 011 101
1102 = (1 x 22) + (1 x 21) + (0 x 20) = 4 + 2 + 0 = 6
0112 = (0 x 22) + (1 x 21) + (1 x 20) = 0 + 2 + 1 = 3
1012 = (1 x 22)) + (0 x 21) + (1 x 20) = 4 + 0 + 1 = 5
Hence, 1100111012 = 6358,
Note: any number raised to zero is equal to 1.
MODULE 2 - COMPUTER NUMBER SYSTEM
BINARY TO DECIMAL
• Multiply each binary digit by 2, start with the
power of zero (0) increasingly and get the sum of
the products.
MODULE 2 - COMPUTER NUMBER SYSTEM
BINARY TO HEXADECIMAL
• Group the binary digits by 4 starting from right
then convert each group into one hexadecimal
digit.
MODULE 2 - COMPUTER NUMBER SYSTEM
OCTAL CONVERSIONS
MODULE 2 - COMPUTER NUMBER SYSTEM
OCTAL TO BINARY
• Represent each given octal number digit by 3 bits.
• Example
Convert 3758 to ______2
3 = 011
7 = 111
5 = 101
• Hence, 3758 is equivalent to 0111111012
MODULE 2 - COMPUTER NUMBER SYSTEM
OCTAL TO DECIMAL
• Multiply each octal digit by 8, start with the power
of zero (0) increasingly and get the sum of the
products.
MODULE 2 - COMPUTER NUMBER SYSTEM
OCTAL TO HEXADECIMAL
Convert the octal number to binary then convert the binary equivalent to
hexadecimal.
Example
Convert 6128 to __________16
to binary
6 = 110
1 = 001
2 = 010
The binary equivalent is 1100010102
to hexadecimal
group the bits by 4 starting from right.
1 1000 1010= 18A16
Hence, 6128 is equivalent to 18A16
MODULE 2 - COMPUTER NUMBER SYSTEM
Decimal Conversions
MODULE 2 - COMPUTER NUMBER SYSTEM
Decimal to Binary
Successive Division Method
Step 1: Divide the decimal number to be converted by 2.
Step 2: Record the remainder from Step 1 as the rightmost digit (least
significant digit) of the new base number.
Step 3: Divide the quotient of the previous divide by the new base.
Step 4: Record the remainder from Step 3 as the next digit (to the
left) of the new base number.
Repeat Steps 3 and 4, recording remainders from right to left, until the
quotient becomes zero in Step 3
Note that the last remainder thus obtained will be the most significant
digit (MSD) of the new base number.
MODULE 2 - COMPUTER NUMBER SYSTEM
MODULE 2 - COMPUTER NUMBER SYSTEM
DECIMAL TO OCTAL
Step 1: Divide the decimal number to be converted by 8.
Step 2: Record the remainder from Step 1 as the
rightmost digit (least significant digit) of the new base
number.
Step 3:Divide the quotient of the previous divide by the
new base.
Step 4: Record the remainder from Step 3 as the next digit
(to the left) of the new base number.
Repeat Steps 3 and 4, recording remainders from right to
left, until the quotient becomes zero in Step 3
Note that the last remainder thus obtained will be the
most significant digit (MSD) of the new base number.
MODULE 2 - COMPUTER NUMBER SYSTEM
MODULE 2 - COMPUTER NUMBER SYSTEM
DECIMAL TO HEXADECIMAL
• Divide the decimal number by 16. Treat the
division as an integer division.
• Write down the remainder (in hexadecimal).
• Divide the result again by 16. Treat the division
as an integer division.
• Repeat step 2 and 3 until result is 0.
• The hex value is the digit sequence of the
remainders from the last to first.
MODULE 2 - COMPUTER NUMBER SYSTEM
• Example
• Convert 112810 to ___________16
DIVISION RESULT REMAINDER
1128/16 70 8
70/16 4 6
4/16 0 4
• Hence, 112810 is equivalent to 46816
MODULE 2 - COMPUTER NUMBER SYSTEM
Hexadecimal Conversions
MODULE 2 - COMPUTER NUMBER SYSTEM
HEXADECIMAL TO BINARY
• Represent each hexadecimal digit by 4 bits.
• Example
Convert F1AB16 to ________2
F = 1111
1 = 0001
A = 1010
B = 1011
Hence, F1AB16 is equivalent to
11110001101010112
MODULE 2 - COMPUTER NUMBER SYSTEM
HEXADECIMAL TO OCTAL
Convert the hexadecimal number to binary then convert the binary
equivalent to octal.
Example
Convert 94FACE16 to __________-8
to binary
9 = 1001
4 = 0100
F = 1111
A = 1010
C = 1100
E = 1110
The binary equivalent is 1001 0100 1111 1010 1100 1110 2
MODULE 2 - COMPUTER NUMBER SYSTEM
HEXADECIMAL TO OCTAL
• to octal
MODULE 2 - COMPUTER NUMBER SYSTEM
HEXADECIMAL TO DECIMAL
• Multiply each octal digit by 16, start with the
power of zero (0) increasingly and get the sum of
the products.
Decimal (Base 10) to Other Bases
20.687510 = 10100.10112 30.610 = ____________8
Solution:
Step 1: Convert the integral part using the previous step.
Step 2: Convert the fraction part by following the steps below.
Multiply the fraction part with the Take note of the integral part of
destination base until it becomes the result then read downwards
zero
.6875 x 2 1.375
.375 x 2 0.75
.75 x 2 1.5
.5 x 2 1.0
32
Arithmetic Operation
Addition
3310 34A516 1101012 1238
+ 1810 + 34A516 + 01012 + 78
5110 694A16 1110102 1328
Subtraction
5110 694A16 1110102 1348
- 1810 - 34A516 - 01012 - 78
3310 34A516 1101012 1258
33
Arithmetic
Multiplication
10112 34A516 112 1238
x 112 x 216 x 112 + 58
10112 694A16 112
+ 10112 + 112 6378
1000012 10012
34
Arithmetic
35
Division
10112 34A516
112 1000012 216 694A16 58 128
112 616
102 916
02 816
1002 1416
112 1416
112 A16
112 A16
02 016
Seatwork:
A. Convert the following numbers
1) 64.210 = 3) 75.128 =
– ______2 – ______2
– ______8 – ______10
– ______16 – ______16
2) 101110.1012 = 4 ) 9D16 =
– ______8 – ______2
– ______10 – ______8
– ______16 – ______10
36
Seatwork:
B. Perform the indicated operation
1) 10100 3) 7645
+ 11111 - 1234
11101
4) FEED
2) FADE + BEAD - DEAF