IEL - Module - 3 - UPD
IEL - Module - 3 - UPD
Boolean Algebra and Logic Circuits: Binary numbers, Number Base Conversion, octal
& Hexa Decimal Numbers, Complements (1’s and 2’s complement), Basic definitions,
Axiomatic Definition of Boolean Algebra, Basic Theorems and Properties of Boolean
Algebra, Boolean Functions, Canonical and Standard Forms, Other Logic Operations,
Digital Logic Gates
Combinational logic: Introduction, Design procedure, Adders- Half adder, Full adder
8 hrs
Chapter 1.5, 1.2, 1.3, 1.4, 2.3, 2.4, 2.5, 2.5, 2.6, 2.7, 2.8, 4.1, 4.4, 4.5
Number Systems
There are infinite ways to represent a number. The four commonly associated with
modern computers and digital electronics are: Decimal System
Binary System
Octal System
Hexadecimal System
Decimal System- The decimal system is the system which we use in everyday
counting. The number system includes the ten digits from 0 through 9. These digits
are recognized as the symbols of the decimal system. Each digit in a base ten
number represents units ten times the units of the digit to its right.
For example-9542= 9000 + 500 + 40 +2= (9 × 103) + (5 × 102) + (4 × 101) + (2× 100)
Binary System - Computers do not use the decimal system for counting and
arithmetic. Their CPU and memory are made up of millions of tiny switches that can
be either in ON and OFF states. 0 represents OFF and 1 represents ON. In this way
we use binary system. Binary system has two numbers 0 and 1. Binary system is
called base 2 system.
Octal System- The octal system is commonly used with computers. The octal
number system with its 8 digit 0,1,2,3,4,5,6, and 7 has base 8. The octal system uses a
power of 8 to determine the digit of a number’s position.
Any number in one number system can be converted into any other number system.
There are the various methods that are used in converting numbers from one base to
another.
Remark- If the conversion is not ended and still continuing; stop it when same
number repeats again.
4
Conversions of Binary to Octal- We use the following steps in converting binary to
octal-
(a) Break the number into 3-bit sections starting from LSB to MSB.
(b) If we do not have sufficient bits in grouping of 3-bits, we add zeros to the left of
MSB so that all
the groups have proper 3-bit number.
(c) Write the 3-bit binary number to its octal equivalent.
5
.
Conversions of Binary Fractions to Hexadecimal Fractions - We convert binary
fractions to hexadecimal fractions in the similar manner as we have converted binary
fractions to octal fractions. The only difference is that here we form the group of 4 –
bits.
6
(b) Combine the 3-bit section by removing the spaces to get the binary number.
7
Conversions of Octal Fractions to Hexadecimal Fractions- The method of
conversion is based on the same procedure that we have discussed in conversions of
octal to hexadecimal.
8
Conversions of Hexadecimal Fractions to Decimal Fractions- We do the
conversion
of hexadecimal fractions to decimal fractions in the similar manner as we have done
the conversion of binary fractions to decimal fractions. Here weight of bit is 16- 1, 16-
2
…….
9
Conversions of Hexadecimal to Octal- We convert each hexadecimal digit in
binary.
Combine all the binary numbers. Again group them into 3-bit form. Convert the 3-bit
block in octal.
10
1’s and 2’s Complements
11
12
Digital Logic gates
Digital systems are said to be constructed by using logic gates. These gates are the
AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are
described below with the aid of truth tables.
AND gate
Y=A.B
The AND gate is an electronic circuit that gives a high output (1) only if all its
inputs are high. A dot (.) is used to show the AND operation i.e. A.B Bear in
mind that this dot is sometimes omitted i.e. AB
A B
V Lamp
OR gate
Y=A+B
The OR gate is an electronic circuit that gives a high output (1) if one or more
of its inputs are high. A plus (+) is used to show the OR operation.
13
A
V Lamp
NOT gate
Y=A
The NOT gate is an electronic circuit that produces an inverted version of the
input at its output. It is also known as an inverter. If the input variable is A,
the inverted output is known as NOT A. This is also shown as A', or A with a
bar over the top, as shown at the outputs. The diagrams below show two ways
that the NAND logic gate can be configured to produce a NOT gate.
Switch diagram
In the figure, A is a switch which has been connected in parallel, with the Lamp
and source battery. When switch is open, current does not flow to Lamp, when
switch is closed then current flows and Lamp glows.
V A Lamp
NAND gate
Y=A.B
14
This is a NOT-AND gate which is equal to an AND gate followed by a NOT
gate. The outputs of all NAND gates are high if any of the inputs are low. The
symbol is an AND gate with a small circle on the output. The small circle
represents inversion.
A Lamp
V
NOR gate
Y=A+B
A B
V Lamp
EXOR gate
15
Y=AB+AB
The 'Exclusive-OR' gate is a circuit which will give a high output if either,
but not both, of its two inputs are high. An encircled plus sign ( ) is used to
show the E-OR operation.
EXNOR gate
Y=AB+AB
The 'Exclusive-NOR' gate circuit does the opposite to the E-OR gate. It will give a
low output if either, but not both, of its two inputs are high. The symbol is an
EXOR gate with a small circle on the output. The small circle represents inversion.
Universal Gates
Any function can be implemented using only NAND or only NOR gates. Therefore
NAND & NOR gates are called as universal gates.
16
3. Implementing OR Using only NAND Gates
NAND
Construction
Desired Gate
17
NOR AS UNIVERSAL GATE
18
5. Implementing EX-OR Using only NOR Gate
The most obvious way to simplify Boolean expressions is to manipulate them in the
same way as normal algebraic expressions are manipulated. With regards to logic
relations in digital forms, a set of rules for symbolic manipulation is needed in order
to solve for the unknowns.
Commutative Laws
►The commutative law of addition for two variables is written as
A+B = B+A
This law states that the order in which the variables are ORed makes no difference.
Remember, in Boolean algebra as applied to logic circuits, addition and the OR
operation are the same. Fig illustrates the commutative law as applied to
the OR gate and shows that it doesn't matter to which input each variable is applied.
(The symbol ≡ means "equivalent to.").
19
Fig: Application of commutative law of addition.
Associative Laws :
►The associative law of addition is written as follows for three variables:
A + (B + C) = (A + B) + C
This law states that when ORing more than two variables, the result is the same
regardless of the grouping of the variables. Fig , illustrates this law as applied to 2-
input OR gates.
Distributive Law:
►The distributive law is written for three variables as follows:
A (B + C) = AB + AC
This law states that ORing two or more variables and then ANDing the result with a
single variable is equivalent to ANDing the single variable with each of the two or
more variables and then ORing the products. The distributive law also expresses the
20
process of factoring in which the common variable A is factored out of the product
terms, for example, AB + AC = A(B + C).
Fig. illustrates the distributive law in terms of gate implementation.
Rule 1. A + 0 = A
A variable ORed with 0 is always equal to the variable. If the input variable A is 1, the
output variable X is 1, which is equal to A. If A is 0, the output is 0, which is also equal
to A. This rule is illustrated in Fig , where the lower input is fixed at 0.
Rule 2. A + 1 = 1
21
A variable ORed with 1 is always equal to 1. A 1 on an input to an OR gate produces a
1 on the output, regardless of the value of the variable on the other input. This rule is
illustrated in Fig, where the lower input is fixed at 1.
Rule 3. A . 0 = 0
A variable ANDed with 0 is always equal to 0. Any time one input to an AND gate is 0,
the output is 0, regardless of the value of the variable on the other input. This rule is
illustrated in Fig, where the lower input is fixed at 0.
Rule 4. A . 1 = A
A variable ANDed with 1 is always equal to the variable. If A is 0 the output of the AND
gate is 0. If A is 1, the output of the AND gate is 1 because both inputs are now 1s.
This rule is shown in Fig, where the lower input is fixed at 1.
Rule 5. A + A = A
A variable ORed with itself is always equal to the variable. If A is 0, then 0 + 0 = 0;
and if A is 1, then 1 + 1 = 1. This is shown in Fig.(4-10), where both inputs are the
same variable.
Rule 6. A + A = 1
A variable ORed with its complement is always equal to 1. If A is 0, then 0 + 0 = 0 + 1
= 1. If A is 1, then 1 + 1 = 1+ 0 = 1. See Fig, where one input is the complement of
the other.
Rule 7. A . A = A
A variable ANDed with itself is always equal to the variable. If A = 0, then 0.0 = 0; and
if A = 1. then 1.1 = 1. Fig.(4-12) illustrates this rule.
Rule 8. A . A = 0
22
A variable ANDed with its complement is always equal to 0. Either A or A will always
be 0: and when a 0 is applied to the input of an AND gate. The output will be 0 also.
Fig illustrates this rule.
Rule9. A = A
The double complement of a variable is always equal to the variable. If you start with
the variable A and complement (invert) it once, you get A. If you then take A and
complement (invert) it, you get A, which is the original variable. This rule is shown in
Fig using inverters.
Rule10. A + AB = A
This rule can be proved by applying the distributive law, rule 2, and rule 4 as follows:
23
The proof is shown in Table , which shows the truth table and the resulting logic circuit
simplification.
24
Duality Theorem
Duality Principle:
The duality property of Boolean algebra state that all binary expressions remain valid when following two
steps are performed:
Example:
1) x + 0 = x, duality of this is x •1 = x
2) x + x= 1 duality of this is x • x = 0
3) x + y = y + x duality of this is x * y = y * x
DEMORGAN'S THEOREMS
DeMorgan, a mathematician who knew Boole, proposed two theorems that are an
important part of Boolean algebra. In practical terms. DeMorgan's theorems provide
mathematical verification of the equivalency of the NAND and negative-OR gates and
the equivalency of the NOR and negative-AND gates.
One of DeMorgan's theorems is stated as follows:
The complement of a product of variables is equal to the sum of the
complements of the variables,
Stated another way,
The complement of two or more ANDed variables is equivalent to the OR of
the complements of the individual variables.
The formula for expressing this theorem for two variables is
XY = X + Y
X+Y=XY
Fig.shows the gate equivalencies and truth tables for the two equations above.
As stated, DeMorgan's theorems also apply to expressions in which there are more
than two variables. The following examples illustrate the application of DeMorgan's
theorems to 3-variable and 4-variable expressions.
26
27
28
29
30
31
32
33
STANDARD FORMS OF BOOLEAN EXPRESSIONS
All Boolean expressions, regardless of their form, can be converted into either of two
standard forms: the sum-of-products form or the product-of sums form.
Standardization makes the evaluation, simplification, and implementation of Boolean
expressions much more systematic and easier.
The Sum-of-Products (SOP) Form
When two or more product terms are summed by Boolean addition, the resulting
expression is a sum-of-products (SOP). Some examples are:
So far, you have seen SOP expressions in which some of the product terms do not
contain all of the variables in the domain of the expression. For example, the
expression
has a domain made up of the variables A, B, C. and D. However, notice that the
complete set of variables in the domain is not represented in the first two terms of the
expression; that is, D or D is missing from the first term and C or C is missing from the
second term.
A standard SOP expression is one in which all the variables in the domain appear in
each product term in the expression. For example, is a
standard SOP expression.
Each product term in an SOP expression that does not contain all the variables in the
domain can be expanded to standard SOP to include all variables in the domain and
their complements. As stated in the following steps, a nonstandard SOP expression is
converted into standard form using Boolean algebra rule (A + A = 1): A variable
added to its complement equals 1.
Step 1. Multiply each nonstandard product term by a term made up of the sum of a
missing variable and its complement. This results in two product terms. As you know,
you can multiply anything by 1 without changing its value.
34
Step 2. Repeat Step 1 until all resulting product terms contain all variables in the
domain in either complemented or uncomplemented form. In converting a product
term to standard form, the number of product terms is doubled for each missing
variable.
A sum term was defined before as a term consisting of the sum (Boolean addition) of
literals (variables or their complements). When two or more sum terms are multiplied,
the resulting expression is a product-of-sums (POS).
35
The Standard POS Form
So far, you have seen POS expressions in which some of the sum terms do not contain
all of the variables in the domain of the expression. For example, the expression
has a domain made up of the variables A, B, C, and D. Notice that the complete set of
variables in the domain is not represented in first two terms of the expression; that is,
D or D is missing from the first term and C or C is missing from the second term.
A standard POS expression is one in which all the variables in the domain appear in
each sum term in the expression. For example,
Each sum term in a POS expression that does not contain all the variables in the
domain can be expanded to standard form to include all variables in the domain and
their complements. As stated in the following steps, a nonstandard POS expression is
converted into standard form using Boolean algebra rule (A A = 0)
Step 1.Add to each nonstandard product term a term made up of the product of the
missing variable and its complement. This results in two sum terms. As you know, you
can add 0 to anything without changing its value.
Step 3.Repeat Step 1 until all resulting sum terms contain all variables in the domain
in either complemented or noncomplemented form.
36
37
Numerical
38
39
Numerical
Numerical
40
Combinational Logic: Introduction
Design Procedure
41
Half-adder
42
Full-adder
43
44