0% found this document useful (0 votes)
18 views30 pages

ITPE-101-Digital-Electronics_Module_2-4-Lessons

Module II introduces the basics of digital electronics, focusing on logic gates, Boolean algebra, and their applications in circuit design. It includes lessons on various logic gates such as AND, OR, NOT, NAND, NOR, XOR, and XNOR, along with their truth tables and Boolean expressions. The module aims to equip learners with the skills to analyze, design, and build digital electronic circuits through project-based learning.

Uploaded by

jgavina01962
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views30 pages

ITPE-101-Digital-Electronics_Module_2-4-Lessons

Module II introduces the basics of digital electronics, focusing on logic gates, Boolean algebra, and their applications in circuit design. It includes lessons on various logic gates such as AND, OR, NOT, NAND, NOR, XOR, and XNOR, along with their truth tables and Boolean expressions. The module aims to equip learners with the skills to analyze, design, and build digital electronic circuits through project-based learning.

Uploaded by

jgavina01962
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

MODULE II

INTRODUCTION

Lesson 1 Logic Gates

Lesson 2 Lesson Boolean Algebra

3 Lesson 4 Demorgan’s

Truth Table Theorem

Module II
2

¥
INTRODUCTION MODULE II

DIGITAL ELECTRONICS

This module presents Basics of Analog & Digital Electronics. It


is hoped that you will learn design process of robotics, teamwork,
communication methods, engineering standards, and technical
documentation. You will also learn to analyze, design and build
digital electronic circuits using activity
project-problem-based teaching and learning pedagogy

OBJECTIVES

After studying the module, you should be able to:

1. discuss the concepts of analog and digital circuits.


2. explain different characteristics, properties, usage or
applications, coding & decoding, and handling techniques
of the different electronic components.
3. Explain the techniques to solve problems in basic digital
logic components, use and/or interpret their representation
in number codes, truth tables, circuit diagrams and logical
word descriptions.


DIRECTIONS/ MODULE ORGANIZER
There are four lessons in
the module. Read each lesson carefully then answer the
exercises/activities to find out how much you have benefited from it.
Work on these exercises carefully and submit your output to your
instructor.

In case you encounter difficulty, discuss this with your


instructor during the face-to-face meeting or contact your tutor at
CIT office.

Good luck and happy reading!!!


Module II
3

Lesson 1

🕮
Logic Gates

Logic Gates

The logic gate is the most basic building block of any digital
system, including computers. Each one of the basic logic gates is a
piece of hardware or an electronic circuit that can be used to
implement some basic logic expressions. While laws of Boolean
algebra could be used to do manipulation with binary variables and
simplify logic expressions, these are implemented in a digital
system with the help of electronic circuits called logic gates. The
main types of logic gates are AND, NAND, OR, NOR, XOR, and
XNOR.

AND gate

An AND gate is a logic circuit having two inputs and one


output. The output of an AND gate is a logic ‘1’ when the two input
values are both true; otherwise, the output is logic ‘0’.
Symbol Truth Table

ABQ
000
010
100
111

Boolean Expression: (A AND B)

OR gate

An OR gate is a logic circuit with two inputs and one output.


The output of an OR gate is a logic ‘1’ when one or more input
values are true, otherwise, the output is logic ‘0’.
Symbol Truth Table
ABQ
000
011
101
111

Boolean expression: (A OR B)

Module II
4

NOT gate

A NOT gate is a one-input, one-output logic circuit whose


output is always the complement of the input. The output of a NOT
gate is a logic ‘1’ when its single input is a logic ‘0’, and vice versa. It
is also known as a ‘complementing circuit’ or an ‘inverting circuit’.
The Boolean Expression of NOT gate is denoted by a bar (−) over its
input symbol which denotes the inversion operation.
Symbol Truth Table

AQ
10
01

Boolean Expression: not-A or A

NAND gate

NAND stands for NOT AND. An AND gate followed by a NOT


circuit makes it a NAND gate. The truth table of a NAND gate is
obtained from the truth table of an AND gate by complementing the
output entries.

The output of a NAND gate is a logic ‘0’ when all of its input
values are logic ‘1’, otherwise, the output is always a logic ‘1’.
Symbol Truth Table

