Digitsl Logic (Assignment)
Digitsl Logic (Assignment)
According to its position of occurrence in the number, each digit is weighted. Towards the left the weights
increases by a constant factor equivalent to the base or radix. With the help of the radix point (‘.’), the
positions corresponding to integral weights (1) are differentiated from the positions corresponding to
fractional weights (<1).
Any integer value that is greater than or equal to two can be used as the base or radix. The digit position ‘n’
has weight r^n. Largest value of digit position is always 1 less than the base value. The value of a number is
weighted sum of its digits.
For example:
1
4) Define Logic gate. Discuss basic logic gates with symbol, truth table
Ans : Logic gates are the basic building blocks of any digital system. It is an electronic circuit having
one or more than one input and only one output. The relationship between the input and the output
is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate
etc.
AND Gate
A circuit which performs an AND operation is shown in figure. It has n input (n >= 2) and one
output.
Logic diagram
Truth Table
OR Gate
A circuit which performs an OR operation is shown in figure. It has n input (n >= 2) and one output.
2
Logic diagram
Truth Table
NOT Gate
NOT gate is also known as Inverter. It has one input A and one output Y.
Logic diagram
Truth Table
3
NAND Gate
A NOT-AND operation is known as NAND operation. It has n input (n >= 2) and one output.
Logic diagram
Truth Table
NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.
Logic diagram
Truth Table
4
XOR Gate
XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime as X-OR gate. It has
n input (n >= 2) and one output.
Logic diagram
Truth Table
XNOR Gate
XNOR gate is a special type of gate. It can be used in the half adder, full adder and subtractor. The
exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR gate. It has n input (n
>= 2) and one output.
5
Logic diagram
Truth Table
1. One NAND input pin is connected to the input signal A while all other input pins
are connected to logic 1. The output will be A’.
6
6) State and prove boolean laws.
Ans. Boolean Algebra is used to analyze and simplify the digital (logic) circuits. It uses
only the binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical
Algebra. Boolean algebra was invented by George Boole in 1854.
Boolean Laws
There are six types of Boolean Laws.
Commutative law
Any binary operation which satisfies the following expression is referred to as
commutative operation.
Commutative law states that changing the sequence of the variables does not have any
effect on the output of a logic circuit.
Associative law
This law states that the order in which the logic operations are performed is irrelevant
as their effect is the same.
Distributive law
Distributive law states the following condition.
AND law
7
These laws use the AND operation. Therefore they are called as AND laws.
OR law
These laws use the OR operation. Therefore they are called as OR laws.
INVERSION law
This law uses the NOT operation. The inversion law states that double inversion of a
variable results in the original variable itself.
The prior difference between the SOP and POS is that the SOP contains the OR of the
multiple product terms. Conversely, POS produces a logical expression comprised of the
8
AND of the multiple OR terms. Before understanding SOP and POS, we must learn
various related terms so that the entire thing would collectively make some sense.
Comparison Chart
BASIS
FOR
SOP POS
COMPARI
SON
produces a value 1.
9
Method 1 represents the variable 0 represents the variable
it. variable.
tion
Definition of SOP
When we add two or multiple product terms by a boolean addition, the output expression
is a sum-of-products (SOP). For example, the expression a’bc’ + a’bd’ + a’bc’d shows a
SOP expression. It can also have a single variable term within the expression like a + bc
+a’b. These logical expressions are simplified in a way that they must not contain
redundant information while creating the minimal version of it.
It is mainly implemented by an AND-OR logic where the product of the variables are first
produced by AND gate and then added by the OR gates. For example, the expression
“ab’+bcd+ac” can be expressed by the logic circuit shown in figure 1.1 where the output
P of the OR gate is the SOP expression.
10
Steps for converting the product term into standard SOP
Here the standard SOP or canonical SOP refers to an expression in which all the
variables of the domain are present. For generating, standard SOP from the product
term the boolean rule “A+A’=1” (the output is ‘1’ when a variable added to its
complement) is used and below given steps are followed.
Example
The term ab’c+a’b’+abc’d converted into the standard SOP or canonical SOP by
multiplying the part of the term by the missing term. Such as a’b’ is multiplied with the
c+c’. Similarly, the whole expression is converted in its canonical form by the following
given steps.
11
Now there
are various terms which are used while generating the reduced logic function such as
minterm, maxterm, k-map (Karnaugh Map), which we will elucidate further in the article.
Minterm
In these terms, the input variables making up a boolean expression is the dot product of
each other, and it is also known as minterm or product term. Mn following table
presents the minterms of the variables.
Suppose, we have a truth table (as shown in figure 1.3) in which each term of the input
variables are written as the product of all the terms. To determine the input combinations
that exist, we need to select the output having value 1 and convert the binary into
12
relevant product term. Here, we will consider ‘0’ as the variable and ‘1’ as the
compliment of the variable.
Y(A,B,C,D) = ∑m (0,2,3,6,7)
Only those product terms are selected where the output value is 1.
Y = m0+m2+m3+m6+m7
So, in accordance with the truth table, the boolean function (Canonical SOP form) in the
minterm is :
Y = A’B’C’+A’BC’+A’BC+ABC’+ABC
Definition of POS
POS (Product of Sums) is the representation of the boolean function in which the
variables are first summed, and then the boolean product is applied in the sum terms.
13
For example, (a’+b).(a+b’+c) is POS expression where we can see that the variables are
added then each bigger term is the product of the other.
It just needs the variables to be inserted as the inputs to the OR gate. The terms
generated by the OR gates are inserted in the AND gate. The sum term is formed by an
OR operation, and product of two or multiple sum terms is created by an AND operation.
To understand the POS implementation refer the below given figure 2.1 of the
expression (a+b).(b+c+d).(a+c).
Similar to the previous explanation, the standard or canonical POS is in which sum terms
does not include all of the variables in the domain of the expression. Here, also we use
the boolean algebra rule 8 “A.A’=0” (a variable multiplied by its complement is 0) to
convert a term in a standard form, and the method is given below.
● In the very first step, each non-standard term added with a term comprised of
the product of the absent variable and its complement. This will produce two
sum term, and ‘0’ can be added to any term without changing its value.
● Then, rule 12 (i.e.A+BC=(A+B)(A+C)) is applied to the terms.
● The first two steps are redone again and again until all the sum terms involve
all the variables present in the domain either in the complemented and
uncomplemented form.
14
Example
Maxterm
These are the terms in which the input variables are present in summation form,
alternately called as sum term. The below-given table represents the Mn, maxterms of
the variables.
15
To find the POS expression with the help of a truth table (figure 2.3), record the binary
values having the output 0. Translate each binary value to the related sum term where
each value ‘1’ is substituted with the corresponding variable complement and each 0 is
with the corresponding variable.
Y(A,B,C,D) = ∏m (1,4,5)
Only those sum terms are selected where the output value is 0.
Y = m1+m4+m5
So, in accordance with the truth table, the boolean function (Canonical POS form) in the
maxterm is :
Y = (A+B+C’).(A’+B+C).(A’+B+C’)
16
1. SOP (Sum of product) generates expression in which all the variables in a
domain are first multiplied then added. On the contrary, the POS (Product of
Sum) represents the boolean expression having variables summed then
multiplied with each other.
2. Minterms or product terms are mainly used in the SOP which associates with
the high (1) value. Conversely, in POS, Maxterms or sum terms are
employed, which produces a low (0) value.
3. In the SOP, method, the value ‘1’ is replaced by the variable and ‘0’ by its
complement. In contrast, when it comes to POS a ‘0’ is substituted by the
variable and ‘1’ by its complement.
4. At last, all the terms are added with each other in case of SOP. As against, in
POS, the terms are multiplied with each other in the last step of the process.
17