[go: up one dir, main page]

0% found this document useful (0 votes)
30 views31 pages

Numbering System

Uploaded by

nuri mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views31 pages

Numbering System

Uploaded by

nuri mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

AAMBC

Numbering System
Department of mgt (management)
1.5 Number System
 Fundamental to understand how computers work is understanding the
number system.
 Computer use the number system to store data and communicate with
each other.
 Within any computer, all numbers must be expressed in binary form.
 A number system is a set of symbols used for counting.
 The number systems which are of a particular interest in information
technology are Decimal, binary, octal and hexadecimal number system.
 Number systems are basically of two types: non positional and
positional
Definition:
 Non-positional number system is a number system in which case each
symbol represents the same value regardless of its position in the number
and the symbols are added to find out the value of particular number.
Example: Counting of fingers, stones, sticks etc.
Positional number system is a number system in which a
value of a number depends on the position of the digits.
The number 123 has a different value than the number 321,
although the same digits are used in both numbers.
The value of each digit in such a number is determined by
three considerations:
The digit itself
The position of the number
The base of the number system
Decimal Number System
The number system that we use in our day-to-day life is called
decimal number system.
In this system the base is equal to 10 because there are
altogether ten symbols or digits (0,1,2,3,4,5,6,7,8,9) used in the
system.
The successive positions to the left of the decimal point
represent units, tens, hundreds, thousands, etc.
Binary Number System
The binary numeral system (base 2 numerals) represents
numeric values using two symbols, typically 0 and 1.
More specifically, binary is a positional notation with a radix
of two. Owing to its relatively straightforward implementation
in electronic circuitry, the binary system is used internally by
virtually all modern computers
Each position in a binary number represents a power of
the base (2).
 As such in this system the right most position is the units
(20) the second position to the right is the 2`s (21) position
proceeding in this way we have 4`s (22), 8`s (23) etc.
Example
The decimal equivalent of the binary number 10101 (written
as 10101 2) is
= 1*24+ 0*23 +1*22+0*21+1*20
=16+0+4+0+1
=21
Octal Number System
In octal number system the base is 8. so, in this system
there are only eight symbols or digits(0,1,2,3,4,5,6,7).
Hexadecimal Number System
The hexadecimal system uses base 16.
Thus, it has 16 possible digit symbols.
It uses the digits 0 through 9 plus the letters A, B, C, D, E,
and F as the 16 digit symbols.
Numbers in base 16 need 16 symbols. The letters A-F are
used to give 16 symbols.
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F

Decimal, binary and hexadecimal representations


of the numbers 1 to 24 are shown below
decimal binary hexadecimal decimal binary hexadecimal
1 01 1 13 1101 D
2 10 2 14 1110 E
3 11 3 15 1111 F
4 100 4 16 1 0000 10
5 101 5 17 1 0001 11
6 110 6 18 1 0010 12
7 111 7 19 1 0011 13
8 1000 8 20 1 0100 14
9 1001 9 21 1 0101 15
10 1010 A 22 1 0110 16
11 1011 B 23 1 0111 17
12 1100 C 24 1 1000 18
Note:
In all number systems the value of the base
determines the total number of different
symbols of digits available in the number
system.
The first of these choices is always zero and
the maximum value of a single digit is always
equal to one less than the value of the base
Number System Conversions
I. Binary to Decimal
Technique
Multiply each bit by 2n, where n is the “weight” of
the bit
The weight is the position of the bit, starting from 0
on the right
Add the results
Example

Bit “0”

1010112 => 1 x 20 = 1
1 x 21 =
2
0 x 22 =
0
1 x 23 =
8
0 x 24 =
0
1 x 25 =
32
Number System Conversions
II. Decimal-To-Binary Conversion
Technique
Divide by two, keep track of the
remainder
First remainder is bit 0 (LSB, least-
significant bit)
Second remainder is bit 1
Etc.
Example
2 125
2 62 1

2 31 0
15 1 12510 = 11111012
2
7 1
12510 = ?2 2
2 3 1

2 1 1
0 1
Number System Conversions
III. Octal to Decimal
Technique
Multiply each bit by 8n, where n is the
“weight” of the bit
The weight is the position of the bit,
starting from 0 on the right
Add the results
Example

7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
(468)10
Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111

• Each Octal digit is represented by three bits of binary digit.


Number System Conversions
IV. Binary to Octal
Technique
Group bits in threes, starting on right
Convert to octal digits
Example
10110101112 = ?8

1 011 010 111

1 3 2 7

10110101112 = 13278
Number System Conversions
V. Octal to Binary
Technique
Convert each octal digit to a 3-bit equivalent binary
representation
Example

7058 = ?2 7 0 5

111 000 101

7058 = 1110001012
Number System Conversions
VI. Decimal to Octal
Technique
Divide by 8
Keep track of the remainder
Example

8 1234
123410 = ?8 154 2
8
8 19 2
2 3
8 123410 = 23228
0 2
Number System Conversions
VI. Hexadecimal to Decimal
Technique
Multiply each bit by 16n, where n is the “weight” of the
bit
The weight is the position of the bit, starting from 0 on
the right
Add the results
Example

ABC16 => C x 160 = 12 x 1 = 12


B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
Number System Conversions
VII. Decimal to Hexadecimal
Technique
Divide by 16
Keep track of the remainder
Example

16 1234
16 77 2

16 4 13 = D
123410 = ?16 0 4

123410 = 4D216
Number System Conversions
VIII. Binary-To-Hexadecimal
Technique
1. divide the binary digit into group of four (starting from
the right)
2. convert each group of four binary digit to one
hexadecimal digit.

Example
1011 0010 11112 = (1011) (0010) (1111) 2 = B
2 F16
Number System Conversions
VIIII. Hexadecimal-To-Binary

Technique
1: Convert the decimal equivalent of each hexadecimal
digit to four binary digits.
2: combine all the resulting binary groups in to a single
digit
Hexadecimal Digit 0 1 2 3 4 5 6 7

Binary Equivalent 0000 0001 0010 0011 0100 0101 0110 0111

Hexadecimal Digit 8 9 A B C D E F

Binary Equivalent 1000 1001 1010 1011 1100 1101 1110 1111

Each Hexadecimal digit is represented by four bits of binary digit


Number System Conversions
VIIII. Octal-To-Hexadecimal
Technique
1) Convert Octal to Binary first.
2) Regroup the binary number in 4 bits group starting from the
LSB
Example
Convert 265 8 to Hexadecimal.
2658 = 010 110 101 000 (Binary) 5A8
= 5A816 (Hexa)
Number System Conversions
VIIII. Hexadecimal-To-Octal
1) Convert Hexadecimal to Binary first.
2) Regroup the binary number in 3 bits group
(a group starts from the Lowest Significant Bit)

Example
Convert 5A816 to Octal.
5A816= 0101 1010 1000 (Binary)
= 2 6 5 0 (Octal)
End of this Chapter
Let me go practical

You might also like