DEPARTMENT OF
ELECTRONICS AND COMMUNICATION
ENGINEERING
Instructor
D V S Ramanjaneyulu
Accredited by NBA & NAAC with “A” Grade
CS301ES : ANALOG & DIGITAL ELECTRONICS
P.KIRAN KUMAR,ECE DEPARTMENT 2
UNIT - IV
P.KIRAN KUMAR,ECE DEPARTMENT 3
Boolean Algebra
•Developed by English Mathematician George Boole in
between 1815 -1864.
•It is described as an algebra of logic or an algebra of two
values i.e True or False.
•The term logic means a statement having binary decisions i.e
True/Yes or False/No.
P.KIRAN KUMAR,ECE DEPARTMENT 4
Application of Boolean algebra
•It is used to perform the logical operations in digital computer.
•In digital computer True represent by ‘1’ (high voltage)and False represent by ‘0’
(low voltage)
•Logical operations are performed by logical operators. The fundamental logical
operators are:
1.AND (conjunction)
2.OR (disjunction)
3.NOT (negation/complement)
Boolean Algebra applied in computers electronic circuits. These
circuits perform Boolean operations and these are called logic circuits
or logic gates.
P.KIRAN KUMAR,ECE DEPARTMENT 5
Operators
AND operator
•It performs logical
multiplication and denoted
by (.) dot.
X Y X.Y
0 0 0
0 1 0
1 0 0
1 1 1
OR operator NOT operator
•It performs logical
addition and denoted by
(+) plus.
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
•It performs logical
negation and denoted by
(-) bar. It operates on
single variable.
X X
0 1
1 0
P.KIRAN KUMAR,ECE DEPARTMENT 6
Basic Theorems of Boolean Algebra
P.KIRAN KUMAR,ECE DEPARTMENT 7
Basic Theorems of Boolean Algebra
Note that theorem 1(b) is the dual of theorem 1(a) and that each step of the
proof in part (b) is the dual of its counterpart in part (a). Any dual theorem can
be similarly derived from the proof of its corresponding theorem.
P.KIRAN KUMAR,ECE DEPARTMENT 8
Basic Theorems of Boolean Algebra
P.KIRAN KUMAR,ECE DEPARTMENT 9
Boolean Function
• A Boolean function expresses the logical relationship between binary variables and is
evaluated by determining the binary value of the expression for all possible values of
the variables.
•A Boolean function can be represented in a truth table. The number of rows in the
truth table is 2n, where n is the number of variables in the function.
•The binary combinations for the truth table are obtained from the binary numbers by
counting from 0 through 2n - 1.
By considering the possible simplification of
the function by applying some of the identities
of Boolean algebra:
P.KIRAN KUMAR,ECE DEPARTMENT 10
Boolean Function
P.KIRAN KUMAR,ECE DEPARTMENT 11
Canonical and Standard Forms
A Boolean function can be expressed algebraically from a given truth table
 By forming a minterm for each combination of the variables that produces a 1 in the
function and then taking the OR of all those terms.
By forming a maxterm for each combination of the variables that produces
a 0 in the function, and then form the AND of all those maxterms.
Boolean functions expressed as a sum of minterms or product of maxterms are
said to be in canonical form .
Using Minterms
Using Maxterms
P.KIRAN KUMAR,ECE DEPARTMENT 12
Canonical and Standard Forms
P.KIRAN KUMAR,ECE DEPARTMENT 13
Canonical and Standard Forms
• Another way to express Boolean functions is in standard form. In this configuration,
the terms that form the function may contain one, two, or any number of literals. There
are two types of standard forms: the sum of products and products of sums.
•The sum of products is a Boolean expression containing AND terms, called product
terms, with one or more literals each. The sum denotes the ORing of these terms.
• A product of sums is a Boolean expression containing OR terms, called sum terms.
Each term may have any number of literals. The product denotes the ANDing of these
terms.
• In standard SOP and POS each term of Boolean expression must contain all the
literals (with and with out bar) that has been used in Boolean expression.
• If the above condition is satisfied by the Boolean expression, that expression is
called Canonical form of Boolean expression.
P.KIRAN KUMAR,ECE DEPARTMENT 14
Canonical and Standard Forms
Sum of Product( SOP) form Product of Sum (POS form)
P.KIRAN KUMAR,ECE DEPARTMENT 15
Canonical and Standard Forms
Purpose of the Index
• Minterms and Maxterms are designated with an index
 The index number corresponds to a binary pattern
 The index for the minterm or maxterm, expressed as a binary number, is used to
determine whether the variable is shown in the true or complemented form
• For Minterms:
‘1’ means the variable is “Not Complemented” and
‘0’ means the variable is “Complemented”.
• For Maxterms:
‘0’ means the variable is “Not Complemented” and
‘1’ means the variable is “Complemented”.
P.KIRAN KUMAR,ECE DEPARTMENT 16
Canonical and Standard Forms
P.KIRAN KUMAR,ECE DEPARTMENT 17
Canonical and Standard Forms
P.KIRAN KUMAR,ECE DEPARTMENT 18
Canonical and Standard Forms
P.KIRAN KUMAR,ECE DEPARTMENT 19
Digital Logic Gates
P.KIRAN KUMAR,ECE DEPARTMENT 20
Digital Logic Gates
P.KIRAN KUMAR,ECE DEPARTMENT 21
Minimization of Boolean Expression
• Canonical SOP (Sum of Minterms) and POS (Product of Maxterm) is the derivation
/expansion of Boolean Expression.
•Canonical forms are not usually minimal.
• Minimization of Boolean expression is needed to simplify the Boolean expression and
thus reduce the circuitry complexity as it uses less number of gates to produce same
output that can be taken by long canonical expression.
 Two method can be applied to reduce the Boolean expression
i) Algebraic
ii) Using Karnaugh Map (K-Map).
P.KIRAN KUMAR,ECE DEPARTMENT 22
Minimization of Boolean Expression
P.KIRAN KUMAR,ECE DEPARTMENT 23
Minimization of Boolean Expression
P.KIRAN KUMAR,ECE DEPARTMENT 24
KarnaughMap
The Karnaugh map (K-map for short), Maurice Karnaugh's 1953 refinement of
Edward Veitch's 1952 Veitch diagram, is a method to simplify Boolean algebra
expressions.
 K-Maps are a convenient way to simplify Boolean Expressions.
