FIT Unit 3 Part 1
FIT Unit 3 Part 1
Unit – 3
computer number
system
(BCA – 105)
S.P. Chauhan 1
Number Systems
A number is a mathematical object used to count, label and measure.
A number system is a systematic way to represent numbers. A number system is the
representation of a given number. i.e. number system defines a set of values that is used to
represent or count quantity. Eg. We talk about the number of students attending the class. The
number system can be classified into two broad categories:
i. Nonpositional Number System:-
In early days people used to count on their fingers and when fingers becomes insufficient for
counting, stones or sticks etc might be used to indicate the values. Using such number system
it was very difficult to perform arithmetic operations as it has no symbol for zero.
The number system in which each symbol represent same value regard less its position in a
number is called nonpostional number system. So in such number system one has to count the
number of symbols present in the number.
The most common nonpositional number system is the Roman number system, in this number
system few characters are used to represent the number eg. I, II, III IV, V
ii. Positional Number System:-
It is most widely used number system. In this number system symbols are called digits and
these digits represent different values depending upon the position they occupy in the number.
S.P. Chauhan 2
1
12-01-2023
Number Systems
ii. Positional Number System:-
A positional number system is also known as weighted number system. Following three
considerations determine the value of each digit in such a number.
a. The digit itself.
b. The position of digit in the number
c. The base of the number system
The first positional number system was invented by Babylonians, but the positional number
system, which is currently used is called decimal number system that uses ten symbols or
digits. Apart from it some other positional number system are Binary number system, Octal
number system & Hexadecimal number system.
Eg. Decimal number 2586 consist of 6 digits 6 at unit, 8 at ten, 5 at hundred & 2 at thousands
positions. Its value can be written as
(2x103)+(5x102)+(8x101)+(6x100) = 2000 + 500 + 80 + 6 = 2586 S.P. Chauhan 3
Number Systems
Base (Radix) of Number System:-
It is defined as the total number of digits/symbols available in the number system. The first
digit is always zero. Base of a number system plays an important role. The maximum value of
a single digit in the given number system is equals to on less than the value of base.
In case of binary number system, base is 2 so maximum value of single digit is 2 – 1 = 1
In case of decimal number system, base is 10 so maximum value of single digit is 10 – 1 = 9
In case of octal number system, base is 8 so maximum value of single digit is 8 – 1 = 7
In case of hexadecimal number system, base is 16 so maximum value of digit is 16 – 1 = 15
which is equivalent to F.
S.P. Chauhan 4
2
12-01-2023
Number Systems
Base (Radix) of Number System:-
So value of base in all positional number system has the following characteristics:
i. It determine the total number of different symbols or digits available in the number
system. The first number is always zero (0).
ii. The maximum value of a single digit is always equals to one less than the value of the
base.
Decimal Number System:-
The base of this number system is 10 i.e. this number system consists of 10 digits
0,1,2,3,4,5,6,7,8,9 and any decimal number can be represented in combination of these 10
digits. The name is derived from Decem, which means 10. Each digit in this number system
represents units, which are 10 times the unit of the digit to its right.
i.e. starting from the decimal point and moving to left, each position is represented by the base
value (10) raised to a power. The power starts at 0 for the position just to the left of the
decimal point and power is incremented by one for each position that continue to left. Moving
to the right of decimal point we will need to place a minus sign in the front of each
incremented power.
S.P. Chauhan 5
Number Systems
Decimal Number System:-
As the base of decimal number system is 10 so it is represented as (6734)10. The expended
form is:
(6734)10 = 6 × 1000 + 7 × 100 + 3 × 10 + 4 × 1 (67.34)10 = 6 × 10 + 7 × 1 + 3/10 + 4/100
(6734)10 = 6 × 103 + 7 × 102 + 3 × 101 + 4 × 100 (67.34) = 6 × 101 + 7 × 100 + 3 × 10-1 + 4 × 10-
2 10
Binary Number System:-
The base of this number system is 2 i.e. this number system consists of 2 digits 0 & 1. Any
number can be represented in combination of these 2 digits. This number system was
advocated by Gottfried WilhelmVon Leibnitz in 17th century. As its base is 2 so the largest
single digit is 2-1 = 1 i.e. one less than the base
Starting from the decimal point and moving to left, each position is represented by the base
value(2) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
Bit is the short form of binary digit. Hence a bit in computer terminology means either 0 or 1.
An n-bit number is a binary number consisting of n bits.
In binary number system with base 2, the weight of nth bit in a binary number from RHS is
nthbit × 2n-1. S.P. Chauhan 6
3
12-01-2023
Number Systems
Binary Number System:-
Binary number is represented as (110011)2.
Above binary number is represented in its extended form as follows:
(110011)2 = 1 × 25 + 1 × 24 + 0 × 23 + 0 × 22 + 1 × 21 + 1 × 20
The weight value of each position is determine as follows:
… 210 29 28 27 26 25 24 23 22 21 20 2-1 2-2 2-3 …
1024 512 256 128 64 32 16 8 4 2 1 . .5 .25 .125
Binary Decimal equivalent Table in the left shows 3 bit binary numbers along with their
000 0 decimal equivalent. In this table there are only two digits 0 &
001 1 1 in binary number and hence, binary equivalent of decimal
010 2 number 2 has to written as 10 and readed as one – zero.
011 3
Form table it is clear that with 3 – bits only 8 i.e. 23 different
patterns of 0s & 1s are possible and hence a 3 bit binary
100 4
number can have one of the 8 values in the range 0 to 7. So
101 5
any decimal number in the range 0 to 2n – 1 can be
110 6
represented in binary form as an n-bit number, where n is
111 7 number of bits. S.P. Chauhan 7
Number Systems
Octal Number System:-
The base of this number system is 8 i.e. this number system consists of 8 digits 0,1,2,3,4,5,6 &
7. Any number can be represented in combination of these 8 digits. As its base is 8 so the
largest single digit is 8-1 = 7 i.e. one less than the base
Starting from the decimal point and moving to left, each position is represented by the base
value(8) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
In this number system with base 8, the weight of nth digit from decimal to LHS/ from RHS to
LHS is nthdigit× 8n-1.
Octal number is represented as (4621)8.
Above octal number is represented in its extended form as follows:
(4621)8 = 4 × 83 + 6 × 82 + 2 × 81 + 1 × 80
The weight value of each position is determine as follows:
MSB 5SB 4SB 3SB 2SB LSB MSB LSB
…. 84 83 82 81 80 . 8-1 8-2 …
4096 512 64 8 1 . 0.125 0.015625 S.P. Chauhan 8
4
12-01-2023
Number Systems
Octal Number System:-
As there are only 8 digits in octal number system, so 3 bits (23 = 8) are sufficient to
represent any single octal digit in binary.
Binary Decimal Octal
Table in the left shows 3 bit binary numbers along with their
000 0 0
decimal & octal equivalent. In this table there are only two
001 1 1
digits 0 & 1 in binary number. Form table it is clear that with
010 2 2
3 – bits only 8 i.e. 23 different patterns of 0s & 1s are
011 3 3 possible and hence a 3 – bit number can have one of the 8
100 4 4 values in the range 0 to 7. So 3 bits in binary are required to
101 5 5 represent a digit in octal number system.
110 6 6
111 7 7
001 000 8 10
001001 9 11
001010 10 12
S.P. Chauhan 9
Number Systems
Hexadecimal Number System:-
The base of this number system is 16 i.e. this number system consists of 16 digits
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E & F. i.e. in this number system alphabets A,B,C,D,E & F are
used to represent decimal numbers 10,11,12,13,14 & 15 respectively. As its base is 16 so the
largest single digit is 16-1 = 15 i.e. one less than the base which is written as ‘F’.
Starting from the decimal point and moving to left, each position is represented by the base
value(16) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
In this number system with base 16, the weight of nth digit from decimal to LHS/ from RHS to
LHS is nth digit× 16n-1.
Hexadecimal number is represented as (A31)16.
Above hexadecimal number is represented in its extended form as follows:
(A31)16 = 10 × 162 + 3 × 161 + 1 × 160
The weight value of each position is determine as follows:
…. 163 162 161 160 . 16-1 16-2 …
4098 256 16 1 . 0.0625 .0039 S.P. Chauhan 10
5
12-01-2023
Number Systems
Hexadecimal Number System:-
As there are only 16 digits in this number system, highest digit is ‘F’ so 4 bits (24 = 16)
are sufficient to represent any single hexadecimal digit in binary.
Decimal Octal Hexadecimal Binary
0 0 0 0000
Table in the left shows 4 – bit numbers
1 1 1 0001
2 2 2 0010
along with their decimal & Hexadecimal
3 3 3 0011
equivalent. In this table there are only two
4 4 4 0100 digits 0 & 1 in binary number. Form table
5 5 5 0101 it is clear that with 4 – bits only 16 i.e. 24
6 6 6 0110 different patterns of 0s & 1s are possible
7 7 7 0111
and hence a 4 – bit number can have one
8 10 8 1000
of the 16 values in the range 0 to F. So 4
9 11 9 1001
10 12 A 1010
bits in binary are required to represent a
11 13 B 1011
digit in hexadecimal number system.
12 14 C 1100
13 15 D 1101
14 16 E 1110
15 17 F 1111
16 20 10 10000 S.P. Chauhan 11
S.P. Chauhan 12
6
12-01-2023
S.P. Chauhan 13
2 2–2 0
Most Significant Bit
2 1–0 1 (MSB)
0 S.P. Chauhan 14
7
12-01-2023
Binary equivalent of an odd decimal number ends with 1 and binary of even decimal
number ends with zero .
S.P. Chauhan 16
8
12-01-2023
S.P. Chauhan 17
9
12-01-2023
S.P. Chauhan 19
S.P. Chauhan 20
10
12-01-2023
S.P. Chauhan 21
S.P. Chauhan 22
11
12-01-2023
S.P. Chauhan 23
12
12-01-2023
Taking remainders in the reverse order, we have 363 and whole numbers in the
downward direction, we have .11463. Thus octal equivalent of (243.15)10 will be
(363.11463)8.
S.P. Chauhan 25
S.P. Chauhan 26
13
12-01-2023
S.P. Chauhan 28
14
12-01-2023
S.P. Chauhan 29
∞
S.P. Chauhan 30
15
12-01-2023
Taking remainders in the reverse order, we have 7F and whole numbers in the
downward direction, we have .80. Thus hexadecimal equivalent of (127.50)10 will be
(7F.80)16.
S.P. Chauhan 31
16
12-01-2023
S.P. Chauhan 33
17
12-01-2023
Powers of 2:
S.P. Chauhan 35
Binary Number 0 1 1 0 1
Weight of each Bit 2-1 2-2 2-3 2-4 2-5
Thus the decimal
Weighted Value 0 × 1/2 1 × 1/4 1 × 1/8 0× 1/16 1 × 1/32 equivalent of
(0.01101)2 is
Solved Multiplication 0 1/4 1/8 0 1/32 (0.40625)10.
S.P. Chauhan 36
18
12-01-2023
Negative powers of 2
S.P. Chauhan 37
S.P. Chauhan 38
19
12-01-2023
S.P. Chauhan 40
20
12-01-2023
Octal Number 0 1 0 0 1
Weight of each digit 8-1 8-2 8-3 8-4 8-5
Weighted Value 0 × 1/8 1 × 1/64 0 × 1/512 0× 1/4096 1 × 1/32768
Solved Multiplication 0 1/64 1/512 0 1/32768
Sum of weight of all digits 0 + 0.0156 + 0.00195 + 0 + 0.000025 = 0.017575
S.P. Chauhan 42
21
12-01-2023
S.P. Chauhan 44
22
12-01-2023
Hexadecimal Number E = 14 1 0 3
Weight of each digit 16-1 16-2 16-3 16-4
Weighted Value 14 × 1/16 1 × 1/256 0 × 1/4096 3× 1/65536
Solved Multiplication 14/16 1/256 0 3/65536
Sum of weight of all digits 0.875 + 0.00390 + 0 + 0.0000457 = 0.8789457
S.P. Chauhan 46
23
12-01-2023
S.P. Chauhan 47
24