COA Module 1 Notes
COA Module 1 Notes
Module 1
Class: SE IT Sem: IV C Scheme
Prepared by
Dipashri Sonawale
Syllabus
NUMBER SYSTEM
DECIMAL NUMBER SYSTEM
BINARY NUMBER SYSTEM
Tutorial Problems
Complements
Complements : Eg – 1100 0101
Complements : Eg – 1100 0101
• 1’s Complement :
1100 0101
0011 1010
Prepared by
Dipashri Sonawale
Syllabus
Half Adder
Half Adder
Half Adder
Full Adder
Full Adder
Full Adder
Half Subtractor
• Half Subtractor is a combinational logic circuit.
• It is used for the purpose of subtracting two single bit
numbers.
• It contains 2 inputs and 2 outputs (difference and borrow).
Half Subtractor Designing
• Half subtractor is designed in the following steps-
• Step-01:
• Identify the input and output variables-
• Input variables = A, B (either 0 or 1)
• Output variables = D, b where D = Difference and b = borrow
• Step-02:
• Draw the truth table-
Inputs Outputs
A B D (Difference) b (Borrow)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Half Subtractor Designing
• Step-04:
• Draw the logic diagram.
• The implementation of half subtractor using 1 XOR gate, 1 NOT gate and 1 AND
gate is as shown below-
Limitation of Half Subtractor
• Limitations:
• Half subtractors do not take into account “Borrow-in” from the
previous circuit.
• This is a major drawback of half subtractors.
• This is because real time scenarios involve subtracting the multiple
number of bits which can not be accomplished using half subtractors.
• To overcome this drawback, Full Subtractor comes into play.
Full Subtractor
• Full Subtractor is a combinational logic circuit.
• It is used for the purpose of subtracting two single bit
numbers.
• It also takes into consideration borrow of the lower significant
stage.
• Thus, full subtractor has the ability to perform the subtraction
of three bits.
• Full subtractor contains 3 inputs and 2 outputs (Difference and
Borrow) as shown
Designing a Full Subtractor
• Full subtractor is designed in the following steps-
• Step-01:
• Identify the input and output variables-
• Input variables = A, B, Bin (either 0 or 1)
• Output variables = D, Bout where D = Difference and Bout = Borrow
Designing a Full Subtractor
• Full subtractor is designed in the following steps-
• Step-02:
• Draw the truth table-
Inputs Outputs
A B Bin D (Difference) Bout (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
Designing a Full Subtractor
• Step-04:
• Draw the logic diagram.
• The implementation of full adder using 1 XOR gate, 3 AND gates, 1 NOT gate and
1 OR gate is as shown below-
THANK YOU!!!
1. Fundamentals of Logic Design
Combinational Circuits
Multiplexer, Demultiplexer, Encoder & Decoder
• The block diagram and the truth table of the 2×1 multiplexer are given
below.
2x1 Multiplexer
• The logical expression of the term Y is as follows:
Y=S0'.A0+S0.A1
• Logical circuit of the above expression is given below:
4x1 Multiplexer
• In the 4×1 multiplexer, there is a total of
• four inputs, i.e., A0, A1, A2, and A3,
Y=S0'.S1'.S2'.A0+S0.S1'.S2'.A1+S0'.S1.S2'.A2+S0.S1.S2'.A3
+S0'.S1'.S2 A4+S0.S1'.S2 A5
+S0'.S1.S2 .A6+S0.S1.S3.A7
A2=Y4+Y5+Y6+Y7
A1=Y2+Y3+Y6+Y7
A0=Y7+Y5+Y3+Y1
8 to 3 line Encoder
• Logical circuit of the above expressions is
given below:
8 to 3 line Encoder
• Uses of Encoders:
1.These systems are very easy to use in all digital
systems.
Prepared by
Dipashri Sonawale
Syllabus
Minimization Of Boolean Expressions-
• Methods
• For a boolean expression consisting of n-variables, number of cells
required in K Map = 2n cells.
K-MAP(Karnaugh Map)
• a systematic way of simplifying Boolean expressions.
• can minimize Boolean expressions of 3, 4 variables very easily using K-
map without using any Boolean algebra theorems.
• take two forms Sum of Product (SOP) and Product of Sum (POS)
• is table like representation but it gives more information than TRUTH
TABLE.
• We fill grid of K-map with 0’s and 1’s then solve it by making groups.
• is used for expressions containing 2, 3, 4, and 5 variables.
• In K-map, the number of cells is similar to the total number of variable
input combinations.
• For example, if the number of variables is three, the number of cells is
23=8, and if the number of variables is four, the number of cells is 24.
K-MAP(Karnaugh Map)
• 2 Variable K-Map
• The number of cells in 2 variable K-map is four, since the number of
variables is two.
• There is only one possibility of grouping 4 adjacent min terms.
• The possible combinations of grouping 2 adjacent min terms are {(m0,
m1), (m2, m3), (m0, m2) and (m1, m3)}.
• The following figure shows 2 variable K-Map.
K-MAP(Karnaugh Map)
• 2 Variable K-Map
• Two variable K Map is drawn for a boolean expression consisting of
two variables.
• The number of cells present in two variable K Map = 22 = 4 cells.
• So, for a boolean function consisting of two variables, we draw a 2 x 2
K Map.
• Two variable K Map may be represented as-
K-MAP(Karnaugh Map)
• 3 Variable K-Map
• The number of cells in 3 variable K-map is eight, since the number of
variables is three.
• The following figure shows 3 variable K-Map.
K-MAP(Karnaugh Map)
• 3 Variable K-Map: SOP(Sum of Product) form
• There is only one possibility of grouping 8 adjacent min terms.
• The possible combinations of grouping 4 adjacent min terms are
{(m0, m1, m3, m2),
(m4, m5, m7, m6),
(m0, m1, m4, m5),
(m1, m3, m5, m7),
(m3, m2, m7, m6) and
(m2, m0, m6, m4)}.
• The possible combinations of grouping 2 adjacent min terms are
{(m0, m1), (m1, m3), (m3, m2), (m2, m0), (m4, m5), (m5, m7), (m7, m6), (m6,
m4), (m0, m4), (m1, m5), (m3, m7) and (m2, m6)}.
K-MAP(Karnaugh Map)
• 3 Variable K-Map: SOP(Sum of
Product) form
• Three variable K Map is drawn for a
boolean expression consisting of three
variables.
• The number of cells present in three
variable K Map = 23 = 8 cells.
• So, for a boolean function consisting of
three variables, we draw a 2 x 4 K Map.
• Three variable K Map may be represented
as-
K-MAP(Karnaugh Map)
• 3 Variable K-Map: SOP(Sum of Product) form
K-MAP(Karnaugh Map)
• 3 Variable K-Map: POS(Product of Sum) form
K-MAP(Karnaugh Map)
• 4 Variable K-Map
• The number of cells in 4 variable K-map is sixteen, since the number
of variables is four.
• The following figure shows 4 variable K-Map.
K-MAP(Karnaugh Map)
• 4 Variable K-Map
• Four variable K Map is drawn for a boolean
expression consisting of four variables.
• The number of cells present in four variable
K Map = 24 = 16 cells.
• So, for a boolean function consisting of four
variables, we draw a 4 x 4 K Map.
K-MAP(Karnaugh Map)
• 4 Variable K-Map: SOP(Sum of Product) form
K-MAP(Karnaugh Map)
• 4 Variable K-Map: POS(Product of Sum ) form
K-MAP(Karnaugh Map)
• 4 Variable K-Map: POS(Product of Sum ) form
Simplification of Boolean expressions using
Karnaugh Map
• K-map takes both SOP and POS forms.
• So, there are two possible solutions for K-map, i.e., minterm and maxterm
solution.
• Karnaugh Map Simplification Rules-
• To minimize the given boolean function,
• We draw a K Map according to the number of variables it contains.
• We fill the K Map with 0’s and 1’s according to its function.
• Then, we minimize the function in accordance with the following rules.
• Rule-01:
• We can either group 0’s with 0’s or 1’s with 1’s but we can not group 0’s
and 1’s together.
• X representing don’t care can be grouped with 0’s as well as 1’s.
Simplification of Boolean expressions using
Karnaugh Map
• Rule-02:
• Groups may overlap each other.
• Rule-03:
• We can only create a group whose number of cells can be represented in
the power of 2.
• In other words, a group can only contain 2n i.e. 1, 2, 4, 8, 16 and so on
number of cells.
Simplification of Boolean expressions using
Karnaugh Map
• Rule-04:
• Groups can be only either horizontal or vertical.
• We can not create groups of diagonal or any other shape.
Simplification of Boolean expressions using
Karnaugh Map
• Rule-05:
• Each group should be as large as possible.
Simplification of Boolean expressions using
Karnaugh Map
• Rule-06:
• Opposite grouping and corner grouping are allowed.
• The example of opposite grouping is shown illustrated in Rule-05.
• The example of corner grouping is shown below.
• Rule-07:
• There should be as few groups as possible.
Simplification of Boolean expressions using
Karnaugh Map
• Steps to solve expression using K-map-
1.Select K-map according to the number of variables.
2.Identify minterms or maxterms as given in problem.
3.For SOP put 1’s in blocks of K-map respective to the minterms (0’s
elsewhere).
4.For POS put 0’s in blocks of K-map respective to the maxterms(1’s
elsewhere).
5.Make rectangular groups containing total terms in power of two like
2,4,8 ..(except 1) and try to cover as many elements as you can in one
group.
6.From the groups made in step 5 find the product terms and sum them up
for SOP form.
PROBLEMS BASED ON KARNAUGH MAP
• Problem-01: Minimize the following boolean function-SOP Form
Z= ∑A,B,C(1,3,6,7)
• Red group : A’C
• Green Group : AB
• Summing these product terms we get –
(A’C + AB)
PROBLEMS BASED ON KARNAUGH MAP
• Problem-02: Minimize the following boolean function-SOP
F(P,Q,R,S)=∑(0,2,5,7,8,10,13,15)
• Red group : QS
• Green Group : Q’S’
• Summing these product terms we get –
(QS + Q’S’)
PROBLEMS BASED ON KARNAUGH MAP
• Problem-03: Minimize the following boolean function-SOP
F(A,B,C)=π(0,3,6,7)
• Red group : A’+B’
• Brown Group : B’+C’
• Yellow Group : A+B+C
• Summing these product terms we get –
(A’+B’)(B’+C’)(A+B+C)
PROBLEMS BASED ON KARNAUGH MAP
• Problem-04: Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)
• Solution-
• Since the given boolean expression has 4 variables, so we draw a 4
x 4 K Map.
• We fill the cells of K Map in accordance with the given boolean
function.
• Then, we form the groups in accordance with the above rules.
PROBLEMS BASED ON KARNAUGH MAP
• Problem-04: Minimize the following boolean
function-
F(A, B, C, D) = Σm(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)
• Solution-
PROBLEMS BASED ON KARNAUGH MAP
•Problem-04: Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)
• Solution-
Now,
F(A, B, C, D)
= (A’B + AB)(C’D + CD) + (A’B’ + A’B + AB + AB’)C’D + (A’B’ +
AB’)(C’D’ + CD’)
= BD + C’D + B’D’
Thus, minimized boolean expression is-
F(A, B, C, D) = BD + C’D + B’D’
PROBLEMS BASED ON KARNAUGH MAP
• Problem-05: Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 3, 5, 7, 8, 9, 11, 13, 15)
• Solution-
• Since the given boolean expression has 4 variables, so we draw a 4
x 4 K Map.
• We fill the cells of K Map in accordance with the given boolean
function.
• Then, we form the groups in accordance with the above rules.
PROBLEMS BASED ON KARNAUGH MAP
• Problem-05: Minimize the following boolean
function-
F(A, B, C, D) = Σm(0, 1, 3, 5, 7, 8, 9, 11, 13, 15)
• Solution-
PROBLEMS BASED ON KARNAUGH MAP
• Problem-05: Minimize the following boolean function-
F(A, B, C, D) = Σm(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)
• Solution-
• Now,
F(A, B, C, D)
= (A’B’ + A’B + AB + AB’)(C’D + CD) + (A’B’ + AB’)(C’D’ + C’D)
= D + B’C’
• Solution-
• Since the given boolean expression has 4 variables, so we draw a
4 x 4 K Map.
• We fill the cells of K Map in accordance with the given boolean
function.
• Then, we form the groups in accordance with the above rules.
PROBLEMS BASED ON KARNAUGH MAP
• Problem-06: Minimize the following boolean function-
• F(A, B, C, D) = Σm(1, 3, 4, 6, 8, 9, 11, 13, 15) + Σd(0, 2, 14)
• Solution-
PROBLEMS BASED ON KARNAUGH MAP
• Problem-06: Minimize the following boolean function-
• F(A, B, C, D) = Σm(1, 3, 4, 6, 8, 9, 11, 13, 15) + Σd(0, 2, 14)
• Solution-
• Now,
F(A, B, C, D)
= (AB + AB’)(C’D + CD) + (A’B’ + AB’)(C’D + CD) + (A’B’ + AB’)
(C’D’ + C’D) + (A’B’ + A’B)(C’D’ + CD’)
= AD + B’D + B’C’ + A’D’
S R Q Q’
0 0 0 1
0 1 0 1
1 0 1 0
1 1 ∞ ∞
SR Flip Flop
• The circuit diagram of SR Flip-Flop
• In this circuit diagram, the output is changed (i.e. the
stored data is changed) only when you give an active clock
signal. Otherwise, even if the S or R is active, the data will
not change.
JK Flip Flop
• Due to the undefined state in the SR flip-flops, another flip-flop
is required in electronics.
• used to remove the drawback of the S-R flip flop, i.e., undefined
states.
JK Flip Flop
• Truth Table: Block Diagram
JK Flip Flop
• The input condition of J=K=1, gives an output inverting the
output state.
• In simple words, If J and K data input are different (i.e. high and
low), then the output Q takes the value of J at the next clock
edge.
• If J and K are both low, then no change occurs.
• If J and K are both high at the clock edge, then the output will
toggle from one state to the other. J
• K Flip-Flops can function as Set or Reset Flip-flops.
JK Flip Flop
• Circuit Diagram
D Flip Flop
• very popular with digital electronics.
• They are commonly used for counters and
shift registers and input synchronization.
• In the D flip-flops, the output can only be
changed at the clock edge, and if the input
changes at other times, the output will be
unaffected.
• The change of state of the output is
dependent on the rising edge of the clock.
• The output (Q) is the same as the input and
can only change at the rising edge of the
clock.
D Flip Flop
• Truth Table
Clock D Q Q’
↓»0 0 0 1
↑»1 0 0 1
↓»0 1 0 1
↑»1 1 1 0
T Flip Flop
• Toggle flip-flops
• In these two flip flops, the 1st flip flop work as "master", called the master
flip flop, and the 2nd work as a "slave", called slave flip flop.
• The master-slave flip flop is designed in such a way that the output of the
"master" flip flop is passed to both the inputs of the "slave" flip flop.
• The output of the "slave" flip flop is passed to inputs of the master flip
flop.
Master-Slave Flip Flop
• In "master-slave flip flop", apart from these two flip flops,
an inverter or NOT gate is also used.
• For passing the inverted clock pulse to the "slave" flip flop,
the inverter is connected to the clock's pulse.
• The master flip flop responds first from the slave because the
master flip flop is the positive level trigger, and the slave flip flop is
the negative level trigger.
Master-Slave Flip Flop
• Working:
• The output Q'=1 of the master flip flop is passed to the slave
flip flop as an input K when the input J set to 0 and K set to 1.
The clock forces the slave flip flop to work as reset, and then
the slave copies the master flip flop.
• When J=1, and K=0, the output Q=1 is passed to the J input of
the slave. The clock's negative transition sets the slave and
copies the master.
• The master flip flop toggles on the clock's positive transition
when the inputs J and K set to 1. At that time, the slave flip
flop toggles on the clock's negative transition.
• The flip flop will be disabled, and Q remains unchanged when
both the inputs of the JK flip flop set to 0.
THANK YOU!!!