Professional Documents
Culture Documents
Presented by
Vidya Sagar . P
Research Scholar
Department of ECE,PTU.
The arrangement of 0's and 1's within the map helps you to visualize the
logic relationships between the variables and leads directly to a simplified
Boolean statement.
For example, the minterms for a function having the inputs x and y are:
Consider the Boolean function,
Its minterms are:
Similarly, a function having three inputs, has the minterms that are shown in
this diagram.
As another example, we give the truth table and KMap for the function,
F(x,y) = x + y at the right.
This function is equivalent to the OR of all of the minterms that have a value
of 1. Thus:
Of course, the minterm function that we derived from our Kmap was not in
simplest terms.
That’s what we started with in this example.
We can, however, reduce our complicated expression to its simplest terms by
finding adjacent 1s in the Kmap that can be collected into groups that are
powers of two.
The best way of selecting two groups of 1s form our simple Kmap is shown
below.
We see that both groups are powers of two and that the groups overlap.
The next slide gives guidance for selecting Kmap groups.
A=0 A=1
AB’
0 2
B=0 0 1
1 3
B=1 1 1
A’B AB
f(A,B) = A + B
ID A B f(A,B) minter
m
0 0 0 0
1 0 1 1 A’B
2 1 0 0
3 1 1 1 AB
f(A,B)=A’B+AB=(A’+A)B=B
y(A,B)=A’B’C’+A’B’C= A’B’(C’+C)=A’B’
This grouping tells us that changes in the variables x and y have no influence
upon the value of the function: They are irrelevant.
This means that the function,
reduces to F(x) = z.
Its Kmap is shown below. There are (only) two groupings of 1s.
Can you find them?
In this Kmap, we see an example of a group that wraps around the sides of a
Kmap.
This group tells us that the values of x and y are not relevant to the term of
the function that is encompassed by the group.
What does this tell us about this term of the function?
The green group in the top row tells us that only the value of x is significant
in that group.
We see that it is complemented in that row, so the other term of the reduced
function is .
Our reduced function is:
We have populated the Kmap shown below with the nonzero minterms from
the function:
Recall that
groups can
overlap.
It is possible to have a choice as to how to pick groups within a Kmap, while
keeping the groups as large as possible.
The (different) functions that result from the groupings below are logically
equivalent.
Y
A B C D Y
AB 0 0 0 0 1
CD 00 01 11 10 0 0 0 1 0
00 0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
01 0 1 0 1 1
0 1 1 0 1
11 0 1 1 1 1
1 0 0 0 1
10
1 0 0 1 1
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
A B C D Y
Y 0 0 0 0 1
AB 0
CD 00 01 11 10 0 0 1 0
0 0 1 0 1
00 1 0 0 1 0 0 1 1 1
0 1 0 0 0
01 0 1 0 1 0 1 0 1 1
0 1 1 0 1
11 1 1 0 0 0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
10 1 1 0 1
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
A B C D Y
0 0 0 0 1
Y 0 0 0 1 0
CD
AB
00 01 11 10 0 0 1 0 1
0 0 1 1 1
00 1 0 0 1
0 1 0 0 0
0 1 0 1 1
01 0 1 0 1
0 1 1 0 1
0 1 1 1 1
11 1 1 0 0
1 0 0 0 1
1 0 0 1 1
10 1 1 0 1 1 0 1 0 1
1 0 1 1 0
Y = AC + ABD + ABC + BD 1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
Real circuits don’t always need to have an output defined for every possible
input.
If a circuit is designed so that a particular set of inputs can never happen, we
call this set of inputs a don’t care condition.
Don’t Care Entry: “-” means the entry is not relevant either at input or
output.
In other words, we are free to assign either 0 or 1 to reduce the Boolean
expression.
Id a b c f (a,b,c)
0 0 0 0 0
1 0 0 1 0
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 -
7 1 1 1 1
b=1
(0,0) (0,1) (1,1) (1,0)
0 2 6 4
c=0 0 1 - 1
1 3 7 5
c=1 0 0 1 1
a=1
f(a,b,c) = a + bc’
Id a b c f (a,b,c,d)
0 0 0 0 1
1 0 0 1 1
2 0 1 0 -
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 0
7 1 1 1 0
b=1
(0,0) (0,1) (1,1) (1,0)
0 2 6 4
c=0 1 - 0 1
1 3 7 5
c=1 1 0 0 1
a=1
f(a,b,c) = b’
However, the values for which they differ, are the inputs for which we have
don’t care conditions.
A B C D Y
Y
0 0 0 0 1
AB
CD 00 01 11 10 0 0 0 1 0
0 0 1 0 1
00 0 0 1 1 1
0 1 0 0 0
0 1 0 1 X
01 0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
11 1 0 0 1 1
1 0 1 0 X
1 0 1 1 X
10
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
A B C D Y
0 0 0 0 1 Y
0 0 0 1 0 AB
0 0 1 0 1 CD 00 01 11 10
0 0 1 1 1
0 1 0 0 0 00 1 0 X 1
0 1 0 1 X
0 1 1 0 1
0 1 1 1 1 01 0 X X 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 X 11 1 1 X X
1 0 1 1 X
1 1 0 0 X
10 1 1 X X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
Y = A + BD + C
A group of 1’s which are adjacent and can be combined on a Karnaugh Map is
called an implicant.
The biggest group of 1’s which can be circled to cover a 1 is called a prime
implicant.
they are the only implicants we care about.
AB
CD 00 01 11 10 Prime Implicants Non-prime Implicants
00 0 0 0 1
01 0 0 1 1
11 0 1 1 1
10 0 1 1 1
AB
CD 00 01 11 10 Prime Implicants
00 0 0 0 1
01 0 0 1 1
11 0 1 1 1
10 0 1 1 1
AB
CD 00 01 11 10
AB
CD 00 01 11 10
00 0 0 0 1
01 0 0 1 1
11 0 1 1 1
10 0 1 1 1
Not required…
F = AB’ + BC + AD
Minimum
AB
CD 00 01 11 10
00 1 0 0 1
01 1 1 0 0
11 1 1 1 0
10 1 0 0 1 A’B’ is not required…
AB
CD 00 01 11 10
00 1 1 0 0 AD
01 0 0 1 1
CD
A’C
11 1 1 1 1
10 1 1 0 0
Sequential
The outputs depend on the
current and past input
values It uses logic gates and
storage elements
A3 A2 A1 A0 B3 B2 B1 B0
A 0 1 0 1 B 0 1 1 1
Ci+1 Ci
1 1 1
A 0 1 0 1 Ai
B 0 1 1 1 +Bi
1 1 0 0 Si
Each bit position creates a sum and carry
Adders are the basic building blocks of all arithmetic circuits; adders add two
binary numbers and give out sum and carry as output. Basically we have two
types of adders.
Half Adder.
Full Adder.
51 Department of Electronics and Communication Engineering, PTU. VIDYA SAGAR P
Half-Adder
Basic rules of binary addition are performed by a half Inputs Outputs
adder, which has two binary inputs (A and B) and two A B Cout S
binary outputs (Carry out and Sum). 0 0 0 0
The half adder adds two binary digits called as augend and 0 1 0 1
addend. 1 0 0 1
1 1 1 0
XOR is applied to both inputs to produce sum.
OR gate is applied to both inputs to produce carry.
The inputs and outputs can be
The logic symbol and equivalent circuit are: summarized on a truth table.
S Dec Binary
A S
1 1
S A +1 +1
Cout
B Cout B 2 10
Carry <= X AND Y; Sum<= X XOR Y;
52 Department of Electronics and Communication Engineering, PTU. VIDYA SAGAR P
Full Adder
AB = CIN (A ⊕ B) + CIN (A ⊕ B)
C 00 01 11 10
Therefore, S = CIN ⊕ (A ⊕ B)
0 1
1 1 1 1
Cin
Cin
Cin + xy
Cin
Si
Block Diagram
C4 S3 S2 S1 S0
C 1 1 1 0
A 0 1 0 1
B 0 1 1 1
S 1 1 0 0
57 Department of Electronics and Communication Engineering, PTU. VIDYA SAGAR P
Parallel Adders
Full adders are combined into parallel adders that can add binary numbers with multiple
bits. A 4-bit adder is shown.
A4 B4 A3 B3 A2 B2 A1 B1
C0
C4
C3 C2 C1
S4 S3 S2 S1
The output carry (C4) is not ready until it propagates through all of the full adders. This is
called ripple carry, delaying the addition process.
The logic symbol for a 4-bit parallel adder is shown. This 4-bit adder includes a carry in (labeled
(C0) and a Carry out (labeled C4).
S
1 1
Binary 2 2 4-bit
number A 3 3 sum
4 4
1
Binary 2
number B 3
4
Input Output
C0 C4
carry carry
The 74LS283 is an example. It features look-ahead carry, which adds logic to minimize the
output carry delay. For the 74LS283, the maximum delay to the output carry is 17 ns.
A1
B1
A2
B2 Output
A3
B3
A4
B4
IC comparators provide outputs to indicate which of the numbers is larger or if they are
equal. The bits are numbered starting at 0, rather than 1 as in the case of adders. Cascading
inputs are provided to expand the comparator to larger numbers.
COMP
A0 0
A1 A
A2
A3 3
Cascading A>B A>B
A=B A=B Outputs
inputs
A<B A<B
B0 0
B1 A
The IC shown is the 4-bit 74LS85.
B2
B3 3
IC comparators can be expanded using the cascading inputs as shown. The lowest order
comparator has a HIGH on the A = B input.
LSBs MSBs
A0 COMP A4 COMP
A1 0 A5 0
A2 A A6 A
A3 A7
3 3
A>B A>B A>B A>B
+5.0 V A=B A=B A=B A=B Outputs
A<B A<B A<B A<B
B0 0 B4 0
B1 A B5 A
B2 B6
B3 3 B7 3
An encoder is a device that is used to convert a signal or certain data into code.
This kind of conversion is done for a variety of reasons, the most common being
data compression.
Other reasons for using encoders include:
data encryption for making the data secure
translating data from one code to another new or existing code.
Inputs Output
ABCDEFGH S0 S1 S2
0
1 0 0 0 0 010 0 1 0 1
0
0
0
1
Encoder
I5
Y2
Binary
0 0 0 0 0 0 0 1 0 0 0 I4
I3 Y1
0 0 0 0 0 0 1 0 0 0 1
I2 Y0
0 0 0 0 0 1 0 0 0 1 0 I1
0 0 0 0 1 0 0 0 0 1 1 I0
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1 I7
0 1 0 0 0 0 0 0 1 1 0 I6 Y2
1 0 0 0 0 0 0 0 1 1 1 I5
I4
Y2 I 7 I 6 I 5 I 4 I3 Y1
Y1 I 7 I 6 I 3 I 2 I2
I1
Y0 I 7 I 5 I 3 I1 I0 Y0
If two inputs are active simultaneously, the output produces an undefined combination. We
can establish an input priority to ensure that only one input is encoded.
Another ambiguity in the octal-to-binary encoder is that an output with all 0’s is generated
when all the inputs are 0; the output is the same as when D0 is equal to 1.
D3
Encoder
V
Priority
D2 y
D1 x
D0
Output
NB: Only ONE of the line
will have the value 1; others
will have 0.
S0 S1 S2 ABCDEFGH
1 0 1 00000100
0 1 0 00100000
Y0 Y2
Decoder
I1
Binary
Y1
Y2 Y1
I0 Y3
Y0
I1 I0 Y0 Y1 Y2 Y3
0 0 1 0 0 0
I1
0 1 0 1 0 0
I0
1 0 0 0 1 0
1 1 0 0 0 1 Y3 I1 I 0 Y2 I1 I 0
Y1 I1 I 0 Y0 I1 I 0
74 Department of Electronics and Communication Engineering, PTU. VIDYA SAGAR P
Decoders
Y6 I 2 I1 I 0
Y0 Y5 I 2 I1 I 0
Y1 Y4 I 2 I1 I 0
Y2
Decoder
I2 Binary Y3 Y3 I 2 I1 I 0
I1 Y4 Y2 I 2 I1 I 0
I0 Y5
Y1 I 2 I1 I 0
Y6
Y7 Y0 I 2 I1 I 0
I2
I1
I0
An n-input and b-bit multiplexer has n sources of data, each of which b bits
wide, and there are b output bits.
A multiplexer is a unidirectional device.
Multiplexers are used in any application in which data must be switched
from multiple sources to a destination.
e.g., processor’s registers to ALU
MUX
Output
MUX Types Inputs
(sources) (destination)
MP3 Player
Docking Station
D0
Laptop
MUX
D1
Sound Card Y
D2
D3
D0
MUX
D1
Y
D2
D3
B A
B A Y
0 0 D0
0 1 D1
1 0 D2
1 1 D3
DEMUX
1 2N
Input Outputs
DEMUX Types (source) (destinations)
B/W Laser
Printer
Fax
Machine
D0
DEMUX
X D1
D2 Color Inkjet
Printer
D3
Selected
B A
Destination
Pen
0 0 B/W Laser Printer Plotter
0 1 Fax Machine
1 0 Color Inkjet Printer
1 1 Pen Plotter
D0
DEMUX
D1
X
D2
D3
B A
B A D0 D1 D2 D3
0 0 X 0 0 0
0 1 0 X 0 0
1 0 0 0 X 0
1 1 0 0 0 X