They can be used for up to 4 or 5 variables.
They are a visual representation of a truth table.
P.KIRAN KUMAR,ECE DEPARTMENT 25
KarnaughMap
K-map for three variables K-map for Four variables
K-map for five variables
P.KIRAN KUMAR,ECE DEPARTMENT 26
Truth table to K-Map (2 variable minterm)
P.KIRAN KUMAR,ECE DEPARTMENT 27
K-Maps (2 Variables k-map contd…)
P.KIRAN KUMAR,ECE DEPARTMENT 28
K - Map
P.KIRAN KUMAR,ECE DEPARTMENT 29
Three Variable K-Map (Contd…)
P.KIRAN KUMAR,ECE DEPARTMENT 30
Three Variable K-Map (Contd…)
P.KIRAN KUMAR,ECE DEPARTMENT 31
Karnaugh Maps -Four Variable K-Map
P.KIRAN KUMAR,ECE DEPARTMENT 32
K-Map Reduction Rule
To reduce the Boolean expression, first we have to mark pairs, quads and octets.
Pair –remove one variable
Quad –remove two variables
Octet –remove three variables
Imp –To get the optimum reduction, priority is given to octet first, then quad
and then pair.
P.KIRAN KUMAR,ECE DEPARTMENT 33
Karnaugh Maps -Four Variable K-Map
P.KIRAN KUMAR,ECE DEPARTMENT 34
Karnaugh Maps -Four Variable K-Map
P.KIRAN KUMAR,ECE DEPARTMENT 35
Karnaugh Maps -Four Variable K-Map
P.KIRAN KUMAR,ECE DEPARTMENT 36
Karnaugh Maps -Four Variable K-Map
P.KIRAN KUMAR,ECE DEPARTMENT 37
K - Map
Redundant Term
P.KIRAN KUMAR,ECE DEPARTMENT 38
K - Map
More than one solution
P.KIRAN KUMAR,ECE DEPARTMENT 39
Four Variable: POS KarnaughMap
P.KIRAN KUMAR,ECE DEPARTMENT 40
Karnaughmaps: Don’t cares
•In some cases, outputs are undefined. We “don’t care” if the logic produces a 0 or a
1. This knowledge can be used to simplify functions.
 Treat X’s like either 1’s or 0’s
 Very useful
 OK to leave some X’s uncovered
