Centre For Distance & Online Education: B+A A+B
Centre For Distance & Online Education: B+A A+B
INTERNAL ASSIGNMENT
SET-I
1. Commutative Law:
Commutative Law states that the order of variables does not matter in any of the Boolean
operations. For two variables, the commutative law of addition is a+b = b+a and the
commutative law of multiplication is a.b = b.a
These can be represented through logic diagrams as follows:
A B
A+B B+A
B A
A B
A.B B.A
B A
2. Associative Law
This law states that the operation can be performed in any order when the variables priority is
same. As '*' and '/' have same priority. In the below diagram, the associative law is applied to
the 2-input OR gate. For three variables, the associative law of addition is written as:
A + (B + C) = (A + B) + C
A A A(BC)
A(BC)
B
B
C C
3. Distributive Laws:
According to this law, if we perform the OR operation of two or more variables and then
perform the AND operation of the result with a single variable, then the result will be similar
to performing the AND operation of that single variable with each two or more variable and
then perform the OR operation of that product. This law explains the process of factoring.
For three variables, the distributive law is written as:
A(B + C) = AB + AC
A
B
B
B+C Y
C
A
A Y
C
Y= A (B + C) Y= AB + AC
4. Involution Law:
(A’)’= A
A=1 A=0
5. Complementary Law:
A+A’ = 1
A=1
A=0 Y=1
Y=1
A=1 A=0
A.A’ = 0
A=0 A=1
Y=1
Y=0 A=1
A=0
6. Idempotent Law:
A+A=A
A=1
A=0 Y=1
Y=0 A=1
A=0
Page 2 of 13 Mail id: [email protected]
Phone: +91 79966 00444 (Toll
Free)
Centre for Distance & Online Education
A.A = A
A=0 A=1
Y=0 Y=0
A=0 A=1
7. Identity Law:
A+0 = A
A.1 = A
A=0 A=1
Y=0 Y=1
1 1
8. DeMorgans Law:
(AB)’ = A’ + B’ A
A
A
Y = AB Y=A+B
B
B
B
(A + B)’ = A’B’
A
A
A Y=AB
Y=A+B
B B
B
Q2. Define the term logic gates. Explain the various basic gates with their symbols and
truth table.
A logic gate is an electronic circuit which has one or more inputs but only one output. Logic
gate produces logical operation on binary numbers. The various types of gates are:
1. OR Gate: OR gate has two or more inputs and only one output. The operation of this gate is
such that it produces a high output (i.e. logic 1) when one or more of inputs are high and it
A
A+B Y=A+B
B
(a) (b)
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
A
A.B Y= A.B
B
(a) (b)
A B Y
1 1 1
0 1 0
1 0 0
0 0 0
Truth table
Here A and B are the inputs and Y is the output. The Boolean expression Y = A.B is read as Y
equals A AND B.
A Y Y=A
A Y
1 0
0 1
Truth Table
Universal Gates
NAND Gate:
The NAND gate is a digital logic gate that behaves in a manner that corresponds to the truth
table to the left. When both the inputs to NAND gate are high, then output of the gate will be
LOW. The output of gate will be HIGH when one or both the inputs of NAND gate are LOW.
As any type of gate or Boolean function can be implemented using NAND gates, they are also
known as Universal gates.
Distinctive NAND Symbol Rectangular NAND Symbol
&
A
Out
B
X Y X|Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate:
The NOR gate is a digital logic gate and it behaves such that when both the inputs of NOR gate
are LOW, the output of the gate will be HIGH. A LOW output results when one or both inputs
of the NOR gate are HIGH. Negation of OR gate output results in NOR. NOR is a functionally
complete operation – As any type of gate or Boolean function can be implemented using NOR
gates, they are also known as Universal gates. As the OR operator can change LOW to HIGH
but not vice versa, it is said to be monotonic.
A >1
Page 5 of 13 out Mail id: [email protected]
B Phone: +91 79966 00444 (Toll
Free)
Centre for Distance & Online Education
X Y X?Y
0 0 1
American NOR Symbol 0 1 0 IEC NOR Symbol
1 0 0
X Y X?Y 1 1 0
0 0 1
0 1 0
1 0 0
1 1 0
XOR Gate:
The XOR gate (sometimes EOR gate) is a digital logic gate that implements exclusive
disjunction – it behaves according to the truth table to the right. If either one of the input is
HIGH, then the output will be HIGH. The output of the gate results a LOW value when either
the inputs of the gate are LOW or both are HIGH.
A A B A XOR B
A XOR B 0 0 0
B
0 1 1
1 0 1
1 1 0
Logical Symbol of XOR Gate
X-NOR Gate
The XNOR gate is a digital logic gate whose function is the inverse of the exclusive OR (XOR)
gate. The two-input version implements logical equality, behaving according to the truth table
to the right. If the inputs to XOR gate are same, then the output will be HIGH. A LOW output
will result if both the inputs to the XOR gate are not same.
A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1
A
out
B
X-NOR Symbol
SET-II
The JK flip-flop augments the behavior of the SR flip-flop (J=Set, K=Reset) by interpreting
the S = R = 1 condition as a "flip" or toggle command. The flip flop will be set when J is 1 and
K is 0; and flip flop will be reset when J is 0 and K is 1; the output of the flip flop will toggle
when both J and K are 1. Setting J = K = 0 does NOT result in a D flip-flop, but rather, will
hold the current state. The D flip flop can be obtained from JK flip flop by setting complement
of J to K. As JK flip flop can be configured to any of other 3 flip flops (SR, D, T), it is
considered as Universal flip flop. The figure below shows the logic symbol of JK flip-flop.
Shift Register is a set of binary storage elements, typically flip-flops combined and linked
together to facilitate the movement of the data bits stored, from one to another and in and out
of it, whenever desired by activating control signals. Inputs to the shift registers can be serial
or parallel. Similarly outputs of the shift registers can be serial or parallel. Thus we can have
four types of shift registers based on the serial or parallel nature of inputs and outputs.
They are listed below.
Serial Input Serial Output (SISO)
Serial Input Parallel Output (SIPO)
Parallel Input Serial Output (PISO)
Parallel Input Parallel Output (PIPO)
There are bi-directional shift registers that allow shifting of data bits in both directions, i.e.
from left to right and vice versa. If we connect inputs and outputs of a serial-in serial-out shift
register, we get so called circular shift register.
Serial-In Serial-Out (SISO): As the name suggests, data bits are stored in serially and in the
same way these get out of the shift register serially. The string of bits that we want to shift in
are given to the input pin named ‘Data In’. Each bit presented at ‘Data In’ is shifted to its right
one flip-flop at a time, every time ‘Data Shift’ signal is enabled. First time, the bit on ‘Data In’
line is moved into the first ‘flip-flop’s output. The data bit on the rightmost flip-flop gets shifted
out through the output line of the shift register ‘Data Out’. The bit that goes out through ‘Data
Out’ is lost.
Serial-In Serial-Out
Serial-In Parallel-Out (SIPO) This is almost similar to SISO shift register except that the data
are readout in parallel at the same time. this means, we can input the data bits into this shift
register serially via ‘Data In’ input line and data can be read out in parallel from data out lines.
Serial-In Parallel-Out
Parallel-In Serial-Out (PISO): In Parallel-In, Serial-Out (PISO) shift register, the data input is
given in parallel to the input line of each of the flip-flops and outputs are readout serially from
single output line (Data Out).
Parallel-In Serial-Out
Parallel-In Parallel-Out (PIPO): The PIPO register is mainly used to shift a given set of bits
and present it to the next stage as illustrated below. Input for shifting can be loaded into the
register in parallel and the shifted output can be read out of the register in parallel as well.
Hence the name PIPO shift register.
Parallel-In Parallel-Out