NUMBER SYSTEMS:
In general, in any number system there is an ordered set of
symbols known as digitals with rules defined for performing arithmetic
operations like addition, multiplication, etc. A collection of these digits
makes a number which in general has two parts. They are integer and fractional,
set apart by a radix point (.), that is
Where N= a number
b=
radix or base of the number system
n=
number of digits in integer portion
m= number of digits in fractional
portion
dn-1= most
significant digit (msd)
d-m= least
significant digit (lsd)
The digits in a number are placed side by side and each
position in the number is assigned a weight or index of importance by some
predesigned rule.
As a computer programmer or an
IT professional, you should understand the following number systems, which are
frequently used in computers.
Classification of
Number systems:
The Number systems is mainly classified into four types:
1. 1. Binary 2. Octal 3. Decimal and
4. Hexadecimal.
Binary Number System
Characteristics
->
·
Uses two
digits, 0 and 1.
·
Also
called base2 number system.
·
Each
position in a binary number represents a 0 power of the base (2). Example, 20.
·
Last
position in a binary number represents a x power of the base (2). Example, 2x where
x represents the last position - 1.
EXAMPLE:
Binary Number: 101012
Octal Number System
Characteristics
·
Uses
eight digits: 0, 1, 2, 3, 4, 5, 6, 7.
·
Also
called base 8 number system.
·
Each
position in a octal number represents a 0 power of the base (8). Example, 80.
·
Last
position in a octal number represents a x power of the base (8). Example, 8x where x represents the last position -
1.
EXAMPLE
Octal Number: 125708
Decimal Number System
The
number system that we use in our day-to-day life is the decimal number system.
Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal
number system, the successive positions to the left of the decimal point
represent units, tens, hundreds, thousands and so on.
Hexadecimal number system
The Hexadecimal
number system is a positional-weighted system.
The base or radix of this number system is 16.
It has 16 independent variables, they are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F.
Its base is 16.
The hexadecimal system is mainly useful for
human communications with computers.
EXAMPLE: Hexadecimal Number: 5709.ACD16
Binary Number & Corresponding
decimal, octal & hexa decimal numbers:
(i)
2- bit binary number(2n):
2n = 22=4 So, we have 4 combinations
Binary
number
|
Decimal
number
|
Hexadecimal
number
|
octal
|
0
0
|
0
|
0
|
0
|
0
1
|
1
|
1
|
1
|
1
0
|
2
|
2
|
2
|
1
1
|
3
|
3
|
3
|
(i)
3- bit binary number(2n):
2n=23=8 So, we have 8 combinations.
Binary
number
|
Decimal
number
|
Hexadecimal
number
|
octal
|
000
|
0
|
0
|
0
|
001
|
1
|
1
|
1
|
010
|
2
|
2
|
2
|
011
|
3
|
3
|
3
|
100
|
4
|
4
|
4
|
101
|
5
|
5
|
5
|
110
|
6
|
6
|
6
|
111
|
7
|
7
|
7
|
(i)
4- bit binary number(2n):
2n = 24=16 So, we have 16 combinations.
Binary
number
|
Decimal
number
|
Hexadecimal
number
|
octal
|
0000
|
0
|
0
|
0
|
0001
|
1
|
1
|
1
|
0010
|
2
|
2
|
2
|
0011
|
3
|
3
|
3
|
0100
|
4
|
4
|
4
|
0101
|
5
|
5
|
5
|
0110
|
6
|
6
|
6
|
0111
|
7
|
7
|
7
|
1000
|
8
|
8
|
10
|
1001
|
9
|
9
|
11
|
1010
|
10
|
A
|
12
|
1011
|
11
|
B
|
13
|
1100
|
12
|
C
|
14
|
1101
|
13
|
D
|
15
|
1110
|
14
|
E
|
16
|
1111
|
15
|
F
|
17
|
No comments:
Post a Comment