A B A.B Q
0001
0101
1001
1110

Boolean Expression: (A and B)

Module II
5

NOR gate

NOR stands for NOT OR. AN OR gate followed by a NOT circuit


makes it a NOR gate. The truth table of a NOR gate is obtained
from the truth table of an OR gate by complementing the output
entries.

The output of a NOR gate is a logic ‘1’ when all its input
values are logic ‘0’, otherwise, the output is always a logic ‘0’.
Symbol Truth Table

A B A+B Q
0001
0110
1010
1110

Boolean Expression (A or B)

XOR gate (Exclusive-OR)

EXCLUSIVE-OR gate, commonly written as EX-OR gate, is a


two-input, one-output gate. The output of an EX-OR gate is a logic
‘1’ when the input values are not the same, and otherwise, the
output is a logic ‘0’.
Symbol Truth Table
ABQ
000
011
101
110

Boolean Expression: A ⊕ B

XNOR (Exclusive-NOR)

EXCLUSIVE-NOR (EX-NOR) means NOT of EX-OR, i.e. the logic


gate that we get by complementing the output of an EX-OR gate.
The truth table of an EX-NOR gate is obtained from the truth table of
an EX-OR gate by complementing the output entries.

Module II
6

The output of the XNOR gate is a logic ‘1’ when the two input
values are the same, and otherwise, the output is a logic ‘0’.
Symbol Truth Table

ABQ
001
010
100
111

Boolean Expression : A ⊕ B

Digital Logic Gate Truth Table Summary

The following logic gates truth tables compare logical functions


of the 2-input logic gates detailed above.
Inputs Truth Table Outputs for each Gate
A B AND NAN OR NOR EX- EX-
D OR NOR

0 0 0 1 0 1 0 1

0 1 0 1 1 0 1 0

1 0 0 1 1 0 1 0

1 1 1 0 1 0 0 1

The following table gives a list of the common logic


function and their equivalent Boolean notation.
Logic Function Boolean Notation

AND A.B

OR A+B

NOT A

NAND A. B

NOR A+B

EX-OR (A.B) + (A.B) or A ⊕ B

EX-NOR (A.B) + (A.B) or A ⊕ B

Truth Table

A truth table lists all possible combinations of input binary


variables and the corresponding output of a logic system. The logic
system output can be found from the logic expression, often
referred to as Boolean expression, that relates the output with the
inputs of that very logic system.

Module II
7

When the number of input binary variables is only one, then


there are only two possible inputs, i.e. ‘0’ and ‘1’. If the number of
inputs is two (2), there can be four (4) possible input combinations,
i.e. 00, 01, 10, and 11. Figure 1.1 (B) shows the truth table of the
two-input logic system represented in Figure 1.1 (A). The logical
system of Figure 1.1 (A) is such that Q = 0 only when both A=0 and
B=0. For all other possible input combinations, output Q=1.
Similarly, for three (3) input binary variables, the number of possible
input combinations becomes eight (8), i.e. 000, 001, 010, 011, 100,
101, 110, and 111. This statement can be generalized to say that, if
a logic circuit has n binary inputs, its truth table will have 2 n possible
input combinations, or in other words 2 n. Figure 1.3 shows the truth
table of a three-input logic circuit, and it has eight (8) (= 2 3) rows.

Figure 1.1 Two-input logic system

(A) (B)

A B Y

0 0 0

0 1 1

1 0 1

1 1 1
Figure 1.2 Truth table of a three-input logic system
A B C Q

0 0 0 0

0 0 1 0

0 1 0 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

Module II
8

THINK!
A. Using the space below, explain in your own words the
difference between the XOR gate and the NOR gate.

B. Which pairs of input values will yield an output value of 1 for the
NAND gate?

C. Which pairs of input values will yield an output value of 0 for the AND
gate?

D. Compare the output of the OR gate to the AND gate. What is the
difference between the way the two gates work? What is the logical
expression for a OR gate? ________________________

E. Label these basic logic gates and fill in their truth tables.
Module II
9

Lesson 3

🕮
Boolean Algebra

