Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Chapter-2

DIGITAL FUNDAMENTALS

TECHNICAL AND VOCATIONAL TRAINING INSTITUTE


Department of Electrical electronics technology

Digital Logic Design


EETe 3032

By Zemenu T. /2023
1
Outlines

1. Logic Gates
2. Boolean operation and expression
3. Laws and rules of Boolean algebra
4. De-morgan Theorems
5. Boolean analysis of logic circuit

2
Logic Gates
Logic gates are digital circuits. Digital circuits operate in binary modes, each input and
output signal is either ‘1’ or ‘0’. The ‘1’ and ‘0’ designation represents predefined voltage
ranges. These electronic switching circuits are called as logic gates. Each logic gate can
have one or more inputs and only one output.
The term “logic” is usually used to refer to a decision-making process. A logic gate
makes logical decisions regarding the existence of output depending upon the nature of
the input. Hence, such circuits are called logic circuits.
Logic gates are electronic circuits that can be used to implement the most elementary
logic expressions, also known as Boolean expressions. The logic gate is the most basic
building block of combinational logic.

3
Basic Logic Gates and their operation
NOT operation

The NOT operation is performed on a single input variable.


If the variable A is subjected to the NOT operation, the result Y can be expressed as
Y= Ā, where the over bar represents the NOT operation.
The expression Y= Ā is read as
‘’Y equals NOT A’’ or
‘’Y equals the inverse of A ‘’ or
‘’Y equals the complement of A’’.
All the above indicate that the logic value of Y= Ā is opposite to the logic value of A.
Alternative expressions for NOT operation are
4
Logic Gates

The truth table below clarifies this for the two cases:

Figure 2.3 below shows the symbol for a NOT circuit, which is more commonly called an
INVERTER.
A Y=A
Presence of small circle
always denotes inversion

Figure 2.1. NOT gate symbol.

This circuit always has only a single input, and its output logic level is always opposite to
5
the logic level of the input.
AND operation
If two logic variables A and B are combined using the AND operation, the result, Y, can be expressed as
Y= A·B
In the above expression the ∙ sign stands for the Boolean AND operation whose rules are given in the next
truth table shown.
A B Y = A.B
0 0 0
0 1 0
1 0 0
1 1 1

As it can be easily realized from the above truth table that the AND operation is exactly the same as
ordinary multiplication. Whenever A or B is 0, their product is zero, when both A and B are 1, their product
is 1. We can therefore say that in the AND operation, the result will be 1 only if all the inputs are 1: for all
other cases the result is 0.
The expression Y= A.B is read ‘’Y equals A AND B’’
The multiplication sign is generally omitted as in ordinary algebra, so that the expression is written most
6
often like: Y=AB
AND Gate
The AND gate is a gate which does the exact operations of AND operation discussed above. AND gate is
a circuit that operates in such a way that its output is HIGH only when all its inputs are HIGH. For all other
cases the AND gate output is LOW. This same operation is Characteristic of AND gates with more than two
inputs. A two – input and three-input AND gate with their accompanying logic symbols and truth tables are
shown in figure 2.2.

7
Figure 2.2 logic symbols and respective truth tables of two and three – inputs of AND gate.
Example
Determine the output from the AND gate in figure below for the given input waveforms.

Solution:

8
OR operation
Letting A and B represent the two independent logic variables and combined using the OR operation, the
result, Y, can be expressed asY= A+B
In the above expression the + sign stands for the Boolean OR operation (not same with ordinary addition)
whose rules are given in the truth table shown in figure below.
A B Y = A.B
0 0 0
0 1 1
1 0 1
1 1 1

It should be apparent from the truth table that except for the case where A=B=1, the OR operation is the
same as ordinary operation. The result is the same if we have Y= A+B+C, for the case where A=B=C=1
that is Y= 1+1+1 = 1
It can be concluded that the OR operation result will be 1 if any one or more variables among the inputs is
a 1. The expression Y= A+B is read “Y equals A OR B’’ not “A plus B”. 9
OR Gate
In digital circuitry an OR gate is a circuit that has two or more inputs and whose output is equal to the OR
sum of the inputs. The OR gate operates in such way that its output is HIGH (Logic 1) if either input A or B
or both are at a logic 1 level. The OR gate output will be Low (Logic 0) only if all its inputs are at logic 0.
This same idea can be extended to more than two inputs.
Figure below shows two and three inputs OR gate symbols along with their truth table.

