Switching Theory And Logic Design
UNIT-I
Number System and Boolean Algebra and Switching functions
The Decimal Number system:
The Decimal number system contains ten unique symbols. 0,1,2,3,4,5,6,7,8,9. Since
Counting in decimal involves ten symbols its base or radix is ten. There is no symbol for its
base.i.e, for ten .It is a positional weighted system i.e,the value attached to a symbol depends on
its location w.r.t. the decimalpoint.In this system, any no.(integer, fraction or mixed) of any
magnitude can be rep. by the use of these ten symbols only.Each symbol in the no. is called a
Digit. The leftmost digit in any no.rep ,which has the greatest positional weight out of all the
digits present in that no.is called the MSD (Most Significant Digit) and the right most digit
which has the least positional weight out of all the digits present in that no. is called the
LSD(Least Significant Digit).The digits on the left side of the decimal pt. form the integer part of
a decimal no. & those on the right side form the fractional part.The digits to the right of the
decimal pt have weights which are negative powers of 10 and the digits to the left of the decimal
pt have weights are positive powers of 10. The value of a decimal no.is the sum of the products
of the digit of that no. with their respective column weights. The weights of each column is 10
times greater than the weight of unity or 1010.The first digit to the right of the decimal pt. has a
weight of 1/10 or 10-1.for the second 1/100 & for third 1/1000.In general the value of any mixed
decimal no. is
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k is given by
(dn x10n)+(dn-1 x10 n-1)+ ………(d1 x101)+(d0 x101)+(d-1 x102)(d-2 x103) …….
9’s & 10’s Complements:
It is the Subtraction of decimal no.s can be accomplished by the 9‘s & 10‘s compliment
methods similar to the 1‘s & 2‘s compliment methods of binary . the 9‘s compliment of a
decimal no. is obtained by subtracting each digit of that decimal no. from 9. The 10‘s
compliment of a decimal no is obtained by adding a 1 to its 9‘s compliment.
Example: 9‘s compliment of 3465 and 782.54 is
9999 999.99
-3465 -782.54
---------- -----------
6534 217.45
------------------ --------------------
, 10‘s complement of 4069 is
9999
- 4069
----------
5930
+1
----------
5931
-----------
9’s compliment method of subtraction:
To perform this, obtain the 9‘s compliment of the subtrahend and it to the minuend now
call this no. the intermediate result .if there is a carry to the LSD of this result to get the answer
called end around carry.If there is no carry , it indicates that the answer is negative & the
intermediate result is its 9‘s compliment.
Example: Subtract using 9‘s comp
(1)745.81-436.62 (2)436.62-745.82
745.81 436.62
-436.62 -745.81
---------- ----------
309.19 -309.19
----------- ---------
745.81 436.62
+563.37 9‘s compliment of 436.62 +254.18
---------- ------------
1309.18 Intermediate result 690.80
+1 end around carry
-----------
309.19
-------------
If there is ono carry indicating that answer is negative . so take 9‘s complement of intermesiate
result & put minus sign (-) result should ne -309.19
If carry indicates that the answer is positive +309.19
10’s compliment method of subtraction:
To perform this, obtain the 10‘s compliment of the subtrahend& add it to the minuend. If
there is a carry ignore it. The presence of the carry indicates that the answer is positive, the result
is the answer. If there is no carry, it indicates that the answer is negative & the result is its 10‘s
compliment. Obtain the 10‘s compliment of the result & place negative sign infront to get the
answer.
,Example: (a)2928.54-41673 (b)416.73-2928.54
2928.54 0416.73
-0416.73 -2928.54
---------- ----------
2511.81 -2511.81
----------- ---------
2928.54 0416.73
+9583.27 10‘s compliment of 436.62 +7071.46
---------- ------------
12511.81 ignore the carry 7488.19
The Binary Number System:
It is a positional weighted system. The base or radix of this no. system is 2 Hence it has
two independent symbols. The basic itself can‘t be a symbol. The symbol used are 0 and 1.The
binary digit is called a bit. A binary no. consist of a sequence of bits each of which is either a 0
or 1. The binary point seperates the integer and fraction parts. Each digit (bit) carries a weight
based on its position relative to the binary point. The weight of each bit position is on power of
2 greater than the weight of the position to its immediate right. The first bit to the left of the
binary point has a weight of 20 & that column is called the Units Column.The second bit to the
left has a weight of 21 & it is in the 2‘s column & the third has weight of 2 2& so on.The first bit
to the right of the binary point has a weight of 2 -1 & it is said to be in the ½ ‗s column , next
right bit with a weight of 2 -2 is in ¼‘s column so on..The decimal value of the binary no. is the
sum of the products of all its bits multiplied by the weight of their respective positions. In
general , binary no. wioth an integer part of (n+1) bits & a fraction parts of k bits can be
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k
In decimal equivalent is
(dn x2n)+(dn-1 x2n-1)+ ………(d1 x21)+(d0 x20)+(d-1 x2-1)(d-2 x2-2) …….
The decimal equivalent of the no. system
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k in any system with base b is
(dn xbn)+(dn-1 xbn-1)+ ………(d1 xb1)+(d0 xb0)+(d-1 xb-1)(d-2 xb-2) …….
The binary no. system is used in digital computers because the switching circuits used in
these computers use two-state devices such as transistors , diodes etc. A transistor can be OFF or
ON a switch can be OPEN or CLOSED , a diode can be OFF or ON etc( twopossible states).
These two states represented by the symbols 0 & 1 respectively.
, Counting in binary:
Easy way to remember to write a binary sequence of n bits is
The rightmost column in the binary number begins with a 0 & alternates between 0 & 1.
Second column begins with 2(=21) zeros & alternates between the groups of 2 zeros & 2
ones. So on
Decmal no. Binary no. Decimal no. Binary no.
_________________________________________________________________________
0 0 20 10100
1 1 21 10101
2 10 22 10110
3 11 23 10111
4 100 24 11000
5 101 25 11001
6 110 26 11010
7 111 27 11010
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
16 10000
17 10001
18 10010
19 10011 39 100111
Binary to Decimal Conversion:
It is by the positional weights method . In this method,each binary digit of the
no. is multiplied by its position weight . The product terms are added to obtain the decimal no.
Example: convert 101012 to decimal
Positional weights 24 2 3 2 2 2 1 20
Binary no. 101012 =(1x 24)+(0x23)+(1x22)+(0x21)+(1x20)
=16+0+4+0+1
= 2110
Example: convert 11011.1012 to decimal
Positional weights 24 2 3 2 2 2 1 20 2 -1 2 -2 2 -3
=16+8+0+2+1+.5+0+.125
= 27.62510
An integer binary no. can also converted toa an integer decimal no as follows
UNIT-I
Number System and Boolean Algebra and Switching functions
The Decimal Number system:
The Decimal number system contains ten unique symbols. 0,1,2,3,4,5,6,7,8,9. Since
Counting in decimal involves ten symbols its base or radix is ten. There is no symbol for its
base.i.e, for ten .It is a positional weighted system i.e,the value attached to a symbol depends on
its location w.r.t. the decimalpoint.In this system, any no.(integer, fraction or mixed) of any
magnitude can be rep. by the use of these ten symbols only.Each symbol in the no. is called a
Digit. The leftmost digit in any no.rep ,which has the greatest positional weight out of all the
digits present in that no.is called the MSD (Most Significant Digit) and the right most digit
which has the least positional weight out of all the digits present in that no. is called the
LSD(Least Significant Digit).The digits on the left side of the decimal pt. form the integer part of
a decimal no. & those on the right side form the fractional part.The digits to the right of the
decimal pt have weights which are negative powers of 10 and the digits to the left of the decimal
pt have weights are positive powers of 10. The value of a decimal no.is the sum of the products
of the digit of that no. with their respective column weights. The weights of each column is 10
times greater than the weight of unity or 1010.The first digit to the right of the decimal pt. has a
weight of 1/10 or 10-1.for the second 1/100 & for third 1/1000.In general the value of any mixed
decimal no. is
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k is given by
(dn x10n)+(dn-1 x10 n-1)+ ………(d1 x101)+(d0 x101)+(d-1 x102)(d-2 x103) …….
9’s & 10’s Complements:
It is the Subtraction of decimal no.s can be accomplished by the 9‘s & 10‘s compliment
methods similar to the 1‘s & 2‘s compliment methods of binary . the 9‘s compliment of a
decimal no. is obtained by subtracting each digit of that decimal no. from 9. The 10‘s
compliment of a decimal no is obtained by adding a 1 to its 9‘s compliment.
Example: 9‘s compliment of 3465 and 782.54 is
9999 999.99
-3465 -782.54
---------- -----------
6534 217.45
------------------ --------------------
, 10‘s complement of 4069 is
9999
- 4069
----------
5930
+1
----------
5931
-----------
9’s compliment method of subtraction:
To perform this, obtain the 9‘s compliment of the subtrahend and it to the minuend now
call this no. the intermediate result .if there is a carry to the LSD of this result to get the answer
called end around carry.If there is no carry , it indicates that the answer is negative & the
intermediate result is its 9‘s compliment.
Example: Subtract using 9‘s comp
(1)745.81-436.62 (2)436.62-745.82
745.81 436.62
-436.62 -745.81
---------- ----------
309.19 -309.19
----------- ---------
745.81 436.62
+563.37 9‘s compliment of 436.62 +254.18
---------- ------------
1309.18 Intermediate result 690.80
+1 end around carry
-----------
309.19
-------------
If there is ono carry indicating that answer is negative . so take 9‘s complement of intermesiate
result & put minus sign (-) result should ne -309.19
If carry indicates that the answer is positive +309.19
10’s compliment method of subtraction:
To perform this, obtain the 10‘s compliment of the subtrahend& add it to the minuend. If
there is a carry ignore it. The presence of the carry indicates that the answer is positive, the result
is the answer. If there is no carry, it indicates that the answer is negative & the result is its 10‘s
compliment. Obtain the 10‘s compliment of the result & place negative sign infront to get the
answer.
,Example: (a)2928.54-41673 (b)416.73-2928.54
2928.54 0416.73
-0416.73 -2928.54
---------- ----------
2511.81 -2511.81
----------- ---------
2928.54 0416.73
+9583.27 10‘s compliment of 436.62 +7071.46
---------- ------------
12511.81 ignore the carry 7488.19
The Binary Number System:
It is a positional weighted system. The base or radix of this no. system is 2 Hence it has
two independent symbols. The basic itself can‘t be a symbol. The symbol used are 0 and 1.The
binary digit is called a bit. A binary no. consist of a sequence of bits each of which is either a 0
or 1. The binary point seperates the integer and fraction parts. Each digit (bit) carries a weight
based on its position relative to the binary point. The weight of each bit position is on power of
2 greater than the weight of the position to its immediate right. The first bit to the left of the
binary point has a weight of 20 & that column is called the Units Column.The second bit to the
left has a weight of 21 & it is in the 2‘s column & the third has weight of 2 2& so on.The first bit
to the right of the binary point has a weight of 2 -1 & it is said to be in the ½ ‗s column , next
right bit with a weight of 2 -2 is in ¼‘s column so on..The decimal value of the binary no. is the
sum of the products of all its bits multiplied by the weight of their respective positions. In
general , binary no. wioth an integer part of (n+1) bits & a fraction parts of k bits can be
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k
In decimal equivalent is
(dn x2n)+(dn-1 x2n-1)+ ………(d1 x21)+(d0 x20)+(d-1 x2-1)(d-2 x2-2) …….
The decimal equivalent of the no. system
dn dn-1 dn-2 ………d1 d0.d-1 d-2 d-3 …….d-k in any system with base b is
(dn xbn)+(dn-1 xbn-1)+ ………(d1 xb1)+(d0 xb0)+(d-1 xb-1)(d-2 xb-2) …….
The binary no. system is used in digital computers because the switching circuits used in
these computers use two-state devices such as transistors , diodes etc. A transistor can be OFF or
ON a switch can be OPEN or CLOSED , a diode can be OFF or ON etc( twopossible states).
These two states represented by the symbols 0 & 1 respectively.
, Counting in binary:
Easy way to remember to write a binary sequence of n bits is
The rightmost column in the binary number begins with a 0 & alternates between 0 & 1.
Second column begins with 2(=21) zeros & alternates between the groups of 2 zeros & 2
ones. So on
Decmal no. Binary no. Decimal no. Binary no.
_________________________________________________________________________
0 0 20 10100
1 1 21 10101
2 10 22 10110
3 11 23 10111
4 100 24 11000
5 101 25 11001
6 110 26 11010
7 111 27 11010
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
16 10000
17 10001
18 10010
19 10011 39 100111
Binary to Decimal Conversion:
It is by the positional weights method . In this method,each binary digit of the
no. is multiplied by its position weight . The product terms are added to obtain the decimal no.
Example: convert 101012 to decimal
Positional weights 24 2 3 2 2 2 1 20
Binary no. 101012 =(1x 24)+(0x23)+(1x22)+(0x21)+(1x20)
=16+0+4+0+1
= 2110
Example: convert 11011.1012 to decimal
Positional weights 24 2 3 2 2 2 1 20 2 -1 2 -2 2 -3
=16+8+0+2+1+.5+0+.125
= 27.62510
An integer binary no. can also converted toa an integer decimal no as follows