0% found this document useful (0 votes)
8 views8 pages

Chapter 2

Uploaded by

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

Chapter 2

Uploaded by

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

CHAPTER 2

LOGIC GATES

Objectives

 OR, AND, NOT, NAND, NOR, XOR and XNOR logic gates.

 Logic expression.

 Logic Circuits.

 Truth Table.
9 Logic Gates

2.1 Logic Gates

The basic building block of any digital circuit is a logic gate. OR, AND and NOT
gates are the most basic gates. All other gates can be constructed using these
three gates. Four other gates are NOR, NAND, XOR and XNOR gates.

A logic gate has at least one and only one output. Let A and B represent two
input variables listed on the left, and the output Y on the right. Logic gates
operate with binary numbers. A binary 0 will mean a Low voltage (+0 volt) and a
binary 1 will mean a High voltage (+5 volt). All possible input combinations for A
and B and the output Y are shown using a truth table.

Truth table Logic Gate

2.2 OR Gate

The output of an OR gate is 1 if any of the inputs are 1. The parallel circuit
shows the idea of an OR gate. The output lamp Y will light when either or both of
the input switches are closed.

A
Y
B

Parallel circuit Truth Table OR gate symbol

The Boolean expression for an OR gate is 𝑌 = 𝐴 + 𝐵. Note that the plus (+) sign
means OR in Boolean algebra. It is read as A OR B equals Y. The OR truth table
can be expressed as follows:

0+0 = 0
0+1 = 1
1+0 = 1
1+1 = 1
3
A 3 input OR logic gate will have 2 = 8 input combinations. The input variables
are A, B and C. Note that if any of the inputs are 1, the output will be 1.
10 Logic Gates

Y=A+B+C Y=A+B+C+D

3 input OR gate Truth Table 4 input OR gate Truth Table

2.3 AND Gate

The output of an AND gate is 1 if all of the inputs are 1. The serial circuit shows
the idea of an AND gate. The output lamp Y will light when both of the input
switches are closed.

Serial circuit Truth Table AND gate symbol

The Boolean expression for an AND gate is 𝑌 = 𝐴 ⋅ 𝐵. Note that the dot ( ) sign
means AND in Boolean algebra. It is read as A AND B equals Y. The dot sign is
generally omitted, so that the expression becomes 𝑌 = 𝐴𝐵. The AND truth table
can be expressed as follows:

0.0 = 0
0.1 = 0
1.0 = 0
1.1 = 1
11 Logic Gates

2.4 NOT Gate

The NOT gate has only 1 input. It is also called an inverter. The NOT gate
produces an output that is the opposite of the input. If the input is 0, the output
is 1. If the input is 1, the output is 0. Thus, the NOT gate inverts, or complement
the input. The Boolean expression is 𝑌 = 𝐴 , read as ‘A inverted’, ‘A bar’ or ‘A
NOT’.

Truth Table NOT gate symbol

2.5 NOR Gate

NOR gate means ‘NOT OR’. It is actually an OR gate followed by an inverter. In


other words, the output of an OR gate is inverted to form a NOR gate. The NOR
gate symbol is an OR gate with an invert bubble at the output. The Boolean
expression is 𝑌 = 𝐴 + 𝐵 .

Truth Table NOR gate symbol

2.6 NAND Gate

NAND gate means ‘NOT AND’. It is actually an AND gate followed by an inverter.
In other words, the output of an AND gate is inverted to form a NAND gate. The
NAND gate symbol is an AND gate with an invert bubble at the output. The
Boolean expression is 𝑌 = 𝐴𝐵 .

Truth Table NAND gate symbol


12 Logic Gates

2.7 XOR Gate

XOR gate is Exclusive-OR gate. The output is 1 if an odd number of 1s appear at


the inputs. The input 01 and 10 of the truth table have odd numbers of 1s, and
therefore the output is 1. The Boolean expression is 𝑌 = 𝐴 ⊕ 𝐵, that can also be
written as 𝑌 = 𝐴 ⋅ 𝐵 + 𝐴 ⋅ 𝐵 .

Truth Table XOR gate symbol

2.8 XNOR Gate

XNOR gate is exclusive-NOR gate. The output of an XNOR gate is the


complement of the XOR gate. The Boolean expression for XNOR gate is
𝑌 = 𝐴 ⊕ 𝐵, that can also be written as 𝑌 = 𝐴 ⋅ 𝐵 + 𝐴 ⋅ 𝐵 .

Truth Table XNOR gate symbol

2.9 Combining logic gates

Logic gates are combined to form a new logic function. This logic circuit is also
known as combinational logic circuit. The output of the circuit is determined by
the Boolean expression. Suppose you are given a Boolean expression 𝑌 = 𝐴 + 𝐵𝐶
The output of 𝐵 is connected as an input to AND gate with C and produce the
output 𝐵𝐶 that become the input to OR gate along with A to produce the output
Y. The truth table is shown below.
13 Logic Gates

2.10 Exercises

1. Derive the truth tables for the following logic gates:

a. 3 input AND gate


b. 3 input NAND gate
c. 3 input NOR gate
d. 3 input XOR gate
e. 3 input XNOR gate

2. Write the Boolean expressions for the following logic circuits:

a. b.

c. d.

e. f.

g. h.

i. j.
14 Logic Gates

3. Write the Boolean expressions and derive the truth tables for the following
logic circuits:
A
a. 0V

B
0V

C Y
0V

b. A
0V

B
0V Y

C
0V

D
0V

c. A
0V

B
0V
Y

C
0V
15 Logic Gates

4. Draw the logic circuits for the following Boolean expressions:

a.
b.
c.
d.
e.
f.
g.

h.

5. Draw the logic circuits and derive the truth tables for the following Boolean
expressions:

a. Y  A.B(C  D)

b. Y  ( A  B)(C  D).C

c. Y  A.C  B.C  A.B.C

d. 𝑌 = (𝐴 + 𝐵) 𝐵. 𝐶

e. 𝑌 = (𝐴 + 𝐵)(𝐵 + 𝐶)

f. Y  AB  ( A  C )

g. 𝑌 = 𝐴𝐵⨁𝐶

h. 𝑌 = 𝐴⨁𝐵⨁𝐶

You might also like