Boolean Algebra

Digital signals are processed according to the rules of Boolean


Algebra, which is the algebra of two-valued logic. This type of logic
deals exclusively with statements that are unambiguously either
true or false. Variable, complement, and literal are terms used in
Boolean Algebra. A variable is a symbol used to represent a logical
quantity. Any single variable can have a 1 or 0 value. The
complement is the inverse of a variable and is indicated by a bar
over variable (overbar). For example, the complement of the variable
A is A. If A = 1, then A = 0. If A = 0, then A = 1.

Boolean addition

In Boolean algebra, a sum term is a sum of literals. In logic


circuits, a sum term is produced by an OR operation with no AND
operations involved. Some examples of sum terms are A + B, A + B
+ C, and A + B + C + D. A sum term is equal to 1 when one or more
of the literals in the term is 1. A sum term is equal to 0 only if each
of the literals is 0.

Boolean Multiplication

Boolean multiplication is equivalent to the AND operation. In


Boolean algebra, a product term is the product of literals. In logic
circuits, a product term is produced by an AND operation with no OR
operations involved. Some examples of product terms are AB, ABC,
and ABCD.

A product term is equal to 1 only if each of the literals in the


term is 1. A product term is equal to 0 when one or more of the
literals are 0.

Laws of Boolean Algebra

1. Commutative Law
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. Figure 2.1 illustrates the
commutative law as applied to the OR gate and shows
that it doesn’t matter which input each variable is
applied. (The symbol ≡ means “equivalent to.”).

Module II
10

Figure 2.1 Application of commutative law of

addition.

The commutative law of multiplication for two


variables is A.B = B.A. This law states that the order in
which the variables are ANDed makes no difference.
Figure 2.2, illustrates this law as applied to the AND
gate.

Figure 2.2 Application of commutative law of


multiplication.

2.
Associative Law
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. Figure 2.2, illustrates this law as applied
to 2-input OR gates.

Figure 2.2 Application of associative law of


addition.
The associative law of multiplication is written as follows for
three variables :

A(BC) = (AB)C

Module II
11

This law states that it makes no difference in what order


the variables are grouped when ANDing more than two
variables. Figure 2.3 illustrates this law applied to 2-input
AND gates.

Figure 2.3 Application of associative law of


multiplication.

3.
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 each of the two or more
variables and then ORing the products. The distributive law
also expresses the process of factoring in which the
common variable A is factored out of the product terms,
for example,

AB+AC = A(B+C).

Figure 2.4 illustrates the distributive law in terms of


gate implementation.
Rules of Boolean Algebra

Table 3.1 lists the 12 basic rules that are useful in


manipulating and simplifying Boolean Expressions. Rules 1 to 9 will
be viewed in terms of their application to logic gates. Rules 10 to 12
will be derived in terms of the simpler rules and the laws previously
discussed.

Module II
12

Table 3.1 Basic rules of Boolean algebra.


1. A + 0 = A 7. A . A = A

2. A + 1 = 1 8. A . A = 0

3. A . 0 = 0 9. A = A

4. A . 1 = A 10. A + AB = A

5. A + A = A 11. A + AB = A + B

6. A + A = 1 12. (A + B)(A + C) = A + BC

A,B, or C can represent a single variable or a combination of variables.

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 Figure 4.1
where the lower input is fixed at 0.

Figure 4.1

Rule

2. A + 1 = 1
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 Figure 4.2, where the lower
input is fixed at 1.

Figure 4.2

Modul
e II
13

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 Figure 4.3
where the lower input is fixed at 0.

Figure 4.3

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
Figure 4.4, where the lower input is fixed at 1.

Figure 4.4

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
Figure 4.5, where both inputs are the same variable.

Module II
14

Figure 4.5

Rule

6. A + A = 1
A variable ORed with its complement is equal to 1. If A is 0, then 0 + 0 =
0 + 1 = 1. If A is 1, then 1 + 1 = 1+ 0 = 1. See Figure 4.6, where one
input is the complement of the other.

Figure 4.6

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. Figure 4.7 illustrates this
rule.

Figure 4.7
Modul

e II

15