P.KIRAN KUMAR,ECE DEPARTMENT 41
Karnaughmaps: Don’t cares
P.KIRAN KUMAR,ECE DEPARTMENT 42
Don’t Care Conditions
In some situations, we don’t care about the value of a function for certain
combinations of the variables.
–these combinations may be impossible in certain contexts
–or the value of the function may not matter in when the combinations occur
•In such situations we say the function is incompletely specified and there are
multiple (completely specified) logic functions that can be used in the design.
–so we can select a function that gives the simplest circuit
•When constructing the terms in the simplification procedure, we can choose to
either cover or not cover the don’t care conditions.
P.KIRAN KUMAR,ECE DEPARTMENT 43
Map Simplification with Don’t Cares
P.KIRAN KUMAR,ECE DEPARTMENT 44
NAND Implementation of Boolean function
The NAND gate is said to be a universal gate because any logic circuit can be
implemented with it. To show that any Boolean function can be implemented with
NAND gates, we need only show that the logical operations of AND, OR, and
complement can be obtained with NAND gates alone.
A convenient way to implement a Boolean function with NAND gates is to obtain
the simplified Boolean function in terms of Boolean operators and then convert
the function to NAND logic
P.KIRAN KUMAR,ECE DEPARTMENT 45
Two-Level Implementation
The procedure for obtaining the logic diagram from a Boolean function is as follows:
1. Simplify the function and express it in sum-of-products form.
2. Draw a NAND gate for each product term of the expression that has at least two
literals. The inputs to each NAND gate are the literals of the term. This procedure
produces a group of first-level gates.
3. Draw a single gate using the AND-invert or the invert-OR graphic symbol in the
second level, with inputs coming from outputs of first-level gates.
4. A term with a single literal requires an inverter in the first level. However, if the
single literal is complemented, it can be connected directly to an input of the second
level NAND gate.
P.KIRAN KUMAR,ECE DEPARTMENT 46
Problem
Implement the following Boolean function with NAND gates:
F (x, y, z) = (1, 2, 3, 4, 5, 7)
P.KIRAN KUMAR,ECE DEPARTMENT 47
Multilevel NAND Circuits
The most common procedure in the design of multilevel circuits is to express the
Boolean function in terms of AND, OR, and complement operations. The function can
then be implemented with AND and OR gates.
The general procedure for converting a multilevel AND–OR diagram into an all-
NAND diagram using mixed notation is as follows:
1. Convert all AND gates to NAND gates with AND-invert graphic symbols.
2. Convert all OR gates to NAND gates with invert-OR graphic symbols.
3. Check all the bubbles in the diagram. For every bubble that is not compensated
by another small circle along the same line, insert an inverter (a one-input NAND
gate) or complement the input literal.
P.KIRAN KUMAR,ECE DEPARTMENT 48
Problem
Implement the following multilevel Boolean function
F = (AB + AB)(C + D)
P.KIRAN KUMAR,ECE DEPARTMENT 49
NOR Implementation
The NOR operation is the dual of the NAND operation. Therefore, all procedures and
rules for NOR logic are the duals of the corresponding procedures and rules developed
for NAND logic. The NOR gate is another universal gate that can be used to implement
any Boolean function.
P.KIRAN KUMAR,ECE DEPARTMENT 50
Problem
Implement the following multilevel Boolean function
F = (AB + AB)(C + D)
P.KIRAN KUMAR,ECE DEPARTMENT 51
Exclusive‐OR (XOR) Function
P.KIRAN KUMAR,ECE DEPARTMENT 52
XOR function implementation
XOR(a,b) = ab’ + a’b
• Straightforward: 5 gates
– 2 inverters, two 2‐input ANDs, one 2‐input OR
– 2 inverters & 3 2‐input NANDs
• Nonstraightforward:
– 4 NAND gates
XOR circuit with 4 NANDs
P.KIRAN KUMAR,ECE DEPARTMENT 53
Adder
•The most basic arithmetic operation is the addition of two binary digits.
•This simple addition consists of four possible elementary operations: 0 + 0 = 0, 0 + 1
= 1, 1 + 0 = 1, and 1 + 1 = 10.
•The first three operations produce a sum of one digit, but when both addend bits are
equal to 1, the binary sum consists of two digits. The higher significant bit of this result
is called a carry .
•A combinational circuit that performs the addition of two bits is called a half adder .
One that performs the addition of three bits (two significant bits and a previous carry)
is a full adder .
•The names of the circuits stem from the fact that two half adders can be employed to
implement a full adder.
P.KIRAN KUMAR,ECE DEPARTMENT 54
Half Adder
P.KIRAN KUMAR,ECE DEPARTMENT 55
Full Adder
•Three inputs. Two are operand bits, third is Cin
• Two outputs: sum and carry
K Map for S
In a half adder the sum bit:
P.KIRAN KUMAR,ECE DEPARTMENT 56
Full Adder
K Map for C
In a half adder the carry bit:
C = XY
P.KIRAN KUMAR,ECE DEPARTMENT 57
Full Adder
Using two half Adders to Build a Full Adder
• Full adder functions
• Half adder functions
S =
C = XY
P.KIRAN KUMAR,ECE DEPARTMENT 58
Full Adder
Two Half Adders (and an OR)
P.KIRAN KUMAR,ECE DEPARTMENT 59
Subtractor
• Compute M‐N
– Add 2’s complement of N to M:
M + (2n – N)
• If M >= N, need only “one adder” and a “complemented of N” to do
the subtraction.
• If M < N, we also need to take 2’s complement of adder’s output to
produce magnitude of result
2n ‐{ M + (2n – N)} = N‐M
P.KIRAN KUMAR,ECE DEPARTMENT 60
Adder‐Subtractor Design: (A+B) OR (A‐B)
• Output is result if A >= B; Discard carry
• Output is 2’s complement of result if B > A
P.KIRAN KUMAR,ECE DEPARTMENT 61
Decimal Adders
•Computers or calculators that perform arithmetic operations directly in the
decimal number system represent decimal numbers in binary coded form.
• An adder for such a computer must employ arithmetic circuits that accept
coded decimal numbers and present results in the same code.
• A decimal adder requires a minimum of nine inputs and five outputs, since
four bits are required to code each decimal digit and the circuit must have an
input and output carry.
•There is a wide variety of possible decimal adder circuits, depending upon
the code used to represent the decimal digits.
P.KIRAN KUMAR,ECE DEPARTMENT 62
8421 weighted coding scheme or BCD Code
•Inputs: 𝐴3 𝐴2 𝐴1 𝐴0 , 𝐵3 𝐵2 𝐵1 𝐵0 ,𝐶𝑖𝑛 from
previous decade.
•Output: 𝐶𝑜𝑢𝑡(carry to next decade), 𝑍3 𝑍2 𝑍1 𝑍0.
•Idea: Perform regular binary addition and then
apply a corrective procedure.
P.KIRAN KUMAR,ECE DEPARTMENT 63
Comparing Binary and BCD Sums
P.KIRAN KUMAR,ECE DEPARTMENT 64
Rules of BCD adder
•When the binary sum is greater than 1001, we obtain a non – valid BCD
representation.
•The addition of binary6 (0110) to the binary sum converts it to the correct
BCD representation and also produces an output carry as required.
•To distinguish them from binary 1000 and 1001, which also have a 1 in
position Z8 ,we specify further that either Z4 or Z2 must have a 1.
C=K+Z8Z4+Z8Z2
P.KIRAN KUMAR,ECE DEPARTMENT 65
Implementation of BCD adder
• A decimal parallel adder that
adds n decimal digits needs n
BCD adder stages.
• The output carry from one stage
must be connected to the input
carry of the next higher-order
stage.
P.KIRAN KUMAR,ECE DEPARTMENT 66
Binary Multiplier
Two bit Multiplication:
Three bit Multiplication
•Partial products are: 101 ×1, 101 ×1, and 101 ×0
• The partial product summation for n digit, base 2
numbers requires adding up to n digits (with
carries) in a column.
• n×m digit multiplication generates up to an m + n
digit result (same as decimal).
P.KIRAN KUMAR,ECE DEPARTMENT 67
Multiplier Boolean Equations
• We can also make an n×m “block” multiplier and use that to form partial products.
• Example: 2 ×2 –The logic equations for each partial-product binary digit are shown
below:
• We need to "add" the columns to get the product bits P0, P1, P2, and P3.
•Note that some columns may generate carries.
P.KIRAN KUMAR,ECE DEPARTMENT 68
A 2x2 binary multiplier
•The AND gates produce the partial
products.
•For a 2-bit by 2-bit multiplier, we can just
use two half adders to sum the partial
products. In general, though, we’ll need full
adders.
•Here C3-C0are the product, not carries!
P.KIRAN KUMAR,ECE DEPARTMENT 69
Multiplication: a special case
•In decimal, an easy way to multiply by 10 is to shift all the digits to the left,
and tack a 0 to the right end.
128x 10 = 1280
•We can do the same thing in binary. Shifting left is equivalent to
multiplying by 2:
11x 10 = 110(in decimal, 3 x 2 = 6)
•Shifting left twice is equivalent to multiplying by 4:
11x 100 = 1100(in decimal, 3 x 4 = 12)
•As an aside, shifting to the rightis equivalent to dividingby 2.
110÷10 = 11(in decimal, 6 ÷2 = 3)
P.KIRAN KUMAR,ECE DEPARTMENT 70
Two-Bit Comparator
P.KIRAN KUMAR,ECE DEPARTMENT 71
Two-Bit Comparator
P.KIRAN KUMAR,ECE DEPARTMENT 72
Equality Comparator
4-Bit Equality Comparator
P.KIRAN KUMAR,ECE DEPARTMENT 73
Magnitude Comparator
A > B = A3 . B3’
+ C3 . A2 . B2’
+ C3 . C2 . A1 . B1’
+ C3 . C2 . C1 . A0 . B0’
A < B = A3’ . B3
+ C3 . A2’ . B2
+ C3 . C2 . A1’ . B1
+ C3 . C2 . C1 . A0’ . B0
P.KIRAN KUMAR,ECE DEPARTMENT 74
Decoders
• A decoder is a logic circuit that accepts a set of inputs that represents a binary
number and activates only the output that corresponds to the input number.
• In other words, a decoder circuit looks at its inputs, determines which binary
number is present there, and activates the one output that corresponds to that
number; all other outputs remain in active
• In its general form, a decoder has N input lines to handle N bits and form one to 2N
output lines to indicate the presence of one or more N-bit combinations.
The basic binary function
• An AND gate can be used as the basic decoding element because it produces a
HIGH output only when all inputs are HIGH
P.KIRAN KUMAR,ECE DEPARTMENT 75
Decoders
Decoding logic for the binary code 1001 with an active-HIGH output.
P.KIRAN KUMAR,ECE DEPARTMENT 76
Decoder
General decoder diagram
# There are 2N possible input combinations, from A0to AN-1.
For each of these input combinations only one of the M outputs will be active
HIGH (1), all the other outputs are LOW (0).
P.KIRAN KUMAR,ECE DEPARTMENT 77
Decoder
• If an active - LOW output (74138, one of the output will low and the rest
will be high) is required for each decoded number, the entire decoder can
be implemented with
1. NAND gates
2. Inverters
• If an active – HIGH output (74139, one of the output will high and the
rest will be low) is required for each decoded number, the entire decoder
can be implemented with
1. AND gates
2. Inverters
P.KIRAN KUMAR,ECE DEPARTMENT 78
2-to-4-Line Decoder
(with Enable input)-Active LOW output (1)...
P.KIRAN KUMAR,ECE DEPARTMENT 79
2-to-4-Line Decoder
(with Enable input)-Active LOW output (2)
• The circuit operates with complemented outputs and a complement enable
input. The decoder is enabled when E is equal to 0.
• Only one output can be equal to 0 at any given time, all other outputs are
equal to 1.
•The output whose value is equal to 0 represents the minterms elected by
inputs A and B
•The circuit is disabled when E is equal to 1.
P.KIRAN KUMAR,ECE DEPARTMENT 80
3-8 line decoder (active-HIGH)
P.KIRAN KUMAR,ECE DEPARTMENT 81
3-8 line decoder (active-HIGH)
• This decoder can be referred to in several ways. It can be called a 3-line-to-
8-line decoder, because it has three input lines and eight output lines.
•It could also be called a binary-octal decoder or converters because it takes
a three bit binary input code and activates the one of the eight outputs
corresponding to that code. It is also referred to as a 1-of-8 decoder, because
only 1 of the 8 outputs is activated at one time.
P.KIRAN KUMAR,ECE DEPARTMENT 82
74138 (Example of a 3 - 8 Bit Decoder)
• There is an enable function on this device, a LOW level on each input E’1,
and E’2, and a HIGH level on input E3, is required in order to make the
enable gate output HIGH.
• The enable is connected to an input of each NAND gate in the decoder, so
it must be HIGH for the NAND gate to be enabled.
•If the enable gate is not activated then all eight decoder outputs will be
HIGH regardless of the states of the three input variables A0, A1, and A2.
P.KIRAN KUMAR,ECE DEPARTMENT 83
Logic diagram of 74138 (Example of a 3 Bit
Decoder)
P.KIRAN KUMAR,ECE DEPARTMENT 84
Truth table of 74138 (Example of a 3 - 8 Bit
Decoder) active-LOW
P.KIRAN KUMAR,ECE DEPARTMENT 85
4-line-to-16 line Decoder constructed with two 3-
line-to-8 line decoders
• When w=0, the top decoder is enabled and the other is disabled. The bottom
decoder outputs are all 0’s , and the top eight outputs generate min-terms 0000 to
0111.
•When w=1, the enable conditions are reversed. The bottom decoder outputs
generate min-terms 1000 to 1111, while the outputs of the top decoder are all 0’s.
P.KIRAN KUMAR,ECE DEPARTMENT 86
Encoder
• An encoder is a combinational logic circuit that essentially performs a “reverse” of
decoder functions.
• An encoder accepts an active level on one of its inputs, representing digit, such as a
decimal or octal digits, and converts it to a coded output such as BCD or binary.
• Encoders can also be devised to encode various symbols and alphabetic characters.
• The process of converting from familiar symbols or numbers to a coded format is
called encoding.
• Most decoders accept an input code and produce a HIGH ( or a LOW) at one and
only one output line.
• In other worlds, a decoder identifies, recognizes, or detects a particular code. The
opposite of this decoding process is called encoding and is performed by a logic
circuit called an encoder.
• An encoder has a number of input lines, only one of which input is activated at a
given time and produces an N-bit output code, depending on which input is activated.
P.KIRAN KUMAR,ECE DEPARTMENT 87
Encoder
General encoder diagram Logic circuit for octal-to binary encoder
[8-line-3-line ]
P.KIRAN KUMAR,ECE DEPARTMENT 88
Encoder
Truth table for octal-to binary encoder [8-line-3-line ]
A low at any single input will produce the output binary code corresponding to that
input. For instance, a low at A3’ will produce O2=0, O1=1 and O0=1, which is binary
code for 3. Ao’ is not connected to the logic gates because the encoder outputs
always be normally at 000 when none of the inputs is LOW
P.KIRAN KUMAR,ECE DEPARTMENT 89
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder)
• A priority encoder is an encoder that includes the priority function
• If two or more inputs are equal to 1 at the same time, the input having the highest
priority will take precedence.
Truth Table of a 4-input Priority Encoder:
P.KIRAN KUMAR,ECE DEPARTMENT 90
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder)
• In addition to two outputs x, and y, the truth table has a third output
designated by V, which is a valid bit indicator that is set1 when one or more
inputs are equal to 1. If all inputs are 0, there is no valid input and V is equal
to 0.
• X’s in the output column indicate don’t care conditions, the X’s in the input
columns are useful for representing a truth table in condensed form.
• The higher the subscript number, the higher the priority of the input. Input D3
has the highest priority, so regardless of the values of the other inputs, when
this input is 1, the output for xy is 11 (binary3)
P.KIRAN KUMAR,ECE DEPARTMENT 91
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder)
V=D0+D1+D2+D3
K-Maps for 4-input Priority Encoder
P.KIRAN KUMAR,ECE DEPARTMENT 92
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder)
Logic Diagram for 4-input priority encoder
P.KIRAN KUMAR,ECE DEPARTMENT 93
MULTIPLEXERS (Data Selectors)
 A multiplexers (MUX) is a device that allows digital information from several
