Professional Documents
Culture Documents
1STSem BCA
Digital Electronics GFGC Tumkur
Chapter-1
Number system
The value of the digit depends on the position in which they appear in the number
Eg: decimal,binary,octal & hexa decimal number system
In this type each symbol represents a definite value irrespective of the position in which
they appear
Base or radix
The total number of different digits or symbols available in the number system is called
“base or radix”
The positional number system are classified into four types they are
…..104 10 3 10 2 10 1 10 0 . 10 -1 10 -2 10 -3 ……
The symbols used in this system are 0,1 0 & 1 are called “bits”
Digital Electronics GFGC Tumkur
The weights increases from right to left by a power of two for each bit
The left most bit is the MSB & right most bit is the LSB
1 1 1 1 0 1 1 1 1
MSB LSB
The symbols used in this system are 0,1 0 & 1 are called “bits”
Bit is an abbreviation for a binary digi t
Nibble: A group of 4 bits called a Nibble
Byte: A group of 8 bits called a Byte.
Word: A group of 16 bits called a word or 2 Bytes is equal to 1 word
LSB(Least significant bit): which has the lowest place value in the number
MSB(Most significant bit): which has the highest place value in the number
……..83 8 2 8 1 8 0 . 8 -1 8 -2 8 -3 …………
…..163 16 2 16 1 16 0 . 16 -1 16 -2 16 -3 ……..
Conversions
4.Other conversions
In this conversion the given decimal number is repeatedly divide by 2 for integer part until
the quotient is 0 and for fraction successively multiplying by 2
2 62 52 4 2 32 22 1 2 02 -12 -2 2 -3 2 -4
Eg:1110.011(2) -- (?)10
=1x8+1x4+1x2+0x1+0x0.5+1x0.25+1x0.125
=8+4+2+0+0+0.25+0.125
1110.011(2) =14.375(10)
In this conversion the given decimal number is repeatedly divide by 8 for integer part until
the quotient is 0 and for fraction successively multiplying by 8
8 48 38 28 18 08 -1 8 -2 8 -3
7x64+6x8+3x1+3x0125+7x0.0156+5x0.00195
448+48+3+0.375+0.1092+0.00975
763.375(8) = 499.49395(10)
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
1. The bits of the binary numbers are grouped into groups of 3 bits starting from LSB for
integer and from MSB for fraction
2. If the last group contains less than 3 bits then place 0 for those place
3. Convert each group into a octal equivalent digit
1.
2.
3. 1 7 . 6 5 4
4.17.654(8)
In this conversion the given decimal number is repeatedly divide by 16 for integer part until
the quotient is 0 and for fraction successively multiplying by 16
1. convert each digit of the Hexa decimal number to a 4 digit binary number
2. combine all the resulting binary groups into a single binar y number
1. The bits of the binary numbers are grouped into groups of 4bits starting from LSB for
integer and from MSB for fraction
2. If the last group contains less than 4 bits then place 0 for those place
3. Convert each group into a Hexa decimal equivalent digit
1 C . 4
11100.01(2) = 1 C .4(16)
4.Other conversions
1. convert each digit of the Hexa decimal number to a 4 digit binary number
Digital Electronics GFGC Tumkur
2. The bits of the binary numbers are grouped into groups of 3 bits starting from LSB for
integer and from MSB for fraction
3. If the last group contains less than 3 bits then place 0 for those place
4. Convert each group into a octal equivalent digit
They are
1 s complement
2 s complement
1’s complement
010100->1 s complement
2’s complement
Numbers that contain a sign bit followed by magnitude bits are called “sign
magnitude number”
In this MSB always represents the sign whether +ve or –ve
The remaining bits represent magnitude which is the value of the number
Digital Electronics GFGC Tumkur
Bit->0,1
Nibble->4 bits
Byte->8 bits
Word-.2bytes->16 bits
r-.radix
p->exponent
S Exponent Mantissa
Normalization
Binary arithmetic
Binary addition
0+0=0
0+1=1
Digital Electronics GFGC Tumkur
1+0=1
Eg: 128 64 32 16 8 4 2 1
64 0 1 0 0 0 0 0 0
+32 0 0 1 0 0 0 0 0
+96 0 1 1 0 0 0 0 0
step-1 128 64 32 16 8 4 2 1
+32 0 0 1 0 0 0 0 0
-16 0 0 0 1 0 0 0 0
+16
step-2 0 0 0 1 0 0 0 0
1's
1 1 1 0 1 1 1 1 complement
1
Digital Electronics GFGC Tumkur
2's
1 1 1 1 0 0 0 0 complement
step-3 0 0 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 0 0 0 1 0 0 0 0
step-1 128 64 32 16 8 4 2 1
20 0 0 0 1 0 1 0 0
-32 0 0 1 0 0 0 0 0
-12
step-2 0 0 1 0 0 0 0 0 =>32
1 1 0 1 1 1 1 1 1's complement
1
1 1 1 0 0 0 0 0 2's complement
step-3 0 0 0 1 0 1 0 0 =>20
1 1 1 0 0 0 0 0 =>2’s com of 32
1 1 1 1 0 1 0 0
sign
step 4 1 1 1 1 0 1 0 0
0 0 0 0 1 0 1 1 1's complement
1
0 0 0 0 1 1 0 0 2's complement
step-1 128 64 32 16 8 4 2 1
-32 0 0 1 0 0 0 0 0
-16 0 0 0 1 0 0 0 0
-48 Take 2's complement for 32
step-2 0 0 1 0 0 0 0 0
1 1 0 1 1 1 1 1 1's complement
1
1 1 1 0 0 0 0 0 2's complement
step-3 add
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 1 1 0 1 0 0 0 0
sign
Discard carry bit MSB is 1 i.e sign
step-4 bit=1
step-5 1 1 0 1 0 0 0 0
0 0 1 0 1 1 1 1 1's complement
1
0 0 1 1 0 0 0 0 2's complement
Binary subtraction
0-0=0
1-0=1
1-1=0
This is the simple method of subtraction of bits according to the rules of binary subtraction
Eg:
1 0 0 1
-0 1 0 1
0 1 0 0
1 1 0 . 1 0 1 1 1 0
-0 1 0 . 0 0 0 1 0 1
1 0 0 . 1 0 1 0 0 1
1 0 1 1 . 0 0 1
-0 1 1 1 . 1 0 1
0 0 1 1 . 1 0 0
Unsigned numbers
1 1 0 1 0 0 1 comprehend
1 1 0 0 minuend
1 1 0 1 1 1 0 0
2. The comprehend is smaller than minuend or the number of digits of comprehend are
lesser than minuend
1 1 0 1 0 1 comprehend
1 1 0 1 0 0 1 0 1 minuend
Signed numbers
1 1 1 1 0 1 1 0
sign
step-4 To verify the magnitude the result is converted to its 1 s complement again
1 1 1 1 0 1 1 0
0 0 0 0 1 0 0 1 1's complement & final result
Unsigned numbers
step-5 There is no end around Carry so the result is to be again take 2 s complement
0 1 0 1 0 1 0
1 0 1 0 1 0 1 1's complement
1
1 0 1 0 1 1 0 2's complement & final result
Signed numbers
-32 0 0 1 0 0 0 0 0 minuend
32
step-4 There is no end around Carry so the result is to be again take 2 s complement
1 1 1 0 0 0 0 0
0 0 0 1 1 1 1 1 1's complement
1
0 0 1 0 0 0 0 0 2's complement & final result
Binary multiplication
In this method the multiplicand is multiplied by each multiplier digit beginning with the least
significant digit. The result of the multiplication of the multiplicand by a multiplier digit is
called a “partial product”
1. Determine the sign of the product depending on whether the signs of multiplicand and
multiplier are the same or different
2. Negative number which may be in 2 s complement form should be converted to the true
form( uncomplement form)
3. The partial products are generated starting with the least significant bit (LSB) of the
multiplier
If multiplier bit is 0.partial product is 0.if multiplier bit is 1.partial product is shifted one bit
to the left
4. The final product is obtained by adding each successive partial product to the sum of the
previous partial products
5. If the product is negative, the 2 s complement of the product is determined. If the sign bit
is positive, the true form is retained. The sign bit is attached to the product
1. Sign bit of multiplicand is 0 & sign bit of multiplier is 1.so the sign bit of product will be 1
Binary division
1. The sign of the quotient is determined depending on whether the signs of the dividend and
divisor are the same or different, the quotient is initialized to zero
2. The divisor is subtracted from the dividend using 2 s complement addition so as to get the
first partial remainder. a 1 is added to the quotient is incremented by 1.if this partial
remainder is positive, we move on to the next step. If this partial remainder is zero or
negative, the division is complete
3. Subtract the divisor from the partial remainder and add 1 to the quotient. If the result is
positive, repeat for the next partial remainder. If the result is zero or negative, the division is
complete
00011001->divisor
2. The divisor is subtracted from the dividend so take 2 complement for divisor
00011001->divisor
Digital Electronics GFGC Tumkur
Discard carry bit . The sign bit is 0 so move to the next step
Add 1 to quotient
3.The divisor is subtracted from the 1 st partial remainder using 2 s complement addition
Add 1 to quotient
Digital codes
Alphanumeric code are used to represent numbers, letters, symbols and instructions
Weighted codes
It obeys the positional weighting principles. In weighted code, the bits are multiplied by the
weights indicated and the sum of the weighted bits gives the decimal digit
BCD uses the binary number system to specify the decimal number 0 to 9.it is
composed of four bits
The weights are assigned according to the position occupied by these digits
BCD code
Decimal 8421
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
Digital Electronics GFGC Tumkur
6 0110
7 0111
8 1000
9 1001
=>9 6 . 4 2
=>[ 1001011001000010]BCD
Disadvantages of BCD
1. Only 10 possible combinations are used to represent decimal numbers. remaining six
combinations of 4 bits are wasted
2. It is difficult to obtain complements used in subtraction
A weighted code is the 8421 code. Here the weight 2 is repeated twice
0 0000 1111 9
1 0001 1110 8
2 0010 1101 7
3 0011 1100 6
4 0100 1011 5
5 1011 0100 4
6 1100 0011 3
7 1101 0010 2
8 1110 0001 1
9 1111 0000 0
Excess-3 code
Digit
code for complement
Decimal Excess-3 complement decimal
0 0011 1100 9
1 0100 1011 8
2 0101 1010 7
3 0110 1001 6
4 0111 1000 5
5 1000 0111 4
6 1001 0110 3
7 1010 0101 2
8 1011 0100 1
9 1100 0011 0
Gray code
The gray code is a non weighted code. It differs from the preceding number by a single bit.
So it is called the “ unit distance code ”. It is also called reflected code or cyclic code
1. The MSB in the gray code is same as the corresponding MSB in the binary number
2. Going from left to right each adjacent pair of binary code bits are added to get the
next gray bit. The carries generated are ignored
Eg:
Digital Electronics GFGC Tumkur
1. The MSB in the binary is the same as the corresponding MSB in the gr ay code
2. Going from left to right each binar y code generated is added to the gray code bit in
the next adjacent position .the carries generated are ignored
Eg:
Gray
Decimal Binary code
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
Parity bit
2. Odd parity
Even parity
If the total number of 1 s is even in the code or number then it is called as even parity
Odd parity
If the total number of 1 s is Odd in the code or number then it is called as Odd parity
Only single bit errors can be detected using this method if doesn t check for 2 bit
errors in a group
Hamming code
The hamming code is used not only to detect a bit error but also to identif y the bit that
is in error so that it can be corrected
The hamming code uses a number of parity bits depending on the number of
information bits, located at certain position in the code group
The steps are
1. Number of parity bits
2. Placement of parity bits in code
3. Assignment of parity bit values
4. Detecting & correcting an error
The number of parity bits to be included with the information bits is to be determined
by the relationship
2P >=M+P+1
Digital Electronics GFGC Tumkur
The parity bits are placed in the position that are ascending power of 2 (1,2,4,8…)
1 2 3 4 5 6 7
Bits P1 P2 M1 P3 M2 M3 M4
P1,P2,P3=>parity bits
M1,M2,M3 & M4=>message bits or information bits
Assignment of parity bit values
Bit designation P1 P2 M1 P3 M2 M3 M4
Bit position 1 2 3 4 5 6 7
Binary position 001 010 011 100 101 110 111
Information bits (M n )
Parity bits(Pn )
The number of parity checks made depend on the number o parity bits in the error
correcting code
The method is as follows
a. Checks the p1 group for proper parity
A „0 represent good parity check
A „1 represent bad parity check
b. Repeat this for each parity group
c. The binary number formed by the result of all parity checks designates the
position of the code bit that is an error. This is the error position code
If checks are good that means there is no error. The first parity check generate the
LSB and the last parity check generate the MSB
Digital Electronics GFGC Tumkur
Problem
1. Find single error correcting code for 1001 using even parity
Solution:
By relation 2p >=m+p+1
M=4
P=1 21>=4+1+1
2>=6----- F
P=2 22>=4+2+1
4>=7------- F
P=3 23>=4+3+1
8>=8-------T
So the number of parity bits is 3
The information bits are 4
Total number of bits is code 4+3=7bits
b. Placement of parity bits in code is
1,2,4,………
Bit designation P1 P2 M1 P3 M2 M3 M4
Bit position 1 2 3 4 5 6 7
Binary position 001 010 011 100 101 110 111
Information bits (M n ) 1 0 0 1
Parity bits(P n ) 0 0 1
The single error correcting code for information 1001 using even parity is 0011001
Problem 2
Suppose information transmitted is the code word 0011001 if it is received as 0010001, find
the error that has occurred in transmission if even parity is used
Digital Electronics GFGC Tumkur
Bit designation P1 P2 M1 P3 M2 M3 M4
Bit position 1 2 3 4 5 6 7
Binary position 001 010 011 100 101 110 111
Transmitted code 0 0 1 1 0 0 1
Received code 0 0 1 0 0 0 1
character code
Where each X is a 0 or 1
From the table the ASCII code of the upper case letter „A has a code 100 0001 whose
equivalent in decimal number is 65
The range of ASCII set is from 0 to 127
1. Give the radix of octal and hexa decimal number system (2M,DEC-2010)
2. Define radix of a number system with an example (2MNOV/DEC-2009)
3. Give 1 s complement of 38 10 (2M,DEC-2010)
4. Convert (4M,DEC-2010)
a. 35 8 into hexa decimal
b. 2A16 into decimal
c. 3A16 into octal (4M,NOV/DEC-2009)
d. 258 into decimal
e. 10110112 into octal (4M,OCT/NOV- 2011)
f. 458 to binary
g. 12310 to binary (4M,OCT/NOV-2012)
h. 523.218 to decimal
i. 35.128 to binar y
j. 10112 to hexadecimal
5. Find the sum of decimal numbers 40 and 75 in binary addition method. (4M,DEC-2010)
6. Subtract 4510 from 25 10 in 2 s complement method (3M,DEC-2010)
7. Subtract 2510 from 4010 in 2 s complement method (3M,NOV/DEC-2009)
8. Subtract 2610 from 36 10 in 2 s complement method (3M,OCT/NOV- 2011)
9. Subtract 7710 from 99 10 in 2 s complement method (3M,OCT/NOV-2012)
10. Give 2 s complement of 1100(2) (2M,OCT/NOV-2012)
11. The sum of decimal number 30 10 and 45 10 in binary addition method. ( 3M,OCT/NOV-
2011)
12. Explain binary multiplication procedure with an example?
Digital Electronics GFGC Tumkur
Chapter-2
Boolean algebra
Introduction
In 1854 George Boole introduced a systematic treatment of logic and developed for
this purpose an algebraic system known as symbolic logic, or Boolean algebra.
Boolean algebra is a branch of mathematics and it can be used to describe the
manipulation and processing of binar y information or used in the design ,maintenance
and analysis of logical circuits in digital computers
Boolean algebra
Boolean algebra uses Boolean variables and Boolean operators .
Boolean variables are binary variables or symbol used to represent a logical quantity.
Some examples of Boolean variables are A, B, C, a, b, c, X, Y, and Z.
Boolean operators are logical operators There are three basic logical operators: AND,
OR, and NOT.
A Boolean expression is a combination of Boolean variables and Boolean operators.
There are many Boolean expressions that are logically equivalent to one another.
There are called equivalent expressions .
A Boolean function typically has one or more input variables and produces a result
that is based on these input values. The result can have a value of 0 or 1.
Truth Tables
A truth table is a useful visual tool for defining the input-output relationship of binary
variables in a Boolean function.
A function of n variables hasn rows 2 of possible input combinations, each row
specifying the value of the function for a different combination.
A truth table can be used to represent one or more functions.
Complement
It is the inverse of a variable and is indicated by a bar over the variable ex: A=>A
Literal:
It is a variable or the complement of a variable
Given a Boolean expression, the dual is formed by replacing AND with OR, OR with
AND, 0 with 1, 1 with 0.
The duality principle states that if two Boolean expressions are equal, then their duals
are also equal.
Digital Electronics GFGC Tumkur
LHS RHS
X Y X' Y' X+Y (X+Y)' ( X'.Y')
0 0 1 1 0 1 1
0 1 1 0 1 0 0
1 0 0 1 1 0 0
1 1 0 0 1 0 0
(x y)’ = x’ + y’
Digital Electronics GFGC Tumkur
LHS RHS
X Y X' Y' X.Y (X.Y)' ( X'+Y')
0 0 1 1 0 1 1
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 1 0 0 1 0 0
Factoring
In the reverse direction, the distributive law also expresses the process of factoring in which
the common variable X is factored out of the product terms
1.X+XZ=X
=X(1+Z)
=X(1)
=X
2.(X+Y)(X+Z)=X+YZ
=XX+XZ+XY+YZ
=X+ XZ+XY+YZ
=X(1+Z+Y)+YZ
=X(1)+YZ
=X+YZ
Logical functions:
Boolean expressions are represented in two forms based on their structure
1. Sum of products form (SOP) or disjunctive normal form
2. Product of sums form (POS) or conjunctive normal form
Product term
A term consisting of the product of literals or a single liter al is said to be a product term
Eg: XY, X, X Y , XY
Sum term
A sum term consisting of the sum of literals or a single literal is said to be a sum term
Eg: X+Y, X +Y, X +Y , X
SOP function:
SOP is two or more AND functions ORed together.
Or
It is a product term or several product terms logically added
EX: 1.ABC +D EF +FGH+AF G
2. AB+BCD
POS function :
It is two or more OR functions ANDed together. It is also known as the dual of the
SOP
Or
It is a sum term or several sum terms logically multiplied
EX: 1.(A+B+C )(D +E+F)
2.(A+B)(C+D+E )
Standard SOP:
It is also SOP but each product should contain all variables that are in the Boolean
expression. Each product term or AND function is known as min terms
It can be represented as m
m->min term
Eg: ABC +A BC+AB C
Digital Electronics GFGC Tumkur
In the above example it has got 3 product ter ms containing all the 3 variables
(i.e.,A,B,C)
Example:
Develop a truth table for the standard SOP expression A’BC’+AB’C
Solution:
1. Number of variables in domain n=3
2. Number of possible input combination 2 n =23 =8
3. Truth table
0 1 1 0
1 0 0 0
1 0 1 1 AB'C
1 1 0 0
1 1 1 0
Standard POS:
It is also POS but each sum function consists of all the variables that are in the Boolean
expression each such OR function/term is known as Max term
It can be represented as M
M->max term
Eg:(A+B+C )(A +B+C)
Step-5: place a 0 in the output column for each binary value that makes the standard POS
expression a „0 & place a „1 for all remaining binary values
Example:
Develop a truth table for the standard POS expression (A+B’+C)(A+B+C’)(A’+B’+C’)
Solution:
1. Number of variables in domain n=3
2. Number of possible input combination 2 n =23 =8
3. Truth table
Inputs Output
A B C X Sum term
0 0 0 1
0 0 1 0 A+B+C'
0 1 0 0 A+B'+C
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0 A'+B'+C'
Example
Inputs Output
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
Digital Electronics GFGC Tumkur
1 0 1 0
1 1 0 1
1 1 1 1
The steps for finding standard POS expression from truth table
a. List the binary values of the input variable for which the output is „0
b. convert each binary value to the corresponding sum term
eg: 1010 can be written as A +B+C +D
c .the POS expression is formed by multiplying each individual sum term for which output is
a „0
Example
Inputs Output
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
Karnaugh map
Karnaugh map provides a systematic method for simplifying Boolean expression. The
simplified expression (SOP or POS) is called the minimum expression
K-map can be used to simplify Boolean expressions with two, three or four variables
The number of cells in a k-map is equal to the total number of possible input variable
combinations
For a 2 variable k-map the number of cells=2 n =22 =4 .The variables are A&B
Digital Electronics GFGC Tumkur
For a 4 variable k-map the number of cells=2 n =24 =16.The variables are A, B, C&D
Cell adjacency
Cell adjacency is defined by a single variable change .cells that are differ by only one
variable are said to be adjacent so the order used in 00,01,11,10 to maintain “cell adjacency”
Digital Electronics GFGC Tumkur
Quad
o For m=2a sub-cube consists of 2 m =22 =4 adjacent cells
o Since m=2 grouping four adjacent cells containing 1 s result in elimination of
twovariables
Octet
o For m=3a sub-cube consists of 2 m =23 =8 adjacent cells
Digital Electronics GFGC Tumkur
Overlapping groups
The same 1 in a k-map cell may be used in more than one group so as to help in forming
largest group possible
Redundant group
A group whose 1 s are all overlapped by other groups is called a redundant group
Digital Electronics GFGC Tumkur
Example problem
1. Minimize the following standard SOP expression using k-map
AB’C+A’BC+A’B’C+A’B’C’+AB’C’ or f(A,B,C)= m(0,1,3,4,5) or
f(A,B,C)=(m0,m1,m4,m5)
Solution:
Step1: Mapping a standard SOP expression
Digital Electronics GFGC Tumkur
Solution:
Without using don t care term we can have 2 pairs. The resultant expression will be
A BD+A BC =>here one variable is eliminated
Digital Electronics GFGC Tumkur
Using the don t care term we can have one group i.e. quad .The resultant expression will be
AB
=>Here 2 variables are eliminated so it is advantageous to use don t care terms in simplifying
expression using k-map
Example problem
1. Use k-map to minimize the standard POS expression
(X+Y’+Z)(X+Y’+Z’)(X’+Y’+Z)(X’+Y+Z)orf(X,Y,Z)= M(3,4,5,6)OR
f(X,Y,Z)=(M3+M4+M5+M6)
Solution:
Step 1: Mapping a standard POS expression
(X+Y +Z )=011
(X +Y +Z)=110
(X +Y+Z)=100
Chapter-3
Logic gates
A gate is simply an electronic circuit which operates on one or more input signals to
perform a particular logical function
The basic gates are AND gate, OR gate & NOT gate
NAND,NOR,EX-OR & EX-NOR gates are the other most widely used gates
AND gate:
Function:
The AND gate is a logic element having two or more input terminals and only one
output terminal
Its output is at logical 1(high) only when all of its inputs are at logical 1(high)
If any one or more of the inputs are low then output of the gates will be low
Truth table
INPUTS OUTPUT
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
Digital Electronics GFGC Tumkur
Application
AND gate is commonly used to enable the passage of a signal from one point to another at
certain times and to disable the passage of the signal at other times
OR gate:
Function:
The OR gate is a logic element having two or more input terminals and only one
output terminal
The output of an OR-gate is high(1) if any one or more of its inputs are high(1),the
output is low(0) only when all of its inputs are low
Truth table
INPUTS OUTPUT
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
Digital Electronics GFGC Tumkur
Timing Diagram
Application
OR gate can be used in an detection and alarm system
Function:
The NOT gate is having one input and one output terminal.
It is also called as an inverter as it inverts its input.
It performs the operation called inversion or complementation or negation
When a high is applied to an inverter, a low will appear on its output.
When a low is applied to its input, a high will appear on its output
Truth table:
INPUTS OUTPUT
A Y Y=A'
Digital Electronics GFGC Tumkur
0 1 ON
1 0 OFF
Pin Diagram
Timing Diagram
Application
NOT gates can be used to find the 1 s complement of an 8-bitbinary number.
NAND gate:
Function:
The NAND logical function is equivalent to AND followed by an inversion
The output of a NAND gate is low only when all of its inputs are high.othrewise its
output is high
Truth table:
INPUTS OUTPUT
A B Y
0 0 1
0 1 1
Digital Electronics GFGC Tumkur
1 0 1
1 1 0
NOR gate
Function:
The NOR logical function is equivalent to OR followed by an inversion
The output of a NOR gate is high only when all of its inputs are low.othrewise its
output is low
Truth table:
INPUTS OUTPUT
A B Y
Digital Electronics GFGC Tumkur
0 0 1
0 1 0
1 0 0
1 1 0
EX-OR gate
Function:
The exclusive-OR gate is a combinational circuit with two or more inputs and one
output
The output of the EX-OR is high if one and only one input is high
When both the inputs are equal, then the output is also low
Truth table:
INPUTS OUTPUT
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
Application
An EX-OR gate can be used as a 2-bit adder
EX-NOR gate
Function:
The exclusive-NOR gate is a combinational circuit with two or more inputs and one
output
The EX-NOR function is the complement of an EX-OR function, and hence its output
is high only when its inputs are equal
Digital Electronics GFGC Tumkur
Truth table:
INPUTS OUTPUT
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
Pin diagram
UNIVERSAL GATE:
Logic gates that can be used to realize any of the basic logical operations like
AND,OR NOT,NAND ,NOR,EX-OR & EX-NOR is called universal gate
EX:NAND & NOR gates are universal gates
s
Digital Electronics GFGC Tumkur
Application
To implement a logic circuit with various gates, we require various ICs to be connected in the
circuit. but, if the same logic expression can be implemented using only NAND or only NOR
gates in the logic circuit can be used. This simplifies the implementation of logic expressions
Chapter-4
Arithmetic circuits
Introduction
Logic circuit used to perform binary addition is called an adder. The Logic circuit
used to perform binary subtraction is called subtractor
Various types of adders like half adder, full adder, parallel adder, BCD adders
Adders and subtractors can be implemented by using NAND & NOR
The two basic arithmetic functions of addition and subtraction can be defined by the
rules
Binary addition
Inputs Sum Carry
0+ 0 = 0 0
0+ 1 = 1 0
1+ 0 = 1 0
1+ 1 = 0 1
Binary Subtraction
Inputs Diff Borrow
0 - 0 = 0 0
0 - 1 = 1 1
1 - 0 = 1 0
1 - 1 = 0 0
Half Adder
It accepts two binary digits on its inputs and produces two binary digits on its outputs called
the sum bit and carry bit
Logical symbol
Truth table
Inputs Outputs
A B Sum carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Logical expressions
Digital Electronics GFGC Tumkur
Sum=AB + A B
Sum=A B
Carry=AB
Logic diagram
Full adder
The full adder circuit takes into account the carry from the previous stage. So it has three
inputs and produces two digits on its output called the sum and the carry out
Logical symbol
Truth table
Inputs Outputs
A B cin Sum carry
0 0 0 0 0
Digital Electronics GFGC Tumkur
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Logical expression
Sum=A B C+A BC +AB C +ABC
=A (B C+BC )+A(B C +BC)
=A (B C)+A(B C)
Sum =A B C
Logical diagram
Half Subtractor
It accepts two binary digits on its inputs and produces two binary digits on outputs called the
difference bit and borrow bit
Logical symbol
Truth table
Inputs Outputs
X Y DIFF BORROW
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Logical expressions
Diff =X Y+XY
Diff =X Y
Borrow=X’Y
Logical diagram
Full Subtractor
The full subtractor accepts borrow from previous stage .so it has three inputs
XYB0 .It has two outputs Difference and Borrow
Logical symbol
Truth table
Inputs Outputs
X Y B 0
DIFF BORROW
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Logical expressions
Logical diagram
C3 C2 C1
A4 A3 A2 A1
+ B4 B3 B2 B1
C4 S4 S3 S2 S1
Logic Diagram
The carries in parallel adder are handled by two methods . They are
1. Ripple carry adder
2. Carry look ahead adder
Adder-Subtractor
It is a logic circuit that can be used to perform both addition and subtraction
The circuit is from right to left as in parallel adder circuit. The carry-out from each
full adder is the carry-in to the next –higher full adder.
The first number bits are input to the full adders directly, because whether addition or
subtraction, the first number (A4 A3 A2 A1) is going to be same.
For addition the second number (B4 B3 B2 B1) will be in true form .but in the
subtraction, the second number should be 2 s complement form to be added. this can
be achieved by using EX-OR gates as controlled inverters.
Each EX-OR gate has an input i.e. B4 B3 B2 B1 and another input is SUB
With SUB=0, the Bits reaches the full adders in true form
With SUB=1, the B bits are inverted. this gives the 1 s complement
The SUB line is connected to carry in of LSB full adder. this gives the 2 s
complement of the second number
BCD Adder
BCD adder is an arithmetic unit which performs operations on numbers that are stored
in BCD form.
The BCD adder has 4 augends bits and 4 addend bits.
BCD can have only 10 outputs 0000 to 1001
The numbers 1010 to 1111 can be avoided by adding the bit pattern 0110
For solving for the output conditions 1010 to 1111 using K-map,
Digital Electronics GFGC Tumkur
The Boolean expression is S4S3+S4S2 ,this is implemented using AND gates & OR
gates
IF a carry out is generated or if any of the combinations 1010 to 1111 occur, then any
of the OR gate 3 inputs will be a 1.this is used to generate pattern 0110 to be added to
the augends using another 4-bit binary adder so as to obtain the final sum
5. What is an adder? Draw the logic gate circuit of full-adder circuit using XOR and basic
gates explain. (3M, Dec -2010). (3M,Oct/Nov -2012)
Draw the logic circuit of full-adder using 2 half adder
6. What is half subtractor? Explain with logic diagram and truth table
(3M,Dec-2010)
(3M,Oct/Nov -2012)
7. With logic circuit diagram explain the action of 4-bit binary adder-subtractor. (4M,Dec -
2010) (4M,Oct/Nov -2012)
8. With logic circuit diagram, explain the action of 4-bit binary adder. (4M,Oct -2011)
Digital Electronics GFGC Tumkur
Chapter-5
FLIP FLOP
Digital circuits whose output depends entirely on the inputs to the circuits. such logic
circuits were called combinational logic circuits
Sequential circuits are a digital circuit whose output not only depends on the current
inputs, but also on the previous state of the circuit. It involves timing and memory
devices.
Flip flop is the basic memory element in a digital computer.
It is used to store one bit of information with a 0 or a 1.It is also called the binary or
toggle or latch.
Latch
It is commonly used at the output of a digital device to hold the data until the next device is
ready to receive the input.
Types of triggers
Flip flop can either be level triggered, positive edge triggered or negative edge triggered,
depending on which position of the clock wave form is used to activate the flip flop.
Inputs Outputs
S R Q Q' Mode Of Operation Effect On Output X
No Change-Previous State
1 1 Q Q Hold Retained
0 1 1 0 Set For Setting X To 1
1 0 0 1 Reset For Resetting X To 0
Prohibited Or
0 0 1 1 Forbidden Invalid Condition
If both S and R inputs are 1 it is the idle this is called the hold condition . There is
no change in the state of the flipflop.the previous state is retained
When input S is 0 and R is 1 , the output Q is set to 1.this is called set condition . It is
used to set the flip-flop to 1
When input S is 1 and R is 0 , the output Q is set to 0.this is called reset condition . It
is used to clear the flip-flop to 0
Digital Electronics GFGC Tumkur
When both the inputs are 0 , both outputs go to logical 1 or set and reset the flip flop
simultaneously. This state is called forbidden or prohibited or racing or invalid
state
Timing diagram or wave form for a flip flop the horizontal distance is time and the vertical
distance is voltage
1. Synchronous operation: the output of the flip flop changes only on clock pulse
2. Memory characteristic: even if the input are changed the state of flip flop does not
change until a clock pulse is applied
Outputs
Inputs Q(t+1)
S R Q Q' Mode Of Operation Effect On Output X
0 0 Q Q Hold No Change
0 1 0 1 Reset Reset To 0
1 0 1 0 Set Set To 0
Digital Electronics GFGC Tumkur
Prohibited Or
1 1 1 1 Forbidden Should Not Be Used
When the clock signal changes from 0 to 1 the output is affected according to the values in
inputs S & R.
The following cases occur
If both S & R are 0 during the clock transition, the output does not change.
If S=1 & R=0 the output Q is set to 1
If S=0 & R=1 the output is cleared or reset to 0
If both S & R are 1, the output is unpredictable and may be either 0 or 1 depending on
internal timing delays that occur within the circuit. This is said to be the indeterminate
state of forbidden state.
D flip flop
The D flip flop is a flip flop with a single data input D and a clock input C.therfore it
is called data flip flop.
The D flip flop is also known as the delays flip flop. The word “delay” describes what
happens. To the data at input 0.The data at D input is delayed by one clock pulse
before it gets to the output Q.
CLK D Q Q'
0 0 1 CLEAR TO 0
1 1 0 SET TO 1
The D flip flop can be formed from a clocked RS flip flop by adding an inventor or
NOT gate. The D input is connected to S input of RS flip flop directly
The D input is connected to R input of RS flip flop through the inventor.
The typical commercial D flip flop contain two extra inputs PRESET (P) AND CLEAR
(CLR).
The presetand clear inputs are called asynchronous inputs as they act on the flip
flop independent of the clock.
The bubble at these inputs that the active signal is 0 .
The Dinput is called thesynchronous inputas it activates the flip flop only in
synchronism with the clock pulse.
Always the asynchronous inputs overridethe synchronous inputs.
1 1 _ 1 1 0 SET
1 1 _ 0 0 1 RESET
Digital Electronics GFGC Tumkur
When an PRESET=0 and CLEAR=1 input, and the D and CLK inputs may be
anything, the asynchronous input overrides and the flip flop set to 1
When PRESET=1 and CLEAR=0 then the D and CLK inputs may be anything, the
output is asynchronous RESET
When both PRESET & CLEAR are 0 then the output is prohibited
When both inputs of asynchronous are equal to 1(not active) then D is 1after one
clock pulse, the flip flop output set 1
When both inputs of asynchronous are equal to 1(not active) then D is 0 after one
clock pulse, the flip flop output reset0
Applications
1) D flip flop are widely used as temporary memory devices.
2) They are wired together to form shift registers and storage registers commonly used in
digital systems.
Toggling
It is defined as the change of output in a JK flips flop alternatively b/w 0 to 1 for every clock
transition
Racing
It can be defined as toggling (change of 0 to 1 and 1 to 0 alternatively) more than once during
one clock cycle in JK flip flop.
The J input is equivalent to the S input of SR flip flop and the K input is equivalent to
the R input of SR flip flop.
JK flip flop can also implemented by using NAND gates
1) When J & K inputs are both 0, the data inputs have no effect on the outputs. The flip flop
is said to be in the hold state.
2) when J=0 & K=1, the flip flop is reset or cleared to 0, then it said to be in the reset state.
3) When J=1 & K=0, the flip flop I s set to 1. Then it is said to be in the set state.
4) When both J & K ar e 1, if the state of the flip flop was 0, applying clock pulse causes it to
change to 1 & vice versa called toggling.
Digital Electronics GFGC Tumkur
The operation of negative edge triggered flip flop can be explained with the truth table
INPUTS OUTPUT
Asynchronous synchronous MODE OF
PR CLR CLK J K Q Q' OPERATION
0 1 X X X 1 0 asynchronous set
1 0 X X X 0 1 asynchronous reset
0 0 X X X 1 1 prohibited
1 1 1 0 0 NO CHANGE hold
1 1 1 0 1 0 1 RESET
1 1 1 1 0 1 1 SET
OPPOSITE
1 1 1 1 1 STATE TOGGLE
Applications
JK flip flop are used in many digital circuits especially its toggle feature is used in counters.
JK flip flop are also used as frequency divider.
T flip flop
It is also known as toggle flip flop
Logical symbol
Digital Electronics GFGC Tumkur
This type of flip flop can be obtained from a JK flip flop when input J & K are connected to
provide a single input designated by T.
INPUTS OUTPUT
Asynchronous synchronous
PR CLR CLK J K Q Q'
0 0 X X X 1 0
1 1 X X X 0 1
1 1 0 0 Q Q'
1 1 0 1 0 1
1 1 1 0 1 0
1 1 1 1 Q Q'
Logical symbol
This helps in avoiding the racing condition in JK flip flop where it can be triggered
only once within a clock cycle.
Since the output of the second flip flop follows that of the first JK flip flop, the names
master and slave are used.
Set-up time(ts )
It is the minimum time interval required for input logic levels to be maintained constat
before the triggering edge of the clock pulse to have reliability.
Hold time(th )
It is the minimum time interval required for logic levels to remain on the inputs after
the triggering edge of the clock pulse inorder that the levels be reliably clocked into
the flip flop.
Power dissipation
It is the total power consumption of the device.
Chapter-6
Shift Register
A register is a group of memory cells grouped together to form a single unit
A register can be used in two ways
1. To simply store information for later use
2. To act on data i.e., contents can be modified by shifting data right or left
The register used to store data may be called latch. These are constructed using D flip
flops
The Shift Registeris another type of sequential logic circuit that is used for the
storage or transfer of data in the form of binary numbers and then "shifts" the data out
once every clock cycle, hence the name "shift register".
The basic functions of shift register are
Storage capacity
Data movement
The storage capacity of a register is the total number of bits of digital data it can
retain, so the number of stages in a register determines its storage capacity.
The shifting capability of a register permits the movement of data from one flip flop
to another within the register or into or out of register by applying clock pulse
1. Serial shifting : shifting data one bit at a time in a serial fashion beginning with MSB
or LSB bit
2. Parallel shifting : shifting all data bits simultaneously.
The data is shifted serially "IN" and "OUT" of the register, one bit at a time in either a
left or right direction under clock control.
A 4 bit shift register can be implemented with D flip flops. It can store up to 4 bits of
data
4-bit Serial-in to Serial-out Shift Register
Fig shows entry of 4 bits 0101 into the register. The register is initially CLEAR. It has
all 0s in the 4 flip flops.
The first LSB bit 1 is put onto the data input line making D=1 for FFA.when the first clock
pulse is applied, FFA is set, thus storing a 1
Second bit 0 is applied to data input making D=0 when the second clock pulse is applied, the
0 is shifted into FFA and the 0 from FFA is shifted into FFB
The third bit 1 is applied to data input making D=1 when third clock pulse is applied, 1 is
shifted into FFA, 0 from FFA is shifted into FFB, 1 from FFB is shifted into FFC
The last MSB bit 0 is now applied to data input and fourth clock pulse is applied, then 0 is
shifted into FFA, the 1 shifted from FFA to FFB,the 0 is shifted from FFB to FFC and the 1
is shifted from FFC to FFD
This completes the entry of the 4 bits serially into the shift register on applying 4 clock
pulses.
When fifth clock pulse is applied, the bits keep moving to the right and so the bit 1 appears on
Q output.
The register is loaded with serial data, one bit at a time, with the stored data being
available in parallel form. This means all bits i.e., output of each stage is available
simultaneously once data is stored.
4 -bit Serial-in to Parallel-out Shift Register
Clock Pulse No QA QB QC QD
0 0 0 0 0
1 10 0 0
2 0 10 0
3 0 0 10
4 0 0 0 1
5 0 0 0 0
The parallel data is loaded into the register simultaneously and is shifted out of the
register serially one bit at a time under clock control.
The parallel data is loaded simultaneously into the register, and transferred together to
their respective outputs by the same clock pulse.
The final mode of operation is the Parallel-in to Parallel-out Shift Register. The data
is presented in a parallel format to the parallel input pins P A to P D and then transferred
together directly to their respective output pinsA toQ QA by the same clock pulse.
Then one clock pulse loads and unloads the register.
The UART receives data in serial format, converts the data to parallel format and
transmits them on the data bus. The UART also accepts parallel data from the data
bus, convert the data to serial format, and transmits them to an external device.
The data bus is a set of parallel wires along which data move between the UART and
the microprocessor system. Buffers interface the data registers with the data bus.
In a calculator
We enter each digit on the keyboard of the calculator, the numbers shift to left on the
display.
The key press information from the keyboard encoder is held by the register before
being sent to the processing unit. Another register is used for temporary storage
between the processing unit and the decoder before it is displayed.
5. What are shift registers? With logic diagram explain the action of 4 bit SISO register.
.(4M OCT/NOV 2012)
6. What are shift registers? With logic diagram explain the action of 4 bit SIPO register.
.(4M OCT/NOV 2011)
Digital Electronics GFGC Tumkur
Chapter-7
Combination logical circuits
When logic gates are connected together to produce a specified output for certain
specified combinations of input variable, the resulting circuit is called a combination logical
circuits .
In this circuit there are inputs logic gates and output. The output is purely dependent
only on the present inputs.
When AND-OR circuit is complemented, it results in and AND-OR invert logic circuit. This
circuit can be used to implement a POS product of sum expression.
INPUTS OUTPUTS
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1 A'BC
1 0 0 0
1 0 1 1 AB'C
1 1 0 1 ABC'
Digital Electronics GFGC Tumkur
1 1 1 0
Magnitude comparator
A logic circuit that is used to compare magnitudes is called a
magnitude comparator. It
compares two quantities and indicates whether they are equal.
One number (binary form) is applied to input A, another number (binary form) is applied to
input B.
On comparison of their magnitudes
If A>B, that output is high and two are low.
If A=B then that output line has a high and remaining two outputs are low.
If A<B, then that output line has a high and the remaining two outputs are low.
In a 4 bit comparator, the highest order bits are first examined for inequality in that bit
position. If any inequality is found, the relationship of the two numbers is established and any
other inequalities in lower order bit positions are ignored.
Encoder
It converts information such as a decimal number or an alphabetic character into some
coded form.
For example a circuit that converts each of the decimal digits 0 through 9, to a binary
code is called decimal to BCD encoder .
Decimal BCD
INPUTS OUTPUT
D A3 A2 A1 A0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Decoder
It converts coded information, such as binar y number into a non-coded form, such as
decimal form.
For example. One particular type of decoder converts a 4-bit binary code into the
appropriate decimal digit.
Digital Electronics GFGC Tumkur
It is named as 1 of 4 decoder because only 1 of the 4 output lines is high, depending on the bit
pattern.
If AB=00, Y0 is high;
If AB=01 then Y1 is high.
If AB=10 then Y2 is high.
If AB=11 then Y3 is high. This is a 2 bit decoder.
Multiplexer (MUX)
A multiplexer has several data-input lines and a single output lines. It also has data
select inputs (control lines or control signals) which permit digital data on any one of
the inputs to be switched to the output line. it is also known as data selector
It has 2n input line, n selected lines and 1 output line
For ex, consider a 4-input multiplexer. Control signals or data select signals will be 2
bits because with two bits, any one of the four data input lines can be selected.
Digital Electronics GFGC Tumkur
If S1S0=00 is applied to the data select lines, data on input D0 appears on the output
line.
If S1S0=01 then data on D1 appears on the output line.
If S1S0=10, then data on D2 will appear on the output.
If S1S0=11, then data on D3 will appear on the output.
Demultiplexer (DEMUX)
It is a logic circuit that switches digital data from one input line to several output lines
in a specified time sequence. it is also known as a data distributor .
It has one input line, „n select lines and 2 n output lines.
Digital Electronics GFGC Tumkur
For ex: consider a 1 to 4 demultiplexer circuit. The two data select lines enable only
one gate at a time and data appearing on the data-input line will pass through the
selected gate to the output lines.
Parity generators/checkers
In a digital system while codes are being transf erred from one point to another, error
can occur. There will be undesired changes in the coded information like a 0 may
change to 1 may change to 0.
Error detection can be done using parity bit.
The sum of two bits can be generated by an EX-OR gate. When the number is 1s on
the inputs is even, the output is low and when the number of 1s is odd, the output is
high.
It is used to check for odd or even parity on a 9 bit code. (1 bit parity+8 data bits).
The inputs are labelled an A to I.
When number of 1s on the inputs is even, even output is high and odd is low.
When number of 1s on the inputs is odd, an odd output is high and even is low.
Parity checker
When this device is used as an even parity checker , the number of input bits should
always be even. When a parity error occurs the even output goes low and the odd
output goes high.
When it is used as an odd parity checker the number of inputs bits should always be
odd. When a parity error occurs, the odd output goes low and the even output goes
high.
Parity generator
Digital Electronics GFGC Tumkur
When this device is used as an even parity generator the parity bit is taken at the odd
output because their output is a 0. If there is an even number of input bits and it is a 1
if there is an odd number.
When used as an odd parity generator, the parity bit is taken at the even output
because it is a 0 when the number of inputs is odd.
1. Prove (AB) =A +B by truth table method and write its logic .(2M,OCT/NOV-
cir cuit
2011)
2. Write the Boolean logic diagram for expression Y=AC+AB C+ABC
.(2M,OCT/NOV-
2011)
3. Design a BCD to decimal decoder circuit.
4. Describe the working of an encoder.
5. What is a multiplexer and demultiplexer?
6. Design a 4 to 1 multiplexer and 1 to 8 demultiplexer circuit.
7. Explain parity generator/checkers.
Digital Electronics GFGC Tumkur
Chapter-8
Integrated circuits and digital functions
Using advanced techniques a manufacturer can produce miniature circuits of the
surface of a small piece of semiconductor material calledchip. a Such a circuit is
called an Integrated circuit(IC).
There are two basic techniques for manufacturing ICs are
1. Bipolar technique.
2. Metal oxide semiconductors (MOS) technique
A digital IC family is a group of compatible devices with the same logic levels and
supply voltages
Logic families
The IC technology usually depends on the following factors :-
a) Speed
b) Power dissipation
c) Noise immunity
d) Input/output interface compatibility
e) Cost.
Compatibility
Digital Electronics GFGC Tumkur
It means that we can connect the output of one device to the input of another.
Interfacing
It is defined as the design of the interconnections between circuits that shif t the voltage levels
and current levels to make the compatible.
Pin numbering
At the top of the package, pin 1 is indicated by an identifier that can be a small dot, a
notch, or a leveled edge.
The dot is next to pin 1 with the notch oriented upward, the top left pin is 1.
The highest pin number is always to the right of the notch or opposite the dot
1) Bipolar families
2) MOS families
Fan in
Fan in is the number of inputs a gate has like a 2 input AND gate has fan in of two ,a
3 input NAND gate has fan in of three and so on
Fan out
The number of gates that each gate can drive while providing voltage levels in
the guarantied range is called the standard load or fan out
The fan out really depends on the amount of electric current a gate can source
or sink while driving other gates
Noise margin
Digital Electronics GFGC Tumkur
Noise margin refers to the maximum noise voltage that can be added to the generated
signal in a digital circuit before an undesirable change is caused in the circuit output
In this technology the diodes were replaced by transistors to improve the circuits
operations and the logic family was called TTL.
It is a class of digital circuits builds from bipolar function transistors and resistors. It
is called TTL
Because both the logic gating function AND and the amplifying function are
performed by transistors
Applications
Computers, industrial control, test equipments and instrumentation, consumer
electronics, synthesizers etc..
TTL ICs are examples of SSI to LSI.
Characteristics
ECL is that the transistors are always in the active region.
It can be change state ver y r apidly.
It operates at very high speed.
The propagation time can be less than a nanosecond.
The large current requirement is approximately constant and does not depend
significantly on the state of the circuit.
Disadvantages
The circuits require a lot of power.
Most of this power is wasted as heat.
Digital Electronics GFGC Tumkur
Usage
It is used in high speed application.
Older high and mainframe computers used ECL
It is used in systems such as supercomputers and signal processors where high speed
is essential.
The metal oxide semiconductor is a unipolar transistor that depends on the flow of
only one type of carrier, which may be electrons (n channel) or hole (p channel).
The triple compound “metal oxide semiconductor” is a reference to the nature of the
physical structure of the field effect transistors.
Characteristics
1) They have a very high input resistance.
2) They are compatible with one another.
3) They possess high noise immunity.
4) They have low static power supply drain.
5) CMOS allows a high density of logic functions on a chip.
6) Heat dissipation is low.
7) It is simple.
8) Sophisticate protection circuitry.
Usage
It is used in chips such as microprocessors, micro controllers, static RAM and other
digital logic circuits.
CMOS technology is also used for a wide variety of analog circuits such as image
sensor, data converts and highly integrated transrecievers for many types of
communication.
Current IBM mainframes use CMOS.
They are also used in battery powered equipment such as pocket calculators, digital
wrist watches and portable computers.
Advantages
These devices dissipate less power.
Their operation speed is high.
Manufacturing costs are low.
Resistance
Free electrons tend to move through conductors with some degree of friction, or
opposition to motion. This opposition to motion is more properly called resistance.
Or
Opposition to the flow of current
Or
The property of the materials which opposes the flow of electric current
The unit of resistance is ohm.
A wire is said to have a resistance of 1 ohm if a potential difference of 1 volt across
its ends causes 1 ampere of current to flow through it.
Short circuit
A short circuit is an electric circuit offering little or no resistance to the flow of
electrons.
Open circuit
An open circuit is one where the continuity has been broken by an interruption in the
path for electrons to flow.
Closed circuit
A closed circuit is one that is complete, with good continuity throughout
Switch
A device designed to open or close a circuit under controlled conditions is called a
switch.
Ohms law
Discovered by George Simon ohm and published in his 1827 paper, the galvanic
circuit investigated mathematically.
“It states that the amount of electric cur rent through a conductor in a circuit is directly
proportional to the voltage across it, for any given temperature.”
If „V be the potential difference across the conductor and „I be the current flowing
through the conductor then I a V or V a I or V=IR where „R is a constant of
proportionality and is called the resistance of the conductor.
The three forms of the ohm s law are
1. V=I.R
2. I=V/R
3. R=V/I
In fig, three resistances R1, R2 and R3 are connected in series. The source of
electrical energy is the battery V. the direction of current flow is from the positive
terminal of V through the resistors to the negative terminal.
By using ohm s law, the voltage drops across the resistances R1, R2 and R3, can be
written as
V1=IR1
V2=IR2
V3=IR3
The voltage across the batter y is equal to the sum of the voltages across the
resistances.
So
V= V1+V2+V3
IR1+IR2+IR3
V= I (R1+R2+R3)
o V1=V x R1/R1+R2+R3
o V2=V x R2/R1+R2+R3
o V3=V x R3/R1+R2+R3
A circuit in which one end of each resistance is joined to a common point and the
other end of each resistance is joined to another common point so that there are as
many paths for current flow as the number of resistances is called parallel circuit or
current divider circuit .
I1= V/R1
I = V/R T
I1/I= V/R1/V/R T
= R T
/R1
I1 = I [R2R3/ (R1R2+R2R3+R3R1)]
Or
I1= I (R2R3/R1R2+R2R3+R3R1)
I2= I (R1R3/R1R2+R2R3+R3R1)
I3= I (R1R2/R1R2+R2R3+R3R1)
In fig R2 and R3 resistances are connected in parallel with each other both to-gather
are in series with resistor R1.always first the par allel branches should be reduced to
and equivalent series branch and then he circuit is solved for simple series circuit
RTP =R2R3
R2+R3 because 1/R T
=1/R2+1/R3
I2= I x R3
Digital Electronics GFGC Tumkur
R2+R3
I3=VP/R3
I3= IxR2
R2+R3
Kirchhoff’s laws
Gustov Kirchhoff and German physicist worked on the principles governing the
behavior of electrical circuits. His findings ar e specified in two laws called
(i) Kirchhoff s current law (KCl)
(ii) Kirchhoff s voltage law (KVL)
Important terms
Circuit element
A circuit component with two terminals by which it can be connected to other
electric components is known as circuit element
Eg.resistor, inductor
Active elements
Circuit elements which can work independently and supply energy to a
network are called active elements
Eg: batteries, generators
Passive elements
Circuit elements which either absorb or store energy and their action depends
on the active elements are called passive elements
Eg: Resistors, inductors, capacitors
Branch
A part of any network connected between two nodes is called branch of a
circuit
Loop
A single closed path for the flow of current irrespective of active or passive
elements in a network is called a loop
Mesh
A loop which is independent i.e., which does not contain other loops within is
called a mesh
Node
It is an electrical junction in a circuit at which two or more circuit elements are
connected together
Kirchhoff’s current law (KCL) or Kirchhoff’s node or junction law or Kirchhof f’s first
law
“It is stated as the algebraic sum of all current entering and exiting a junction in an
electrical circuit is zero.”
Digital Electronics GFGC Tumkur
Ientering - Ileaving = 0
In fig there are four currents I1, I2,I3 & I4 metting at point O.considering all currents
entering point O as positive and all currents leaving the junction O as negative, we
have
I1+I2+I4- I3=0
I1+I2+I4=I3
Incoming currents=Outgoing currents
Based on this KCL can also be stated as
“The sum of the currents flowing towards any junction in an electric circuit is equal to
the sim of currents flowing out of the junction.”
Sign of emf’s
Raise in potential should be treated as +ve and fall in potential as –ve
As we move from –ve terminal of battery to the +ve terminal there is raise in potential
If we move from +ve terminal to the –ve terminal there is a fall in potential
Chapter-2
Ac fundamental
Alternating voltage
An alternating voltage or current changes continuously in magnitude and alternates in
direction (polarity) at regular intervals of time.
An alternating current is a sinusoidal signal that has the form of sin/cos wave
An AC generator is a machine which converts the mechanical energy into electrical
energy in the form of alternating current by using the principle of electromagnetic
induction
Generation of AC voltage
Important definitions
Cycle
It is one complete set of positive and negative values of an alternating quantity.
One cycle corresponds to 360 to 2p radians.
Frequency (f)
It is the number o f cycles of the alternating quantity in one second. It is represented
by f. It is measured in cycles per second or Hertz (1 cycle per second).
Digital Electronics GFGC Tumkur
F=1/T
Instantaneous value
It is the value of an alternating quantity at any instant of time. Instantaneous value of
voltage is represented as „e or „v and instantaneous value of current is represented as
(i).
Expression for instantaneous voltage is given by
V=VmsinT or i=ImsinT
V=Vmsinwt ori=Imsinwt
Average value
This is an arithmetic average of all instantaneous value of AC for one half cycles
The half cycle is used for the average value .because overall full cycle the average
value is 0
Therefore average value=0.637xpeak value
Consider a strip of width dT in the first half cycle of current wave as shown in the fig.
Let I be the mid-ordinate of the strip
Area of half cycle is equal to idT
Area of half cycle is equal to
idT= ImsinTdT
ImsinTdT
=Im[-cosT]
=Im[-cosp – (-cosT)]
=Im[-(-1)-(-1)]
=Im[2+2]
Area of half cycle is equal to =2Im
Therefore average value Iav is equal to
Iav=area of half cycle/base length of half cycle
Iav=2Im/p
Form factor
It is the ratio of rms value to the aver age value of an alternating quantity
Form factor= rms value
average value
For a sinusoidal voltage or current
Form factor=0.707xmaximum value
0.637x maximum value
Form factor=1.11
Digital Electronics GFGC Tumkur
It is a useful quantity as given rms value, average value can be found and vice-versa
Peak factor
The peak factor is the ratio of maximum value to the rms value of an alternating
quantity
Peak factor= maximum value
rms value
For a sinusoidal voltage or current
Peak factor= maximum value
0.707x maximum value
Peak factor=1.414
Peak factor is an important quantity because it indicates the maximum voltage being
applied to the various parts.
Phase
Phase of a particular value of an alternating quantity is fractional part of time period
or cycle through which voltage or current has advanced from the selected zero
position of reference
Phase different
If 2 alternating quantities don t reach their maximum and 0 values simultaneously,
then they are said to have phase difference
Two sinusoidal wave are shown in the fig curve B is displaced from curve A by an
angle that means phase difference between A and B is
Leading
A leading alternating quantity is one which reaches its maximum value earlier than the other
quantity
Lagging
Digital Electronics GFGC Tumkur
Lagging alternating quantity is one which reaches its maximum value later than the other
quantity.
Chapter-3
Atomic structure
Bohr’s atomic model
Atom consists of positively charged nucleolus around which negatively charged
electrons revolve in different circular orbits.
The electrons can revolve around the nucleuses only in certain permitted orbits
The electrons in each permitted orbit have a certain fixed amount of energy.
An electron that has absorbed energy and has jumped to a higher energy level is
called an excited electron .
The electron wants to have the lowest energy possible it quickly releases the added
energy (for example by emitting light) and goes back to its original state, also known
as its ground state.
Ex. silicon
Energy levels
Electrons in larger radius orbits have greater energy
Each orbit has fixed amount of energy associated with it
The outer orbit electron possess more energy than the inner orbit electrons
The first orbit represented the first ener gy level, the second orbit represented the
second energy and so on
Digital Electronics GFGC Tumkur
Unit of energy
Energy is measured in electron volts(eV)
Energy(W)=power(P) x time(t)
Power(P)=voltage(V)x current(I)
W=Pt------1
W=VIt-------2
But scurrent(I)=charge(Q)/time(t)
Or Q=It--------3
W=QV--------4
Energy level is 1eV if charge is of one electron and a potential difference is of 1V
We know that charge of 1 electron is 1.6x10- 19 coulombs
W=QV
=1.6x10- 19 C x 1V
1eV=1.6x10-19 joules
Energy bands
In isolated atom, each orbit has a single energy an electron existing in an orbit can
have only single energy corresponding to the orbit.
In solid the atoms are closely packed. In any orbit, no two electrons see exactly the
same charge environments. So the electrons of an orbit may have slightly differ ent
energies.
“Energy band can be defined as the range of energies possessed by an electron in a
solid.”
Conduction band
It is the uppermost band.
The electrons in the conduction band are all free electrons
They can be easily r emoved by applying external voltage.
The conduction band is empty for insulators. It is partially filled for conductors.
Forbidden band
It is a collection of series of energy levels below the conduction band .there are no
electrons found in this band
Valence band
Valence electrons are the electrons in the outermost orbit of an atom
The outermost orbit is called the valence shell. The r ange of energies possessed by
valence electrons is called the valence band.
Classification of solids
They are
1. Conductor
2. Insulator
3. Semi-conductor
Conductor
A substance which has a large number of free electrons at room temperature is
called conductor of electricity
Ex. metals
Insulators
A substance which has a few numbers of free electrons at room temper ature is
called insulators
Ex. rubber, plastic, paper etc
Semiconductor
A substance which has crystalline structure and contains very few electrons at
room temperature, is called semiconductor
At room temperature semiconductors acts like a conductor
At low temperature semiconductors acts like a insulators
Ex. silicon, germanium
As temperature is increased, more valence electrons cross over to the conduction
band and the conductivity increases. So, electrical conductivity of semi conductor
increases with rise in temperature. so resistance reduces. So semiconductor also
has negative temperatur e co-efficient of resistance.
Digital Electronics GFGC Tumkur
1. Draw the energy level diagram of a conductor and semi-conductor. (1M DEC 2010)
Chapter-4
Semiconductor
Introduction
There are certain substances that are in neither good conductors (metals) nor
insulators (glass).
A substance which has cr ystalline structure and contains very few free electrons at
room temperature is called semiconductor.
Silicon is the principal material widely used in the manufacture of electronic devices
like diodes, transistors and integrated cir cuits.
Definition of semiconductor
on the basis of physical characteristics
o A substance which hascrystalline structureand contains very few free
electrons at room temperature.
on the basis of electrical conductivity
o A substance which has resistivity in between conductors and insulators.
o Ex. Germanium, Silicon, Selenium, Carbon etc
on the basis of energy bands
o Semiconductors may be defined as substance which has almost filled valence
band and nearly empty conduction band with a small energy gap ( 1 ev)
separating the two.
Properties of semiconductors
A semiconductors has crystalline structure i.e. atoms or molecules of semiconductors
are arranged in an orderly manner
A semiconductor is formed by covalent bonds
The resistivity of a semiconductor is less than that of insulator but greater than that of
conductor
A semiconductor has negative temperature co-efficient of resistance
A semiconductor has almost filled valence band and nearly empty conduction band
with a small energy gap of 1eV
Suitable metallic impurity ( arsenic, gallium etc) can be added to a semiconductor to
have controlled conductivity which is an important property.
In the process, electrons engaged in the formation of these bonds are set free. These
free electrons constitute a tiny electric current if potential difference is applied across
the semiconductor crystal.
With rise in temperature the resistance of semiconductors decreases and conductivity
increases. So it is said to have negative temperature co-efficient of resistance.
Hole current
When a covalent bond is broken due to thermal energy, it sets the electrons of the
bond free. The bond from which an electron escapes is left with a deficiency known
as Hole. This hole becomes filled by an electron from a neighboring covalent bond
which, in turn leaves behind another hole, as shown in fig
Types of semiconductors
Semiconductors may be classified broadly as
1. Intrinsic semiconductors
2. Extrinsic semiconductors
Extrinsic semiconductors may again be classified as
1. n-type extrinsic semiconductors
2. p-type extrinsic semiconductors
Intrinsic semiconductors
Intrinsic semiconductors is a semiconductors in an extremely pur e form
Digital Electronics GFGC Tumkur
Even at room temperature, there are hole-electron pairs created and number of holes
equal to number of free electrons.
Extrinsic semiconductors
Extrinsic semiconductors are the semiconductor whose conductivity can be increase
by the addition of a small amount of suitable metallic impurity to the intrinsic
semiconductors.
Doping
The process of adding impurity to a semiconductor is known as doping.
The elements suitable for doping are trivalent or pentavalent .
Trivalent element
Element that has three valence electrons is called trivalent element
Ex: Boron, Gallium, Indium
Pentavalent element
Element that has five valence electrons is called pentavalent element
Ex: antimony, arsenic, phosphorous
Depending upon the type of impurity added, extrinsic semiconductors are classified as
1. n-type semiconductors
2. p-types semiconductors.
n-type semiconductors
When a small amount of pentavalent impurity is added to a pure semiconductor, it is
known as n-type semiconductor.
Digital Electronics GFGC Tumkur
The addition of pentavalent Impurity provides a large number of free electrons in the
semiconductor crystal.
Such impurities like arsenic (atomic number 33) and antimony (atomic number 51)
are called donor impurities because they provide free electrons to the semiconductor
crystal.
Four valence electrons of the impurity atom arsenic form co-valent bonds with four
Ge atoms.
The fifth valence electron of arsenic atom is free. So in the germanium crystal for
each arsenic atom added one free electron is available small amount of impurity still
provides enough atoms to supply millions of free electrons and hence it is called n-
type semiconductor. (Here „n stands for negative charge)
At room temperature some of the covalent bonds break, thus releasing a number of
free electrons and holes. In addition there are a number of free electrons due to
impurity added. So n-type material has large number of free electrons and a small
number of holes. The free electrons are called majority carriers and the holes are
called minority carries.
P-type semiconductor
When a small amount of trivalent impurity is added to a pure semiconductor, it is
called p-type semiconductor.
This addition of trivalent impurity provides a large number of holes in the p-type
semiconductor. Gallium (atomic number 31) and indium (atomic number 49) are
examples of trivalent impurities. They are called
acceptor impuritiesbecause the
holes created can accept the electrons.
Three valence electrons of the impurity atom (gallium) form covalent bonds with
three germanium atoms. In the fourth covalent bond, only germanium atoms.
Digital Electronics GFGC Tumkur
In the fourth covalent bond only germanium atom contributes one valence electron
while gallium does not have any valence electron to contribute. So the fourth bond is
incomplete, being short of one electron this missing electron is a hole. So for each
gallium atoms added, one hole is created.
A small amount of gallium provides millions of holes. Since there are large numbers
of holes (positive charge) in the material, it is called p-type semiconductor.
In a p-type material, in addition to electron hole pairs due to trivalent impurity the
holes are more so here, holes are the majority carriers and free electrons are
minority carries.
Extrinsic conduction
Extrinsic conduction is the conduction of current in an extrinsic semiconductor either
the n-type or p-type.
There are two types of conductivity .they are
(i) n-type conductivity
(ii) p-type conductivity
Chapter-5
Semiconductor diodes
Introduction
This property is used in and application called rectifier.
Rectifier is a circuit used to convert alternating current to direct current .
Ideal diode
Ideal diode is a two terminal device having the symbol and characteristics as shown in
fig
One important parameter for the diode is the resistance at the point or region of
operation
Forward resistance
Forward resistance can be defined using ohm s law as
Rf = Vf /If
Where Vf is the forward voltage across the diode
I f
is the forward current through the diode.
Vf is zero for an ideal diode
If may be any positive value
Rf = Vf /If =0
The ideal diode, therefore is a short circuit in the region of conductor
„
Reverse resistance
Reverse resistance can be defined using ohm s law
Rr = Vr /Ir
where Vr is the reverse voltage across the diode
Ir is the reverse current through the diode.
Vr is any reverse potential
Ir is zero
so Rr very large number infinity
The ideal diode, therefore is an open circuit in the region of non conduction (i d =0)
P-N Junction
When a p-type semiconductor is suitable joined to n-type semiconductor the contact
surface is called p-n junction .
p-n junction is the basic control element for semiconductor devices.
At the p-n junction there is a tendency for the free electrons from the n-type to diffuse
over to the p-side and holes from the n-side.
Digital Electronics GFGC Tumkur
This situation prevents further diffusion. Positive charge on n-side repels holes from
crossing over from p-type to n-type. Likewise, negative charge on p-side repels free
electrons to enter from n-type to p-type. This setup a barrier against further movement
of holes and free electrons. This is called potential barrier or junction barrier.
This is of the order of 0.1 to 0.3V. This potential barrier gives rise to an electric field .
Majority carriers (holes in p-type and electrons in n-type) are prevented from crossing
the barrier.
The region near the p-n junction that lacks carriers is called the depletion region . It is
the region of uncovered positive and negative ions.
The performance of a diode can be studied with the help of diode characteristics;
This can be studied with three conditions. They are
(i) Zero bias (no applied bias)
(ii) Forward bias
(iii) Reverse
The majority carriers in the n-type material must overcome the attractive forces of
layer of positive ions in the n-type material and negative ions in the p-type material in
order to move into the neutral region o f p-type material.
A small number of majority carriers gain enough ener gy to pass through the depletion
region into the p-type material. Similar is the case with majority carriers in the p-type
material.
So the net flow of charge in either direction is zero when there is no bias (no voltage
applied across the junction.)
The positive and negative char ges set up an electric field, this is a barrier to free
electrons in n-region. There is potential difference across the depletion layer and is
called barrier potential (Vo)
The external dc voltage applied is in such a direction that it cancels the potential
barrier. This permits current flow. The width of depletion the region is reduced .
There is a heavy flow of majority carriers across the junction.
Initially a small potential barrier exists at the p-n junction. When forward potential is
applied as shown in fig and electric field is created such that is completely eliminates
the potential barrier. Then the junction resistance becomes zero. So this allows current
to flow in the circuit. This is called forward current (I f ).
Initially, current increases very slowly and the curve is non-linear. This is the portion
OA of the curve. This is because the external voltage is utilized in overcoming the
potential barrier. Once the external voltage exceeds the potential barrier voltage, the
p-n junction starts conduction and current rises very sharply with increase in external
voltage, this is the portion AB of the curve, now the curve is almost linear.
Knee voltage
It is the forward voltage at which the current through the junction starts to
increase rapidly.When a diode is forward biased, it conducts current very slowly
until the potential barrier is over come it is 0.7v for silicon and 0.3v for germanium.
This is the knee voltage. Once the applied forward voltage exceeds the knee voltage,
current starts increasing rapidly.
The potential barrier voltage is also known as Turn-on voltage.
It is the minimum reverse voltage at which p-n junction breaks down with sudden rise
in reverse current. This is called break down voltage
Dc or static resistance
It is the ratio of direct voltage across the diode to the resulting direct current
Ac or dynamic resistance
It is the ratio of change in forward voltage across the diode to the resulting change in
forward current.
Ac forward resistance= V F / I F
Digital Electronics GFGC Tumkur
Application of diode
Important applications of a diode are
1. As a switch
2. As a rectifier
3. As a logic gate
1. Diode as a switch
A diode conduct current easily when forward biased and practically no current flows
when it is reverse biased. This behaves like a switch which is „on during forward bias and
„off during reverse bias. So it behaves like a closed switch in for ward bias and an open
switch in reverse bias
2. Diode as a rectifier
Rectification means by changing alternating current to direct current. a circuit that
perform rectification is called a rectifier
During the positive half cycle of ac input voltage, the diode is forward biased and
conducts current in the circuit.
During the negative half cycle of input ac voltage, the diode is reverse biased so it
does not conduct current. So outputs consist of only positive half cycle of input ac
voltage. So the diode can be used as a rectifier.
1. What is p-n junction diode? With schematic diagram explain the formation of p-n junction.
(3M.NOV-DEC 2009)
2. Explain the terms. (4M.NOV-DEC 2009)
a. Knee voltage
b. PIV and
c. static and dynamic resistance related to diode.
Digital Electronics GFGC Tumkur
3. Explain the action of diode under un-biased condition. (3M DEC 2010)
4. Explain the action of diode under forward and r everse biased condition. (3M DEC 2010)
5. Explain the action of diode under forward biased condition (3M OCT-NOV 2011)