Rule 8. A . A = 0

A variable ANDed with its complement is always equal to 0.


Either A orA will always be 0 and when a 0 is applied to the input of
an AND gate the output will be also 0. Figure 4.8 illustrates this
rule.

Figure 4.8

Rule 9. 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 take A and complement (invert) it, you get A,
which is the original variable. This rule is shown in Figure 4.9 using
inverters.

Rule 10. A + AB = A

This rule can be proved by applying the distributive law, rule 2,


and rule 4 as follows :

A + AB = A(1 + B) Factoring (distributive law) = A . 1


Rule 2 : (1 + B) = 1
= A Rule 4 : A . 1 = A
The proof is shown in Table 3.2, which shows the truth table
and the resulting logic circuit simplification.

Module II
16

Table 3.2. Truth table for the expression A + AB = A


A B AB A + AB

0 0 0 0

0 1 0 0

1 0 0 1

1 1 1 1

Equal

Rule 11. A + AB = A + B

The rule can be proved as follows :

A + AB = (A + AB) + AB Rule 10: A = A + AB


= A(1 + B) + AB Factor (A +AB)
= A + AB + AB Factor (AB + AB)
= A + B(A + A) Rule 6: A + A = 1
= A + B(1) Rule 4: A . 1 = A
=A+B

The proof is shown in Table 4.9A, which shows the truth table
and the resulting logic circuit simplification.
A B AB A + AB A+B

0 0 0 0 0

0 1 1 1 1

1 0 0 1 1

1 1 0 1 1
equal
Rule 12. (A + B)(A + C) = A + BC

This rule can be proved as follows :


(A+B)(A+C) = AA + AC + AB + BC Distributive Law
= A + AC + AB + BC Rule 7: AA = A
= A(1 + C) + AB + BC Rule 2: 1 + C = 1
= A.1 + AB + BC Factoring (distributive law) = A(1 + B)
+ BC Rule 2: 1 + B = 1
= A.1 + B Rule 4: A.1 = A
= A + BC

Module II
17

The proof is shown in Table 4.9B, which shows the truth table
of the given expression and the resulting logic circuit simplification.
A B C A+B A+C (A+B) BC A+B
(A+C) C

0 0 0 0 0 0 0 0

0 0 1 0 1 0 0 0

0 1 0 1 0 0 0 0

0 1 1 1 1 1 1 1

1 0 0 1 1 1 0 1

1 0 1 1 1 1 0 1

1 1 0 1 1 1 0 1

1 1 1 1 1 1 1 1

equal
Module II
18

Lesson 4

🕮
Demorgan’s Theorem

Demorgan’s Theorem

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 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 individual
variables.

The formula for expressing this theorem is stated as

follows: XY = X + Y

Demorgan’s second theorem is stated as follows :

The complement of a sum of variables is equal to the product


of the complements of the variables.

Stated another way,


The complement of two or more ORed variables is equivalent
to the AND of the complements of the individual variables.

The formula for expressing this theorem for two

variables is : X + Y = X Y

Figure 5.1 shows the gate equivalencies and truth tables for
the two equation above
Figure 5.1. Gate equivalencies and the corresponding
truth tables thatillustrates Demorgan’s theorems.

Module II

19
Inputs Output

X Y XY X+Y

0 0 1 1

0 1 1 1

1 0 1 1

1 1 0 0

Inputs Output

X Y X+Y XY

0 0 1 1

0 1 0 0

1 0 0 0

1 1 0 0
As stated, DeMorgan’s theorem also apply to expressions in
which there are more than two variables. The following examples
illustrate the application of DeMorgan’s theorem to 3-variable and 4
variable expressions.

Example :

1. Apply DeMorgan’s theorem to expressions XYZ and X + Y + Z

XYZ = X + Y + Z
X+Y+Z= ���

4. Apply DeMorgan’s theorem to the expression WXYZ and W +


X+Y+Z

WXYZ = W + X + Y + Z
W+X+Y+Z= WXYZ

Applying Demorgan’s Theorems