sources to be routed on to a single line for transmission over that line to a common
destination.
 The basic multiplexers has several data input lines and a single output line. It also
has data – select inputs, which permit digital data on any one of the inputs to be
switched to the output line.
 A modern stereo system may have a switch that selects music from one of four
sources: a cassette tape, CD, a radio tuner, or an auxiliary input such as audio from
a VCR or DVD. The switch selects one of the electronic signals from one of these
four sources and sends it to the power amplifier and speakers.
 In simple terms, this is what a multiplexer (MUX) does; it selects one of several
input signals and passes it on to the output.
P.KIRAN KUMAR,ECE DEPARTMENT 94
Functional diagram of MUX
P.KIRAN KUMAR,ECE DEPARTMENT 95
Two-input multiplexer
P.KIRAN KUMAR,ECE DEPARTMENT 96
Four-input multiplexer
P.KIRAN KUMAR,ECE DEPARTMENT 97
Logic symbol for a 1-of-4 data selector/multiplexer.
P.KIRAN KUMAR,ECE DEPARTMENT 98
LOGIC FUNCTION GENERATION USING
MUX-Method
• An efficient method for implementing a Boolean function of n variables with a
MUX that has n-1 selection inputs and 2 n-1data inputs is given below:
–List the Boolean function in a truth table
–Apply the first n-1 variables in the table to the selection inputs of the
MUX.
–For each combination of the selection variables, evaluate the output
as a function of the last variable. This function can be 0,1, the
variable, or the complement of the variable. Apply these values to the
data inputs in the proper order.
P.KIRAN KUMAR,ECE DEPARTMENT 99
LOGIC FUNCTION GENERATION USING MUX
Exercise 1:
Implement the logic circuit function specified in the table given below by using
74LS151 8-input data selector/multiplexer.
P.KIRAN KUMAR,ECE DEPARTMENT 100
LOGIC FUNCTION GENERATION USING MUX
Solution :
P.KIRAN KUMAR,ECE DEPARTMENT 101
Exercise 2:
Implement the Boolean function F=x’y’z +x’yz’ + xyz’ + xyz using a suitable MUX
LOGIC FUNCTION GENERATION USING MUX
P.KIRAN KUMAR,ECE DEPARTMENT 102
LOGIC FUNCTION GENERATION USING MUX
Exercise 3:
Implement the Boolean function
F=A’B’C’D+A’B’CD+A’BC’D’+AB’CD+ABC’D’+ABC’D+ABCD’+ABCD using a
suitable MUX
P.KIRAN KUMAR,ECE DEPARTMENT 103
Demultiplexers
 A DEMULTIPLEXER (DEMUX) basically reverses the multiplexing function.
It takes data from one line and distributes them to a given number of output
lines. For this reason, the demultiplexer is also known as a data distributor.
 A multiplexer takes several inputs and transmits one of them to the output.
 A demultiplexer (DEMUX) performs the reverse operation ; it takes a single
input and distributes it over several outputs.
P.KIRAN KUMAR,ECE DEPARTMENT 104
General demultiplexer
P.KIRAN KUMAR,ECE DEPARTMENT 105
A 1-line-to-4-line demultiplexer.

