15.2 Logic Circuits, Boolean Algebra, FlipFlop
15.2 Logic Circuits, Boolean Algebra, FlipFlop
Syllabus Content:
15.2 Boolean algebra
show understanding of Boolean algebra
Notes and guidance
o understanding of De Morgan’s Laws
o perform Boolean algebra using De Morgan’s Laws
o simplify a logic circuit/expression using Boolean algebra
15.2 Logic circuits design
produce truth tables for common logic circuits including half adders and full adders
show understanding of flip-flop (SR and JK)
Notes and guidance
o may include logic gates with more than two inputs
o draw a logic circuit and derive a truth table for a given logic circuit
o understanding the role of flip-flops as data storage elements
The complement is the inverse of a variable and is indicated by a bar over the
variable. The complement of a variable is not considered as a different
variable.
Every occurrence of a variable or its complement is called a Literal. It could be its true
form or its complement, both of them are called Literals
A sum term is equal to 1 if one or all of its inputs are 1, and is equal to 0 only if
all of its inputs are zero.
A product term is equal to 1 if all of its inputs are 1. And is equal to 0 if any
one (or all) of its inputs are zero.
Boolean algebra provides a concise way to express the operation of a logic circuit formed by a
combination of logic gates so that the output can be determined for various combinations of
input values.
To derive the Boolean expression for a given logic circuit, begin at the left most inputs and
work towards the final output, writing the expression for each gate.
Two given Boolean expressions are said to be equivalent if one of them equals “1”
only when the other also equals “1” and same case with “0”
They are said to be complement of each other if one expression equals “1” only
when the other equals “0” and vice versa.
When this is done, the reduced expression will produce a circuit that is less
complex than the one which the original expression would have produced.
Commutative Laws
Rule 1:
For Addition:
X+Y=Y+X
For Multiplication:
X.Y = Y.X
Associative Laws:
Rule 2:
For Addition:
X+(Y+Z) = Y+(Z+X) = Z+(X+Y)
For Multiplication
X.(Y.Z) = Y.(Z.X) = Z.(X.Y)
Distributive Laws
Rule 3:
X.(Y+Z) = X.Y + X.Z
(X.Y) + (X.Z) = X(Y+Z)
0+X = X
1+X = 1
AND Laws:
These laws use the AND operation. Therefore they are called as AND laws.
0.X = 0
1.X = X
RULE 5:
X.X.X.X………………………X = X
RULE 7:
X+X+X+X +………………..+X = X
Complementation Law:
RULE 6:
X.X = 0
RULE 8:
X+X = 1
Involution Law / INVERSION law:
RULE 9:
This law uses the NOT operation. The inversion law states that double inversion of a
variable result in the original variable itself.
X=X or
o X+X.Y = X
RULE 11:
o X+X.Y = X+Y
RULE 12:
o (X+Y).(X+Z) = X+Z.Y
Explanation of Rule10, Rule 11, Rule12
DeMorgan’s Theorem
Theorem 2:
The compliment of the sum of two variables is equal to the product of the
compliment of each variable
Logic circuits
• produce truth tables for common logic circuits including half adders and full adders
• derive a truth table for a given logic circuit
Flip-flops
• show understanding of how to construct a flip-flop (SR and JK)
• describe the role of flip-flops as data storage elements
Half Adder:
The simplest circuit that can be used for binary addition is the half adder. This can be
represented by the diagram in the circuit takes two input bits and outputs a sum bit (S)
and a carry bit (C).
With the help of half adder, we can design circuits that are capable of performing
simple addition with the help of logic gates. Let us first take a look at the addition of
single bits.
0+0 = 0
0+1 = 1
1+0 = 1
1+1 = 10
These are the least possible single-bit combinations. But the result for 1+1 is 10.
Though this problem can be solved with the help of an EXOR Gate, if you do care about
the output, the sum result must be re-written as a 2-bit output.
0+0 = 00
0+1 = 01
1+0 = 01
1+1 = 10
Here the output ‘1’of ‘10’ becomes the carry-out. The result is shown in a truth-table
below. ‘SUM’ is the normal output and ‘CARRY’ is the carry-out.
From the equation it is clear that this 1-bit adder can be easily implemented with the help of
EXOR Gate for the output ‘SUM’ and an AND Gate for the carry. Take a look at the
implementation below. For complex addition, there may be cases when you have to add two 8-
bit bytes together. This can be done only with the help of full-adder logic.
Full Adder
This type of adder is a little more difficult to implement than a half-adder. The main difference
between a half-adder and a full-adder is that the full-adder has three inputs and two outputs.
The first two inputs are A and B and the third input is an input carry designated as CIN. When a
full adder logic is designed we will be able to string eight of them together to create a byte-
wide adder and cascade the carry bit from one adder to the next.
The output carry is designated as COUT and the normal output is designated as S. Take a look
at the truth-table.
From the above truth-table, the full adder logic can be implemented. We can see that the output S
is an EXOR between the input A and the half-adder SUM output with B and CIN inputs. We must
also note that the COUT will only be true if any of the two inputs out of the three are HIGH.
Thus, we can implement a full adder circuit with the help of two half adder circuits. The first will half
adder will be used to add A and B to produce a partial Sum. The second half adder logic can be
used to add CIN to the Sum produced by the first half adder to get the final S output. If any of the
half adder logic produces a carry, there will be an output carry. Thus, COUT will be an OR function
of the half-adder Carry outputs. Take a look at the implementation of the full adder circuit shown
below.
Though the implementation of larger logic diagrams is possible with the above full adder logic a
simpler symbol is mostly used to represent the operation. Given below is a simpler schematic
With this type of symbol, we can add two bits together taking a carry from the next lower order
of magnitude, and sending a carry to the next higher order of magnitude. In a computer, for a
multi-bit operation, each bit must be represented by a full adder and must be added
simultaneously. Thus, to add two 8-bit numbers, you will need 8 full adders which can be formed
by cascading two of the 4-bit blocks. The addition of two 4-bit numbers is shown below.
The SR flip-flop
All of the circuits so far encountered were combinational circuits. For such a circuit the
output is dependent only on the input values. An alternative type of circuit is a sequential
circuit where the output depends on the input and on the previous output
SR Flip-Flop
The SR flip-flop, also known as a SR Latch , can be considered as one of the most basic
sequential logic circuit possible. This simple flip-flop is basically a one-bit memory bistable
device that has two inputs, one which will “SET” the device (meaning the output = “1”), and is
labelled S and another which will “RESET” the device (meaning the output = “0”), labelled R.
As well as using NAND gates, it’s also possible to construct simple one-bit SR Flip-
flops using two cross-coupled NOR gates connected in the same configuration. The
circuit will work in a similar way to the NAND gate circuit above, except that the inputs
are active HIGH and the invalid condition exists when both its inputs are at logic level
“1”, and this is shown below.
The NOR Gate SR Flip-flop
Below are SR flip flops with NOR Gates and NAND Gates along with truth tables,
also showing invalid state:
The JK flip-flop
In addition to the possibility of entering an invalid state there is also the potential for a circuit to
arrive in an uncertain state if inputs do not arrive quite at the same time. In order to prevent
this, a circuit may include a clock pulse input to give a better chance of synchronizing inputs.
The JK flip-flop is an example.
The JK flip-flop can be illustrated by the symbol shown in Figure (a). A possible circuit is
shown in Figure (b).
References:
AS & A level by Silvia Langfield and Dave Duddell
http://study.com/academy/lesson/how-star-topology-connects-computer-networks-in-
organizations.html
https://www.allaboutcircuits.com/textbook/digital/chpt-7/demorgans-theorems/
https://en.wikipedia.org/wiki/De_Morgan%27s_laws
http://www.electronicshub.org/boolean-algebra-laws-and-theorems/
http://www.electronics-tutorials.ws/sequential/seq_1.html
https://www.elprocus.com/half-adder-and-full-adder/