To illustrate, let’s take the expression A + BC
1. A + BC
2. A + (B + C) Applying associative property to remove
parenthesis.
3. A + B + C Split the bar in two places
between the 1st and 2nd terms;
between 2nd and 3rd terms.
4. A B C Apply Rule 9: A = A to B and C. 5. ABC

Gate Circuit:

Module II
20

Boolean Analysis of Logic Circuit

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 toward the final input, writing
the expression for each gate. For the example circuit in Figure 6.1,
the Boolean expression is determined as follows :

1. The expression for the left-most AND gate with inputs C and
D is CD.

2. The output of the left-most AND gate is one of the inputs to


the OR gate and B is the other input. Therefore, the
expression for the OR gate is B + CD.

3. The output of the OR gate is one of the inputs to the right-


most AND gate and A is the other input. Therefore, the
expression for this AND gate is A (B + CD), which is the
final output expression for the entire circuit.

Figure 6.1 A Logic Circuit showing the development of


the Boolean expression for the output.

Constructing a Truth Table for a Logic Circuit

Module II
21

Once the Boolean expression for a given logic circuit has been
determined, a truth table that shows the output for all possible
values of input variables can be developed. The procedure requires
that you evaluate the Boolean expression for all possible
combinations of values for the input variables. In the case of the
circuit in Figure 6.1, there are four input variables (A, B, C, D) and
therefore sixteen (24 = 16) combinations of values
are possible.

The first step is to list the sixteen input variable combinations


of 1s and 0s in a binary sequence as shown in Table 6.3. Next,
place the corresponding values to the column for each combination
of input variables that were determined in the evaluation. These
results are shown in the truth table in Table 6.3.
Table 6.3. The truth table of the expression A(B+CD)
Inputs Output

A B C D CD B + CD A(B+CD)

0 0 0 0 0 0 0

0 0 0 1 0 0 0

0 0 1 0 0 0 0

0 0 1 1 1 1 0

0 1 0 0 0 1 0

0 1 0 1 0 1 0

0 1 1 0 0 1 0

0 1 1 1 1 1 0

1 0 0 0 0 0 0

1 0 0 1 0 0 0

1 0 1 0 0 0 0

1 0 1 1 1 1 1

1 1 0 0 0 1 1

1 1 0 1 1 1 1

1 1 1 0 1 1 1

1 1 1 1 1 1 1

Simplification using Boolean Algebra

A simplified Boolean expression uses the fewest gates possible


to implement a given expression.

For example :

Using Boolean algebra techniques, simplify this

expression: AB + A(B+C) + B(B+C)

Solution:
1. Apply the distributive law to the second and third terms in
the expression, as follows:
AB + AB + AC + BB + BC

Module II
22
2. Apply rule 7 (BB = B) to the fourth term.

AB + AB + AC + B + BC

3. Apply rule 5 (AB + AB = AB) to the first two terms.

AB + AC + B + BC

4. Apply rule 10 (B + BC = B) to the last two terms.

AB + AC + B

5. Apply rule 10 (AB + B = B) to the first and third terms.

B + AC

Truth Table :
Inputs Output

A B C AC B + AC

0 0 0 0 0

0 0 1 0 0

0 1 0 0 1

0 1 1 0 1

1 0 0 0 0

1 0 1 1 1

1 1 0 0 1

1 1 1 1 1

Gate Circuit :

Module II
23

THINK!

Simply the Boolean Algebra below and draw its


equivalent logic circuit.

A. Simplify the Expressions


̅
1. x = (�+B)(A+B+D)�$

& ̅ ̅
2. x = A� C + �BD + ��$

B. The minimum number of NAND gates required to


> >
implement the Boolean function � + ��̅ + ��̅ � is
equal to
(a) Zero
(b) 1
(c) 4
(d) 7

C. The Boolean function = Y = AB + CD is to be realized


using only 2 input NAND gates. The minimum number of
gates required is
(a) 2
(b) 3
(c) 4
(d) 5

Module II
24

D. For the output F to be 1 is the logic circuit shown, the


input combination should be
(a) � = 1, � = 1, � = 1
(b) � = 1, � = 0, � = 0
(c) � = 0, � = 1, � = 0
(d) � = 0, � = 0, � = 1

Module II

You might also like