ANALOG AND DIGITAL ELECTRONICS unit 4

  • 1.
    DEPARTMENT OF ELECTRONICS ANDCOMMUNICATION ENGINEERING Instructor D V S Ramanjaneyulu Accredited by NBA & NAAC with “A” Grade CS301ES : ANALOG & DIGITAL ELECTRONICS
  • 2.
  • 3.
    P.KIRAN KUMAR,ECE DEPARTMENT3 Boolean Algebra •Developed by English Mathematician George Boole in between 1815 -1864. •It is described as an algebra of logic or an algebra of two values i.e True or False. •The term logic means a statement having binary decisions i.e True/Yes or False/No.
  • 4.
    P.KIRAN KUMAR,ECE DEPARTMENT4 Application of Boolean algebra •It is used to perform the logical operations in digital computer. •In digital computer True represent by ‘1’ (high voltage)and False represent by ‘0’ (low voltage) •Logical operations are performed by logical operators. The fundamental logical operators are: 1.AND (conjunction) 2.OR (disjunction) 3.NOT (negation/complement) Boolean Algebra applied in computers electronic circuits. These circuits perform Boolean operations and these are called logic circuits or logic gates.
  • 5.
    P.KIRAN KUMAR,ECE DEPARTMENT5 Operators AND operator •It performs logical multiplication and denoted by (.) dot. X Y X.Y 0 0 0 0 1 0 1 0 0 1 1 1 OR operator NOT operator •It performs logical addition and denoted by (+) plus. X Y X+Y 0 0 0 0 1 1 1 0 1 1 1 1 •It performs logical negation and denoted by (-) bar. It operates on single variable. X X 0 1 1 0
  • 6.
    P.KIRAN KUMAR,ECE DEPARTMENT6 Basic Theorems of Boolean Algebra
  • 7.
    P.KIRAN KUMAR,ECE DEPARTMENT7 Basic Theorems of Boolean Algebra Note that theorem 1(b) is the dual of theorem 1(a) and that each step of the proof in part (b) is the dual of its counterpart in part (a). Any dual theorem can be similarly derived from the proof of its corresponding theorem.
  • 8.
    P.KIRAN KUMAR,ECE DEPARTMENT8 Basic Theorems of Boolean Algebra
  • 9.
    P.KIRAN KUMAR,ECE DEPARTMENT9 Boolean Function • A Boolean function expresses the logical relationship between binary variables and is evaluated by determining the binary value of the expression for all possible values of the variables. •A Boolean function can be represented in a truth table. The number of rows in the truth table is 2n, where n is the number of variables in the function. •The binary combinations for the truth table are obtained from the binary numbers by counting from 0 through 2n - 1. By considering the possible simplification of the function by applying some of the identities of Boolean algebra:
  • 10.
    P.KIRAN KUMAR,ECE DEPARTMENT10 Boolean Function
  • 11.
    P.KIRAN KUMAR,ECE DEPARTMENT11 Canonical and Standard Forms A Boolean function can be expressed algebraically from a given truth table  By forming a minterm for each combination of the variables that produces a 1 in the function and then taking the OR of all those terms. By forming a maxterm for each combination of the variables that produces a 0 in the function, and then form the AND of all those maxterms. Boolean functions expressed as a sum of minterms or product of maxterms are said to be in canonical form . Using Minterms Using Maxterms
  • 12.
    P.KIRAN KUMAR,ECE DEPARTMENT12 Canonical and Standard Forms
  • 13.
    P.KIRAN KUMAR,ECE DEPARTMENT13 Canonical and Standard Forms • Another way to express Boolean functions is in standard form. In this configuration, the terms that form the function may contain one, two, or any number of literals. There are two types of standard forms: the sum of products and products of sums. •The sum of products is a Boolean expression containing AND terms, called product terms, with one or more literals each. The sum denotes the ORing of these terms. • A product of sums is a Boolean expression containing OR terms, called sum terms. Each term may have any number of literals. The product denotes the ANDing of these terms. • In standard SOP and POS each term of Boolean expression must contain all the literals (with and with out bar) that has been used in Boolean expression. • If the above condition is satisfied by the Boolean expression, that expression is called Canonical form of Boolean expression.
  • 14.
    P.KIRAN KUMAR,ECE DEPARTMENT14 Canonical and Standard Forms Sum of Product( SOP) form Product of Sum (POS form)
  • 15.
    P.KIRAN KUMAR,ECE DEPARTMENT15 Canonical and Standard Forms Purpose of the Index • Minterms and Maxterms are designated with an index  The index number corresponds to a binary pattern  The index for the minterm or maxterm, expressed as a binary number, is used to determine whether the variable is shown in the true or complemented form • For Minterms: ‘1’ means the variable is “Not Complemented” and ‘0’ means the variable is “Complemented”. • For Maxterms: ‘0’ means the variable is “Not Complemented” and ‘1’ means the variable is “Complemented”.
  • 16.
    P.KIRAN KUMAR,ECE DEPARTMENT16 Canonical and Standard Forms
  • 17.
    P.KIRAN KUMAR,ECE DEPARTMENT17 Canonical and Standard Forms
  • 18.
    P.KIRAN KUMAR,ECE DEPARTMENT18 Canonical and Standard Forms
  • 19.
    P.KIRAN KUMAR,ECE DEPARTMENT19 Digital Logic Gates
  • 20.
    P.KIRAN KUMAR,ECE DEPARTMENT20 Digital Logic Gates
  • 21.
    P.KIRAN KUMAR,ECE DEPARTMENT21 Minimization of Boolean Expression • Canonical SOP (Sum of Minterms) and POS (Product of Maxterm) is the derivation /expansion of Boolean Expression. •Canonical forms are not usually minimal. • Minimization of Boolean expression is needed to simplify the Boolean expression and thus reduce the circuitry complexity as it uses less number of gates to produce same output that can be taken by long canonical expression.  Two method can be applied to reduce the Boolean expression i) Algebraic ii) Using Karnaugh Map (K-Map).
  • 22.
    P.KIRAN KUMAR,ECE DEPARTMENT22 Minimization of Boolean Expression
  • 23.
    P.KIRAN KUMAR,ECE DEPARTMENT23 Minimization of Boolean Expression
  • 24.
    P.KIRAN KUMAR,ECE DEPARTMENT24 KarnaughMap The Karnaugh map (K-map for short), Maurice Karnaugh's 1953 refinement of Edward Veitch's 1952 Veitch diagram, is a method to simplify Boolean algebra expressions.  K-Maps are a convenient way to simplify Boolean Expressions. They can be used for up to 4 or 5 variables. They are a visual representation of a truth table.
  • 25.
    P.KIRAN KUMAR,ECE DEPARTMENT25 KarnaughMap K-map for three variables K-map for Four variables K-map for five variables
  • 26.
    P.KIRAN KUMAR,ECE DEPARTMENT26 Truth table to K-Map (2 variable minterm)
  • 27.
    P.KIRAN KUMAR,ECE DEPARTMENT27 K-Maps (2 Variables k-map contd…)
  • 28.
  • 29.
    P.KIRAN KUMAR,ECE DEPARTMENT29 Three Variable K-Map (Contd…)
  • 30.
    P.KIRAN KUMAR,ECE DEPARTMENT30 Three Variable K-Map (Contd…)
  • 31.
    P.KIRAN KUMAR,ECE DEPARTMENT31 Karnaugh Maps -Four Variable K-Map
  • 32.
    P.KIRAN KUMAR,ECE DEPARTMENT32 K-Map Reduction Rule To reduce the Boolean expression, first we have to mark pairs, quads and octets. Pair –remove one variable Quad –remove two variables Octet –remove three variables Imp –To get the optimum reduction, priority is given to octet first, then quad and then pair.
  • 33.
    P.KIRAN KUMAR,ECE DEPARTMENT33 Karnaugh Maps -Four Variable K-Map
  • 34.
    P.KIRAN KUMAR,ECE DEPARTMENT34 Karnaugh Maps -Four Variable K-Map
  • 35.
    P.KIRAN KUMAR,ECE DEPARTMENT35 Karnaugh Maps -Four Variable K-Map
  • 36.
    P.KIRAN KUMAR,ECE DEPARTMENT36 Karnaugh Maps -Four Variable K-Map
  • 37.
    P.KIRAN KUMAR,ECE DEPARTMENT37 K - Map Redundant Term
  • 38.
    P.KIRAN KUMAR,ECE DEPARTMENT38 K - Map More than one solution
  • 39.
    P.KIRAN KUMAR,ECE DEPARTMENT39 Four Variable: POS KarnaughMap
  • 40.
    P.KIRAN KUMAR,ECE DEPARTMENT40 Karnaughmaps: Don’t cares •In some cases, outputs are undefined. We “don’t care” if the logic produces a 0 or a 1. This knowledge can be used to simplify functions.  Treat X’s like either 1’s or 0’s  Very useful  OK to leave some X’s uncovered
  • 41.
    P.KIRAN KUMAR,ECE DEPARTMENT41 Karnaughmaps: Don’t cares
  • 42.
    P.KIRAN KUMAR,ECE DEPARTMENT42 Don’t Care Conditions In some situations, we don’t care about the value of a function for certain combinations of the variables. –these combinations may be impossible in certain contexts –or the value of the function may not matter in when the combinations occur •In such situations we say the function is incompletely specified and there are multiple (completely specified) logic functions that can be used in the design. –so we can select a function that gives the simplest circuit •When constructing the terms in the simplification procedure, we can choose to either cover or not cover the don’t care conditions.
  • 43.
    P.KIRAN KUMAR,ECE DEPARTMENT43 Map Simplification with Don’t Cares
  • 44.
    P.KIRAN KUMAR,ECE DEPARTMENT44 NAND Implementation of Boolean function The NAND gate is said to be a universal gate because any logic circuit can be implemented with it. To show that any Boolean function can be implemented with NAND gates, we need only show that the logical operations of AND, OR, and complement can be obtained with NAND gates alone. A convenient way to implement a Boolean function with NAND gates is to obtain the simplified Boolean function in terms of Boolean operators and then convert the function to NAND logic
  • 45.
    P.KIRAN KUMAR,ECE DEPARTMENT45 Two-Level Implementation The procedure for obtaining the logic diagram from a Boolean function is as follows: 1. Simplify the function and express it in sum-of-products form. 2. Draw a NAND gate for each product term of the expression that has at least two literals. The inputs to each NAND gate are the literals of the term. This procedure produces a group of first-level gates. 3. Draw a single gate using the AND-invert or the invert-OR graphic symbol in the second level, with inputs coming from outputs of first-level gates. 4. A term with a single literal requires an inverter in the first level. However, if the single literal is complemented, it can be connected directly to an input of the second level NAND gate.
  • 46.
    P.KIRAN KUMAR,ECE DEPARTMENT46 Problem Implement the following Boolean function with NAND gates: F (x, y, z) = (1, 2, 3, 4, 5, 7)
  • 47.
    P.KIRAN KUMAR,ECE DEPARTMENT47 Multilevel NAND Circuits The most common procedure in the design of multilevel circuits is to express the Boolean function in terms of AND, OR, and complement operations. The function can then be implemented with AND and OR gates. The general procedure for converting a multilevel AND–OR diagram into an all- NAND diagram using mixed notation is as follows: 1. Convert all AND gates to NAND gates with AND-invert graphic symbols. 2. Convert all OR gates to NAND gates with invert-OR graphic symbols. 3. Check all the bubbles in the diagram. For every bubble that is not compensated by another small circle along the same line, insert an inverter (a one-input NAND gate) or complement the input literal.
  • 48.
    P.KIRAN KUMAR,ECE DEPARTMENT48 Problem Implement the following multilevel Boolean function F = (AB + AB)(C + D)
  • 49.
    P.KIRAN KUMAR,ECE DEPARTMENT49 NOR Implementation The NOR operation is the dual of the NAND operation. Therefore, all procedures and rules for NOR logic are the duals of the corresponding procedures and rules developed for NAND logic. The NOR gate is another universal gate that can be used to implement any Boolean function.
  • 50.
    P.KIRAN KUMAR,ECE DEPARTMENT50 Problem Implement the following multilevel Boolean function F = (AB + AB)(C + D)
  • 51.
    P.KIRAN KUMAR,ECE DEPARTMENT51 Exclusive‐OR (XOR) Function
  • 52.
    P.KIRAN KUMAR,ECE DEPARTMENT52 XOR function implementation XOR(a,b) = ab’ + a’b • Straightforward: 5 gates – 2 inverters, two 2‐input ANDs, one 2‐input OR – 2 inverters & 3 2‐input NANDs • Nonstraightforward: – 4 NAND gates XOR circuit with 4 NANDs
  • 53.
    P.KIRAN KUMAR,ECE DEPARTMENT53 Adder •The most basic arithmetic operation is the addition of two binary digits. •This simple addition consists of four possible elementary operations: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 10. •The first three operations produce a sum of one digit, but when both addend bits are equal to 1, the binary sum consists of two digits. The higher significant bit of this result is called a carry . •A combinational circuit that performs the addition of two bits is called a half adder . One that performs the addition of three bits (two significant bits and a previous carry) is a full adder . •The names of the circuits stem from the fact that two half adders can be employed to implement a full adder.
  • 54.
  • 55.
    P.KIRAN KUMAR,ECE DEPARTMENT55 Full Adder •Three inputs. Two are operand bits, third is Cin • Two outputs: sum and carry K Map for S In a half adder the sum bit:
  • 56.
    P.KIRAN KUMAR,ECE DEPARTMENT56 Full Adder K Map for C In a half adder the carry bit: C = XY
  • 57.
    P.KIRAN KUMAR,ECE DEPARTMENT57 Full Adder Using two half Adders to Build a Full Adder • Full adder functions • Half adder functions S = C = XY
  • 58.
    P.KIRAN KUMAR,ECE DEPARTMENT58 Full Adder Two Half Adders (and an OR)
  • 59.
    P.KIRAN KUMAR,ECE DEPARTMENT59 Subtractor • Compute M‐N – Add 2’s complement of N to M: M + (2n – N) • If M >= N, need only “one adder” and a “complemented of N” to do the subtraction. • If M < N, we also need to take 2’s complement of adder’s output to produce magnitude of result 2n ‐{ M + (2n – N)} = N‐M
  • 60.
    P.KIRAN KUMAR,ECE DEPARTMENT60 Adder‐Subtractor Design: (A+B) OR (A‐B) • Output is result if A >= B; Discard carry • Output is 2’s complement of result if B > A
  • 61.
    P.KIRAN KUMAR,ECE DEPARTMENT61 Decimal Adders •Computers or calculators that perform arithmetic operations directly in the decimal number system represent decimal numbers in binary coded form. • An adder for such a computer must employ arithmetic circuits that accept coded decimal numbers and present results in the same code. • A decimal adder requires a minimum of nine inputs and five outputs, since four bits are required to code each decimal digit and the circuit must have an input and output carry. •There is a wide variety of possible decimal adder circuits, depending upon the code used to represent the decimal digits.
  • 62.
    P.KIRAN KUMAR,ECE DEPARTMENT62 8421 weighted coding scheme or BCD Code •Inputs: 𝐴3 𝐴2 𝐴1 𝐴0 , 𝐵3 𝐵2 𝐵1 𝐵0 ,𝐶𝑖𝑛 from previous decade. •Output: 𝐶𝑜𝑢𝑡(carry to next decade), 𝑍3 𝑍2 𝑍1 𝑍0. •Idea: Perform regular binary addition and then apply a corrective procedure.
  • 63.
    P.KIRAN KUMAR,ECE DEPARTMENT63 Comparing Binary and BCD Sums
  • 64.
    P.KIRAN KUMAR,ECE DEPARTMENT64 Rules of BCD adder •When the binary sum is greater than 1001, we obtain a non – valid BCD representation. •The addition of binary6 (0110) to the binary sum converts it to the correct BCD representation and also produces an output carry as required. •To distinguish them from binary 1000 and 1001, which also have a 1 in position Z8 ,we specify further that either Z4 or Z2 must have a 1. C=K+Z8Z4+Z8Z2
  • 65.
    P.KIRAN KUMAR,ECE DEPARTMENT65 Implementation of BCD adder • A decimal parallel adder that adds n decimal digits needs n BCD adder stages. • The output carry from one stage must be connected to the input carry of the next higher-order stage.
  • 66.
    P.KIRAN KUMAR,ECE DEPARTMENT66 Binary Multiplier Two bit Multiplication: Three bit Multiplication •Partial products are: 101 ×1, 101 ×1, and 101 ×0 • The partial product summation for n digit, base 2 numbers requires adding up to n digits (with carries) in a column. • n×m digit multiplication generates up to an m + n digit result (same as decimal).
  • 67.
    P.KIRAN KUMAR,ECE DEPARTMENT67 Multiplier Boolean Equations • We can also make an n×m “block” multiplier and use that to form partial products. • Example: 2 ×2 –The logic equations for each partial-product binary digit are shown below: • We need to "add" the columns to get the product bits P0, P1, P2, and P3. •Note that some columns may generate carries.
  • 68.
    P.KIRAN KUMAR,ECE DEPARTMENT68 A 2x2 binary multiplier •The AND gates produce the partial products. •For a 2-bit by 2-bit multiplier, we can just use two half adders to sum the partial products. In general, though, we’ll need full adders. •Here C3-C0are the product, not carries!
  • 69.
    P.KIRAN KUMAR,ECE DEPARTMENT69 Multiplication: a special case •In decimal, an easy way to multiply by 10 is to shift all the digits to the left, and tack a 0 to the right end. 128x 10 = 1280 •We can do the same thing in binary. Shifting left is equivalent to multiplying by 2: 11x 10 = 110(in decimal, 3 x 2 = 6) •Shifting left twice is equivalent to multiplying by 4: 11x 100 = 1100(in decimal, 3 x 4 = 12) •As an aside, shifting to the rightis equivalent to dividingby 2. 110÷10 = 11(in decimal, 6 ÷2 = 3)
  • 70.
    P.KIRAN KUMAR,ECE DEPARTMENT70 Two-Bit Comparator
  • 71.
    P.KIRAN KUMAR,ECE DEPARTMENT71 Two-Bit Comparator
  • 72.
    P.KIRAN KUMAR,ECE DEPARTMENT72 Equality Comparator 4-Bit Equality Comparator
  • 73.
    P.KIRAN KUMAR,ECE DEPARTMENT73 Magnitude Comparator A > B = A3 . B3’ + C3 . A2 . B2’ + C3 . C2 . A1 . B1’ + C3 . C2 . C1 . A0 . B0’ A < B = A3’ . B3 + C3 . A2’ . B2 + C3 . C2 . A1’ . B1 + C3 . C2 . C1 . A0’ . B0
  • 74.
    P.KIRAN KUMAR,ECE DEPARTMENT74 Decoders • A decoder is a logic circuit that accepts a set of inputs that represents a binary number and activates only the output that corresponds to the input number. • In other words, a decoder circuit looks at its inputs, determines which binary number is present there, and activates the one output that corresponds to that number; all other outputs remain in active • In its general form, a decoder has N input lines to handle N bits and form one to 2N output lines to indicate the presence of one or more N-bit combinations. The basic binary function • An AND gate can be used as the basic decoding element because it produces a HIGH output only when all inputs are HIGH
  • 75.
    P.KIRAN KUMAR,ECE DEPARTMENT75 Decoders Decoding logic for the binary code 1001 with an active-HIGH output.
  • 76.
    P.KIRAN KUMAR,ECE DEPARTMENT76 Decoder General decoder diagram # There are 2N possible input combinations, from A0to AN-1. For each of these input combinations only one of the M outputs will be active HIGH (1), all the other outputs are LOW (0).
  • 77.
    P.KIRAN KUMAR,ECE DEPARTMENT77 Decoder • If an active - LOW output (74138, one of the output will low and the rest will be high) is required for each decoded number, the entire decoder can be implemented with 1. NAND gates 2. Inverters • If an active – HIGH output (74139, one of the output will high and the rest will be low) is required for each decoded number, the entire decoder can be implemented with 1. AND gates 2. Inverters
  • 78.
    P.KIRAN KUMAR,ECE DEPARTMENT78 2-to-4-Line Decoder (with Enable input)-Active LOW output (1)...
  • 79.
    P.KIRAN KUMAR,ECE DEPARTMENT79 2-to-4-Line Decoder (with Enable input)-Active LOW output (2) • The circuit operates with complemented outputs and a complement enable input. The decoder is enabled when E is equal to 0. • Only one output can be equal to 0 at any given time, all other outputs are equal to 1. •The output whose value is equal to 0 represents the minterms elected by inputs A and B •The circuit is disabled when E is equal to 1.
  • 80.
    P.KIRAN KUMAR,ECE DEPARTMENT80 3-8 line decoder (active-HIGH)
  • 81.
    P.KIRAN KUMAR,ECE DEPARTMENT81 3-8 line decoder (active-HIGH) • This decoder can be referred to in several ways. It can be called a 3-line-to- 8-line decoder, because it has three input lines and eight output lines. •It could also be called a binary-octal decoder or converters because it takes a three bit binary input code and activates the one of the eight outputs corresponding to that code. It is also referred to as a 1-of-8 decoder, because only 1 of the 8 outputs is activated at one time.
  • 82.
    P.KIRAN KUMAR,ECE DEPARTMENT82 74138 (Example of a 3 - 8 Bit Decoder) • There is an enable function on this device, a LOW level on each input E’1, and E’2, and a HIGH level on input E3, is required in order to make the enable gate output HIGH. • The enable is connected to an input of each NAND gate in the decoder, so it must be HIGH for the NAND gate to be enabled. •If the enable gate is not activated then all eight decoder outputs will be HIGH regardless of the states of the three input variables A0, A1, and A2.
  • 83.
    P.KIRAN KUMAR,ECE DEPARTMENT83 Logic diagram of 74138 (Example of a 3 Bit Decoder)
  • 84.
    P.KIRAN KUMAR,ECE DEPARTMENT84 Truth table of 74138 (Example of a 3 - 8 Bit Decoder) active-LOW
  • 85.
    P.KIRAN KUMAR,ECE DEPARTMENT85 4-line-to-16 line Decoder constructed with two 3- line-to-8 line decoders • When w=0, the top decoder is enabled and the other is disabled. The bottom decoder outputs are all 0’s , and the top eight outputs generate min-terms 0000 to 0111. •When w=1, the enable conditions are reversed. The bottom decoder outputs generate min-terms 1000 to 1111, while the outputs of the top decoder are all 0’s.
  • 86.
    P.KIRAN KUMAR,ECE DEPARTMENT86 Encoder • An encoder is a combinational logic circuit that essentially performs a “reverse” of decoder functions. • An encoder accepts an active level on one of its inputs, representing digit, such as a decimal or octal digits, and converts it to a coded output such as BCD or binary. • Encoders can also be devised to encode various symbols and alphabetic characters. • The process of converting from familiar symbols or numbers to a coded format is called encoding. • Most decoders accept an input code and produce a HIGH ( or a LOW) at one and only one output line. • In other worlds, a decoder identifies, recognizes, or detects a particular code. The opposite of this decoding process is called encoding and is performed by a logic circuit called an encoder. • An encoder has a number of input lines, only one of which input is activated at a given time and produces an N-bit output code, depending on which input is activated.
  • 87.
    P.KIRAN KUMAR,ECE DEPARTMENT87 Encoder General encoder diagram Logic circuit for octal-to binary encoder [8-line-3-line ]
  • 88.
    P.KIRAN KUMAR,ECE DEPARTMENT88 Encoder Truth table for octal-to binary encoder [8-line-3-line ] A low at any single input will produce the output binary code corresponding to that input. For instance, a low at A3’ will produce O2=0, O1=1 and O0=1, which is binary code for 3. Ao’ is not connected to the logic gates because the encoder outputs always be normally at 000 when none of the inputs is LOW
  • 89.
    P.KIRAN KUMAR,ECE DEPARTMENT89 Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) • A priority encoder is an encoder that includes the priority function • If two or more inputs are equal to 1 at the same time, the input having the highest priority will take precedence. Truth Table of a 4-input Priority Encoder:
  • 90.
    P.KIRAN KUMAR,ECE DEPARTMENT90 Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) • In addition to two outputs x, and y, the truth table has a third output designated by V, which is a valid bit indicator that is set1 when one or more inputs are equal to 1. If all inputs are 0, there is no valid input and V is equal to 0. • X’s in the output column indicate don’t care conditions, the X’s in the input columns are useful for representing a truth table in condensed form. • The higher the subscript number, the higher the priority of the input. Input D3 has the highest priority, so regardless of the values of the other inputs, when this input is 1, the output for xy is 11 (binary3)
  • 91.
    P.KIRAN KUMAR,ECE DEPARTMENT91 Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) V=D0+D1+D2+D3 K-Maps for 4-input Priority Encoder
  • 92.
    P.KIRAN KUMAR,ECE DEPARTMENT92 Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) Logic Diagram for 4-input priority encoder
  • 93.
    P.KIRAN KUMAR,ECE DEPARTMENT93 MULTIPLEXERS (Data Selectors)  A multiplexers (MUX) is a device that allows digital information from several sources to be routed on to a single line for transmission over that line to a common destination.  The basic multiplexers has several data input lines and a single output line. It also has data – select inputs, which permit digital data on any one of the inputs to be switched to the output line.  A modern stereo system may have a switch that selects music from one of four sources: a cassette tape, CD, a radio tuner, or an auxiliary input such as audio from a VCR or DVD. The switch selects one of the electronic signals from one of these four sources and sends it to the power amplifier and speakers.  In simple terms, this is what a multiplexer (MUX) does; it selects one of several input signals and passes it on to the output.
  • 94.
    P.KIRAN KUMAR,ECE DEPARTMENT94 Functional diagram of MUX
  • 95.
    P.KIRAN KUMAR,ECE DEPARTMENT95 Two-input multiplexer
  • 96.
    P.KIRAN KUMAR,ECE DEPARTMENT96 Four-input multiplexer
  • 97.
    P.KIRAN KUMAR,ECE DEPARTMENT97 Logic symbol for a 1-of-4 data selector/multiplexer.
  • 98.
    P.KIRAN KUMAR,ECE DEPARTMENT98 LOGIC FUNCTION GENERATION USING MUX-Method • An efficient method for implementing a Boolean function of n variables with a MUX that has n-1 selection inputs and 2 n-1data inputs is given below: –List the Boolean function in a truth table –Apply the first n-1 variables in the table to the selection inputs of the MUX. –For each combination of the selection variables, evaluate the output as a function of the last variable. This function can be 0,1, the variable, or the complement of the variable. Apply these values to the data inputs in the proper order.
  • 99.
    P.KIRAN KUMAR,ECE DEPARTMENT99 LOGIC FUNCTION GENERATION USING MUX Exercise 1: Implement the logic circuit function specified in the table given below by using 74LS151 8-input data selector/multiplexer.
  • 100.
    P.KIRAN KUMAR,ECE DEPARTMENT100 LOGIC FUNCTION GENERATION USING MUX Solution :
  • 101.
    P.KIRAN KUMAR,ECE DEPARTMENT101 Exercise 2: Implement the Boolean function F=x’y’z +x’yz’ + xyz’ + xyz using a suitable MUX LOGIC FUNCTION GENERATION USING MUX
  • 102.
    P.KIRAN KUMAR,ECE DEPARTMENT102 LOGIC FUNCTION GENERATION USING MUX Exercise 3: Implement the Boolean function F=A’B’C’D+A’B’CD+A’BC’D’+AB’CD+ABC’D’+ABC’D+ABCD’+ABCD using a suitable MUX
  • 103.
    P.KIRAN KUMAR,ECE DEPARTMENT103 Demultiplexers  A DEMULTIPLEXER (DEMUX) basically reverses the multiplexing function. It takes data from one line and distributes them to a given number of output lines. For this reason, the demultiplexer is also known as a data distributor.  A multiplexer takes several inputs and transmits one of them to the output.  A demultiplexer (DEMUX) performs the reverse operation ; it takes a single input and distributes it over several outputs.
  • 104.
    P.KIRAN KUMAR,ECE DEPARTMENT104 General demultiplexer
  • 105.
    P.KIRAN KUMAR,ECE DEPARTMENT105 A 1-line-to-4-line demultiplexer.