presentation for bde
TRANSCRIPT
-
8/7/2019 Presentation for bde
1/57
ECE-102 BASIC DIGITAL ELECTONICS
-
8/7/2019 Presentation for bde
2/57
SYLLABUS
Unit- I
Digital system and binary numbers
Characteristics of Digital Systems, Number
system conversions, Boolean algebra, BCDnumbers and their conversions, Binary codes,
Error detecting and correcting codes, Floating
point representation
-
8/7/2019 Presentation for bde
3/57
Gate-level minimization
Basics Gates, SOP simplification, POS
simplification, K-map method, NAND andNOR implementation, Quine Mc-Clusky
method (Tabular method).
-
8/7/2019 Presentation for bde
4/57
Unit-II
Logic Circuits
Basics of logic circuits, combinational
circuits, analysis and design Procedure,adder and subtractor, magnitude
comparator, decoders, encoders,
multiplexers.
Introduction to sequential circuits- latches,
flip flops
-
8/7/2019 Presentation for bde
5/57
TEXT/REFERENCE BOOKS
M. Morris Mano Digital Logic And
Computer Design, PHI publication
M. Morris Mano and M. D. Ciletti, DigitalDesign, 4th Edition, Pearson Education.
Floyd and Jain, Digital Fundamental,
Pearson Education
R.P.Jain , Modern Digital Electronics, 3rd
Edition, TMH Publication.
-
8/7/2019 Presentation for bde
6/57
Analog vs Digital
The major difference between analog and digital quantities, then, can be simply
stated as follows:
Analog = continuous
Digital = discrete (step by step)
-
8/7/2019 Presentation for bde
7/57
-
8/7/2019 Presentation for bde
8/57
Advantages and Limitations of Digital Techniques
Advantages
Easier to design. Exact values of voltage or current are not important,
only the range (HIGH or LOW) in which they fall.
Information storage is easy.
Accuracy and precision are greater.
Operation can be programmed. Analog systems can also be
programmed, but the variety and complexity of the available
operations is severely limited.
Digital circuits are less affected by noise. As long as the noise is not
large enough to prevent us from distinguishing a HIGH from a LOW.
More digital circuitry can be fabricated on IC chips.
-
8/7/2019 Presentation for bde
9/57
Limitations
There is really only one major drawback when using digitaltechniques:
The real world is mainly analog.
Most physical quantities are analog in nature, and it is these
quantities that are often the inputs and outputs that are being
monitored, operated on, and controlled by a system.
To take advantage of digital techniques when dealing with
analog inputs and outputs, three steps must be followed:
1. Convert the real-world analog inputs to digital form. (ADC)
2. Process (operate on) the digital information.
3. Convert the digital outputs back to real-world analog form.
(DAC)
-
8/7/2019 Presentation for bde
10/57
Section 1.3
Representing Binary Quantities
In digital systems the information that is being
processed is usually presented in binary form.
Binary quantities can be represented by anydevice that has only two operating states or
possible conditions.
Eg. a switch has only open or closed. We
arbitrarily (as we define them) let an open switchrepresent binary 0 and a closed switch represent
binary 1. Thus we can represent any binary
number by using series of switches.
-
8/7/2019 Presentation for bde
11/57
Binary 1: Any voltage between 2V to 5V
Binary 0: Any voltage between 0V to 0.8V
Not used: Voltage between 0.8V to 2V,this may cause error in a digitalcircuit.
We can see another significant difference between digital and analog systems. In
digital systems, the exact value of a voltage is notimportant; eg, a voltage of 3.6V
means the same as a voltage of 4.3V. In analog systems, the exact value of a
voltage isimportant.
Typical Voltage Assignment
-
8/7/2019 Presentation for bde
12/57
Digital Number System
Many number systems are in use in digital technology. The
most common are the decimal, binary, octal, and hexadecimal
systems.
The decimal system is clearly the most familiar to us because
it is a tool that we use every day.
Examining some of its characteristics will help us to better
understand the other systems.
-
8/7/2019 Presentation for bde
13/57
103 102 101 100 10-1 10-2 10-3
=1000 =100 =10 =1 . =0.1 =0.01 =0.001
Most
SignificantDigit
Decimalpoint
Least
Significant Digit
Decimal System
Decimal System: The decimal system is composed of 10
numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5,6, 7, 8, 9; using these symbols as digits of a number, we can
express any quantity. The decimal system, also called the
base-10 system because it has 10 digits.
-
8/7/2019 Presentation for bde
14/57
Binary System
In the binary system, there are only two symbols orpossible digit values, 0 and 1. This base-2 system can be
used to represent any quantity that can be represented in
decimal or other number system.
23 22 21 20 2-1 2-2 2-3
=8 =4 =2 =1 . =1/2 =1/4 =1/8
Most
Significant
Bit
Binary
point
Least
Significant
Bit
-
8/7/2019 Presentation for bde
15/57
The Binary counting sequence is shown in the table:
Binary Counting
-
8/7/2019 Presentation for bde
16/57
and
1 0 1 1 0 1 0 1 2(binary)
2
7
+0+2
5
+2
4
+0+2
2
+0+2
0
= 128+0+32+16+0+4+0+1= 18110 (decimal)
1 1 0 1 1 2 (binary)
24+23+0+21+20 = 16+8+0+2+1
= 2710 (decimal)
Binary-To-Decimal Conversion
Any binary number can be converted to its decimal equivalent simply by
summing together the weights of the various positions in the binary number
which contain a 1
You should noticed the method is find the weights (i.e., powers of 2) for
each bit position that contains a 1, and then to add them up.
-
8/7/2019 Presentation for bde
17/57
Decimal-To-Binary Conversion
There are 2 methods:
(A) Revese of Binary-To-Digital Method
45 10 = 32 + 0 + 8 + 4 +0 + 1= 25+0+23+22+0+20
= 1 0 1 1 0 12
-
8/7/2019 Presentation for bde
18/57
(B) Repeat Division
This method uses repeated division by 2. Eg. convert 2510 to binary
25/ 2 = 12+ remainder of 11 (Least Significant
Bit)
12/ 2 = 6 + remaind
er of 0 06 / 2 = 3 + remainder of 0 0
3 / 2 = 1 + remainder of 1 1
1 / 2 = 0 + remainder of 11 (Most Significant
Bit)
Result 2510 = 1 1 0 0 12
-
8/7/2019 Presentation for bde
19/57
The Flow chart for
repeated-division
method is as follow:
-
8/7/2019 Presentation for bde
20/57
Octal Number System
The octal number system has a base of eight, meaningthat it has eight possible digits: 0,1,2,3,4,5,6,7.
83 82 81 80 8-1 8-2 8-3
=512 =64 =8 =1 . =1/8 =1/64 =1/512Most
Significant
Digit
Octal
point
Least
Significant
Digit
Octal to Decimal Conversion
eg. 24.68 = 2 x (81) + 4 x (80) + 6 x (8-1) = 20.7510
-
8/7/2019 Presentation for bde
21/57
Binary-To-Octal / Octal-To-Binary Conversion
Octal
Digit
0 1 2 3 4 5 6 7
BinaryEquiva
lent
000 001 010 011 100 101 110 111
Each Octal digit is represented by three bits of binary digit.
eg. 100 111 0102 = (100) (111) (010)2 = 4 7 28
-
8/7/2019 Presentation for bde
22/57
Repeat DivisionThis method uses repeated division by 8. Eg. convert 17710 to octal and binary:
177/8 = 22+ remainder of 1 1 (Least Significant Bit)
22/ 8 = 2 + remainder of 6 6
2 / 8 = 0 + remainder of 2 2 (Most Significant Bit)
Result 17710 = 2618
Convert to Binary = 0101100012
-
8/7/2019 Presentation for bde
23/57
Hexadecimal Number System
The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It
uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digitsymbols.
163162 161 160 16-1 16-2 16-3
=4096 =256 =16 =1 . =1/16 =1/256=1/409
6
Most
Signific
ant
Digit
Hexad
ec.point
Least
Signific
ant
Digit
-
8/7/2019 Presentation for bde
24/57
Hexadecimal to Decimal Conversion
eg. 2AF16 = 2 x (162
) + 10 x (161
) + 15 x (160
) = 68710Repeat Division: Convert decimal to hexadecimalThis method uses repeated division by 16. Eg. convert 37810 to hexadecimal and binary:
378/16= 23+ remainder of 10
A (Least Significant
Bit)
23/ 16 = 1 + remainder of 7 7
1 / 16 = 0 + remainder of 1 1 (Most Significant Bit)
Result 37810 = 17A8
Convert to Binary= 0001 0111 10102= 00000001 0111 1010
(16 bits)
-
8/7/2019 Presentation for bde
25/57
Binary-To-Hexadecimal /
Hexadecimal-To-Binary Conversion
Hexadecimal
Digit
0 1 2 3 4 5 6 7
Binary
Equivalent0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal
Digit8 9 A B C D E F
BinaryEquivalent
1000 1001 1010 1011 1100 1101 1110 1111
Each Hexadecimal digit is represented by fourbits of binary digit.
eg. 1011 0010 11112 = (1011) (0010) (1111)2 = B 2 F16
-
8/7/2019 Presentation for bde
26/57
Octal-To-Hexadecimal /
Hexadecimal-To-Octal Conversion1) Convert Octal (Hexadecimal) to Binary first.
2a) Regroup the binary number in 3 bits a group starts from the LSB if Octal is required.
Go back to Section 2.3 if you are not sure how to group in Octal.
2b) Regroup the binary number in 4 bits a group from the LSB if Hexadecimal is required.
eg. Convert 5A816 to Octal .
5A816= 0101 1010 1000 (Binary)
= 2 6 5 0 (Octal)
-
8/7/2019 Presentation for bde
27/57
Boolean Variables & Truth Tables
Boolean algebra differs in a major way from ordinary algebra in that boolean
constants and variables are allowed to have only two possible values, 0 or 1.
Boolean 0 and 1 do not represent actual numbers but instead represent the state of
a voltage variable, or what is called its logic level.
Some common representation of 0 and 1 is shown in the following diagram.
Logic 0Logic 1
False True
Off On
Low High
No Yes
Open Switch Close Switch
-
8/7/2019 Presentation for bde
28/57
In boolean algebra, there are three basic logic operations:
OR, AND and NOT.
These logic gates are digital circuits constructed from diodes, transistors,
and resistors connected in such a way that the circuit output is the result of
a basic logic operation (OR, AND, NOT) performed on the inputs.
-
8/7/2019 Presentation for bde
29/57
Truth Table
A truth table is a means for describing how a logic circuit's outputdepends on the logic levels present at the circuit's inputs.
In the following two-inputs logic circuit, the table lists all possible
combinations of logic levels present at inputs A and B along with
the corresponding output level X.
When either input A OR B is 1, the output X is 1. Therefore the "?"
in the box is an OR gate. Go to next section to explore more on
the OR gate.
-
8/7/2019 Presentation for bde
30/57
OR Operation
The expression X = A + B reads as "X equals A OR B".
The + sign stands for the OR operation, not for ordinary addition.
The OR operation produces a result of 1 when any of the input variable is 1.
The OR operation produces a result of 0 only when all the input variables are 0.
-
8/7/2019 Presentation for bde
31/57
An example of three input OR gate and its truth table is as follows:
With the OR operation, 1 + 1 = 1, 1+ 1 + 1 = 1 and so on.
-
8/7/2019 Presentation for bde
32/57
AND Operation
The expression X = A * B reads as "X equals A AND B".
The multiplication sign stands for the AND operation, same for ordinarymultiplication of 1s and 0s.
The AND operation produces a result of 1 occurs only for the single case when
all of the input variables are 1.
The output is 0 for any case where one or more inputs are 0
-
8/7/2019 Presentation for bde
33/57
NOT Operation
The NOT operation is unlike the OR and AND operations in that it can be
performed on a single input variable. For example, if the variable A is subjected to
the NOT operation, the result x can be expressed asx = A'
where the prime (') represents the NOT operation. This expression is read as:
x equals NOT A
x equals the inverse of A
x equals the complement of A
Each of these is in common usage and all indicate that the logic value of x = A' isopposite to the logic value of A.
The truth table of the NOT operation is as follows:
The NOT operation is also referred to as inversion or complementation, and
these terms are used interchangeably.
1' = 0 because NOT 1 is 00' = 1 because NOT 0 is 1
-
8/7/2019 Presentation for bde
34/57
NOR Operation
NOR and NAND gates are used extensively in digital circuitry. These gates
combine the basic operations AND, OR and NOT, which make it relatively easyto describe then using Boolean Algebra.
NOR is the same as the OR gate symbol exceptthat it has a small circle on the
output. This small circle represents the inversion operation. Therefore the output
expression of the two input NOR gate is:
X = ( A + B )'
-
8/7/2019 Presentation for bde
35/57
NAND Operation
NAND is the same as the AND gate symbol exceptthat it has a small circle onthe output. This small circle represents the inversion operation. Therefore the
output expression of the two input NAND gate is:
X = ( AB )'
-
8/7/2019 Presentation for bde
36/57
Section 4.1
-
8/7/2019 Presentation for bde
37/57
Describing Logic Circuits Algebraically
Any logic circuit, no matter how complex, may be completely describedusing the Boolean operations, because the OR gate, AND gate, and NOT
circuit are the basic building blocks of digital systems.
This is an example of the circuit using Boolean expression:
If an expression contains both AND and OR operations, the AND operations
are performed first (X=AB+C : AB is performed first), unless there are
parentheses in the expression, in which case the operation inside the
parentheses is to be performed first (X=(A+B)+C : A+B is performed first).
-
8/7/2019 Presentation for bde
38/57
Circuits containing Inverters
Whenever an INVERTER is present in a logic-circuit diagram, its output
expression is simply equal to the input expression with a prime (') overit.
-
8/7/2019 Presentation for bde
39/57
Section 4.2
Evaluating Logic Circuit Outputs
Once the Boolean expression for a circuit output has been obtained, the
output logic level can be determined for any set of input levels.
This are two examples of the evaluating logic circuit output:
Let A=0, B=1, C=1, D=1
X = A'BC (A+D)'
= 0'*1*1* (0+1)'
= 1 *1*1* (1)'
= 1 *1*1* 0
= 0
-
8/7/2019 Presentation for bde
40/57
Let A=0, B=0, C=1, D=1, E=1
X
= [D+ ((A+B)C)'] * E
= [1 + ((0+0)1 )'] * 1
= [1 + (0*1)'] * 1
= [1+ 0'] *1
= [1+ 1 ] * 1
= 1
In general, the following rules must always be followed when evaluating a Boolean
expression:
1. First, perform all inversions of single terms; that is, 0 = 1 or 1 = 0.
2. Then perform all operations within parentheses.
3. Perform an AND operation before an OR operation unless parentheses indicate
otherwise.
4. If an expression has a bar over it, perform the operations of the expression first
and then invert the result.
-
8/7/2019 Presentation for bde
41/57
Determining Output Level from a Diagram
The output logic level for given input levels can also be determined
directly from the circuit diagram without using the Boolean expression.
-
8/7/2019 Presentation for bde
42/57
Section 4.3
Implementing Circuits From Boolean Expression
If the operation of a circuit is defined by a Boolean expression, a logic-
circuit diagram can he implemented directly from that expression.
Suppose that we wanted to construct a circuit whose output is y = AC+BC'
+ A'BC. This Boolean expression contains three terms (AC, BC', A'BC),which are ORed together. This tells us that a three-input OR gate is
required with inputs that are equal to AC, BC', and A'BC, respectively.
Each OR-gate input is an AND product term, which means that an AND
gate with appropriate inputs can be used to generate each of these terms.
Note the use of INVERTERs to produce the A' and C' terms required in
the expression.
-
8/7/2019 Presentation for bde
43/57
-
8/7/2019 Presentation for bde
44/57
Section 4.4
Boolean Theorems
Investigating the various Boolean theorems (rules) can help us to simplify logic
expressions and logic circuits.
-
8/7/2019 Presentation for bde
45/57
Multivariable TheoremsThe theorems presented below involve more than one variable:
(9)x + y = y + x (commutative law)
(10) x * y = y * x (commutative law)
(11) x+ (y+z) = (x+y) +z = x+y+z (associative law)
(12) x (yz) = (xy) z = xyz (associative law)
(13a) x (y+z) = xy + xz
(13b) (w+x)(y+z) = wy + xy + wz + xz
(14) x + xy = x [proof see below]
(15) x + x'y = x + y
-
8/7/2019 Presentation for bde
46/57
Proof of (14)
x + xy= x (1+y)
= x * 1 [using theorem (6)]
= x [using theorem (2)]
-
8/7/2019 Presentation for bde
47/57
Section 4.5
DeMorgan's Theorem
DeMorgan's theorems are extremely useful in simplifying
expressions in which a product or sum of variables is inverted.
The two theorems are:
(16) (x+y)' = x' * y'(17) (x*y)' = x' + y'
Theorem (16) says that when the OR sum of two variables is
inverted, this is the same as inverting each variable individually
and then ANDing these inverted variables.
Theorem (17) says that when the AND product of two variables
is inverted, this is the same as inverting each variableindividually and then ORing them.
-
8/7/2019 Presentation for bde
48/57
Example
X= [(A'+C) * (B+D')]'
= (A'+C)' + (B+D')' [by theorem (17)]
= (A''*C') + (B'+D'') [by theorem (16)]
= AC' + B'D
-
8/7/2019 Presentation for bde
49/57
Three Variables DeMorgan's Theorem
(18) (x+y+z)' = x' * y' * z'
(19) (xyz)' = x' + y' + z'
-
8/7/2019 Presentation for bde
50/57
Implications of DeMorgan's Theorem
For (16): (x+y)' = x' * y'
-
8/7/2019 Presentation for bde
51/57
For (17): (x*y)' = x' + y'
-
8/7/2019 Presentation for bde
52/57
Section 4.6
Universality of NAND & NOR Gates
It is possible to implement anylogic expression using only NAND gates and
no other type of gate. This is because NAND gates, in the proper
combination, can be used to perform each of the Boolean operations OR,
AND, and INVERT.
-
8/7/2019 Presentation for bde
53/57
In a similar manner, it can be shown that NOR gates can
be arranged to implement any of the Boolean operations.
-
8/7/2019 Presentation for bde
54/57
Section 4.7
Alternate Logic Gate Representations
The left side of the illustration shows the standard symbol for each logic
gate, and the right side shows the alternate symbol. The alternate
symbol for each gate is obtained from the standard symbol by doing thefollowing:
1. Invert each input and output of the standard symbol. This is done by
adding bubbles (small circles) on input and output lines that do not have
bubbles, and by removing bubbles that are already there.
2. Change the operation symbol from AND to OR, or from OR to AND.
(In the special case of the INVERTER, the operation symbol is notchanged.)
-
8/7/2019 Presentation for bde
55/57
-
8/7/2019 Presentation for bde
56/57
Several points should be stressed regarding the logic symbol
equivalences:
1. The equivalences are valid for gates with any number of inputs.
2. None of the standard symbols have bubbles on their inputs, and all
the alternate symbols do.
3. The standard and alternate symbols for each gate represent thesame physical circuit: there is no difference in the circuits represented
by the two symbols.
4. NAND and NOR gates are inverting gates, and so both the standard
and alternate symbols for each will have a bubble on either the input or
the output. AND and OR gates are noninverting gates, and so the
alternate symbols for each will have bubbles on both inputs and
output.
-
8/7/2019 Presentation for bde
57/57
Section 4.8
Logic Symbol Interpretation
Concept of Active Logic Levels:
When an input or output line on a logic circuit symbol has no bubble on it,
that line is said to be active-HIGH. When an input or output line does have
a bubble on it, that line is said to be active-LOW. The presence or
absence of a bubble, then, determines the active-HIGH/active-LOW status
of a circuit's inputs and output, and is used to interpret the circuitoperation.