10
Figure 2.3. logic symbols and respective truth tables of two and three – inputs of OR gate.
Example
Determine the output from the OR gate the problem given in Example.

Solution:

11
Derived Logic Gates
The two other types of logic gates, NOR gates and NAND gates, are used extensively in digital circuitry. As
the name implies, these gates are derived from combination of the basic AND, OR and NOT gates, which
make it relatively easy to describe them using the Boolean algebra operations learned previously.

NOR Gate

The NOR gate is actually a NOT-OR gate. In other words, the output of an OR gate is inverted to form a
NOR gate.
The logic symbol for the NOR gate is diagramed in figure 2.5-a. Note that the NOR symbol is an OR
symbol with a small invert bubble (small circle) on its output edge. Figure 2.5-b illustrates the NOR function
by an OR gate and an INVERTER.
Taking A & B as an input variables and Y as output for the two input NOR gate, the Boolean expression for
the final NOR function is

12
NOR Gate (Contd.)
The truth table in figure 2.4-c below shows that the NOR gate output is the exact inverse of the OR gate
output for all possible input conditions. The OR gate output goes HIGH when any input is HIGH, while the
NOR gate output goes LOW when any input is HIGH.

A
A
Y = A+B
B B
Denotes
Y = A+B
inversion

a) NOR logic symbol. b) NOR illustration by OR and NOT gates.

c) NOR truth table.


13
Figure 2.4. Symbol, illustration, and truth table of NOR logic gate.
NAND Gate

The NAND gate is an inverted AND function. The Standard logic symbol for the NAND gate is shown in
figure 2.5-a. The little invert bubble (small circle) on the right end of the symbol means to invert the AND.
Figure 2.6-b shows a separate AND gate and inverter being used to produce the NAND logic function.
The truth table in figure 2.5-c shows that the NAND gate output is the exact inverse of the AND gate for all
possible input conditions. The AND output goes HIGH only when all inputs are HIGH, while the NAND
output goes LOW only when all input are HIGH.

Figure 2.5. Symbol, illustration, and truth table of NAND logic gate.
14
Exclusive OR and Exclusive NOR gates
Two special logic circuits that occur quite often in digital systems are the exclusive-OR and exclusive NOR
circuits.
.
EXCLUSIVE OR

Consider the logic circuit of figure 2.6- a. The output expression of this circuit is
The corresponding truth table (figure 2.6-b) shows that, this circuit produces a HIGH output whenever the
two inputs are at opposite levels. This is the exclusive OR circuit, which will hereafter be abbreviated XOR.
This particular combination of logic gates occurs quite often and is very useful in certain applications. The
logic symbol of this gate is shown in figure 2.7. An XOR gate has no three-input or four- input XOR gates, it
only has two inputs. The XOR gate operation is represented by ⊕ and the output is expressed in short by
Y

Figure2.7 . schematic symbol of XOR


gate.
15
Figure 2.6. logic circuit and corresponding truth table of XOR gate.
. EXCLUSIVE NOR

The exclusive NOR logic circuit depicted in figure 2.8-a works the exact opposite of XOR gate. The output
of its logic circuit expression is and can be written or in short
The logic circuit produces a HIGH output whenever the two inputs are at the same level.
Exclusive NOR gate is also called in abbreviated way – XNOR. The logic symbol of this gate is shown in
figure 2.9. the same is true for XNOR for the number of its inputs like XOR gate

Figure 2.9 schematic symbol of


XNOR gate.

Figure 2.8. logic circuit and corresponding truth table of XNOR gate.
16
Summary of logic gates

17
Universality of NAND and NOR Gates
All Boolean expressions consist of various combinations of the basic operations of OR, ND, and
INVERTER. Therefore, any expression can be implemented using combinations of OR gates, AND gates
and INVERTERS. It is possible, however, to implement any logic expression using only NAND gates and
no other type of gate.
This is because NAND and NOR gates, in the proper combination, can be used to perform each of the
Boolean operations OR, AND, and INVERTER. This is illustrated in figure 2.10-a & 2.10-b for NAND and
NOR, respectively. Even though NOR gate is also a universal gate, NAND is a preferred universal gate
since it is easier and more economical to manufacture than other universal gates.

a) NAND gate b) NOR gate


18
Figure 2.10. Illustration of universality of NAND gates & NOR gates.
Laws and rules of Boolean algebra
This section discusses fundamental rules and laws of which Boolean algebra is governed by which used in
the design, analysis, and simplification of digital logic circuits.
Table . Boolean algebra rules and laws.

19
Proof of Boolean Algebra Rules

Every Boolean Algebra rule can be proved by the application of rules and by perfect Induction. Of course,
can also be realized by drawing the respective logic diagrams of the laws (both sides) and determine the
output levels by plugging 1 and 0 for the input variables existing in the expression. All the possibilities from
the combinations should be plugged. For instance, figure 2.11 the logic diagram for AND laws are shown.
The only thing we do is substituting 1 and 0 interchangeably in the place of input variable X and applying
the AND gate operation.

20
Figure 2.11. Illustration of logic diagrams of the AND laws.
Activity

Realize the OR laws using the same manner

21
Rule : Dual of Distributive Law:

Hence,

22
Figure 2.12. Illustration of logic diagram of the dual of distributive Law.
By perfect induction:
Truth table. Proof of Dual of Distributive Law using perfect induction.

As it can be observed from the above truth table results of the expression and
are the same
23
Rule : Identity theorems:

Hence,

II- By perfect induction:


Truth table 2.3. Proof of identity theorems
using perfect induction.

24
Proof of De Morgan’s Theorem:
Augustus De Morgan, a British 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.
Truth table . Proof of DeMorgan's theorem using perfect induction.

25
Proof of De Morgan’s Theorem (Contd)

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
Boolean analysis of logic circuit
Describing Logic Circuits algebraically
Any logic circuit, no matter how complex, can be described using the Boolean operations defined and
discussed in previously sessions. Because the OR gate, AND gate, and NOT circuit are the basic building
blocks of digital systems.
For example, consider the circuit in Figure 2.14. This circuit has three inputs, A, B, and C and a single
output, Y. Utilizing the Boolean expression for each gate, we can easily determine the expression for the
output. Occasionally, there may be confusion as which operation to be performed first. The expression
can be interpreted in two different ways:

To avoid this confusion, it will be understood that if an expression contains both AND and OR operations
the AND operations are performed first, unless there are parentheses in the expression, in which case the
operation inside the parentheses is to be performed first. 27
Figure 2.13. Illustration of logic diagram of the dual of distributive Law

We need to care when describing logic circuits using Boolean algebra, i.e. for example
the logic circuit shown in figure 2.15 does not require parenthesis

Figure 2.14. Logic circuit which does not require parenthesis


28
Evaluating Logic Circuits Outputs
Once the Boolean expression for a circuit output has been obtained, the output logic level can be
determined for any set of input levels. For example: suppose that we want to know the logic level of the
output Y for the circuit in Figure 2.16 for the case where A=0, B=1, C=1, and D=1.
As in ordinary algebra, the value of Y can be found by ‘plugging’ the values of the variables into the
expression. In general, the following rules must always be followed when evaluated a Boolean expression
First, perform all inversions of single terms; that is or
1.Then perform all operations within parentheses.
2.Perform an AND operation before an OR operation unless parentheses indicate otherwise
If an expression has a bar over it, perform the operations of the expression first and then invert the result.

29
Figure 2.15. Logic circuit used for logic circuit output evaluation illustration
Determining output level from logic diagram
The output logic level for given input levels can also be determined directly from the circuit diagram
without using the Boolean expression done above.
Technicians often use this technique during the troubleshooting or testing of logic system since it also
tells them what each gate output is supposed to be as well as the final output.

30
Figure 2.16. Logic circuit used for logic circuit output evaluation by directly plugging in input levels.
END!

31

You might also like