You are on page 1of 16

TECHNOLOGICAL UNIVERSITY

(THANLYIN) DEPARTMENT OF
ELECTRONIC ENGINEERING

EcE-41021 DIGITAL DESING WITH HDL I


Lecturer (2)
CHAPTER 2
INTRODUCTION TO LOGIC CIRCUITS

Chapter Objectives

In this chapter you will be introduced to:


• Logic functions and circuits

• Boolean algebra for dealing with logic functions

• Logic gates and synthesis of simple circuits

• CAD tools and the VHDL hardware description


language

Basic Concepts of Logic Circuits

• Variable and function

• Truth table
Boolean Algebra 1b. 1+ 1 = 1
6a. x · 1 = x
Axioms of Boolean 2a. 1· 1 = 1
Algebra Single-Variable
6b. x + 0 = x
Theorems

1a. 0· 0 = 0 2b. 0+ 0 = 0
7a. x · x = x
5a. x · 0 = 0
5b. x + 1 = 1 3a. 0· 1 = 1 · 0 = 0
7b. x + x = x
3b. 1+ 0 = 0 + 1 = 1 6a. x · 1 = x
8a. x · x = 0
6b. x + 0 = x
4a. If x = 0, then �� = 1
8b. x + x = 1 7a. x · x = x
9. x = x 7b. x + x = x
4b. If x = 1, then �� = 0
8a. x · �� = 0
8b. x + �� = 1
Single-Variable Theorems
9. �� = x

5a. x · 0 = 0
5b. x + 1 = 1

Boolean Algebra
Two- and Three-Variable Properties

10a. x · y = y · x Commutative 14a. x · y + x · �� = x Combining

10b. x + y = y + x 14b. (x + y) · (x + �� ) = x

11a. x · ( y · z) = (x · y) · z Associative 15a. ��. �� = �� + �� DeMorgan’s theorem


11b. x + ( y + z) = (x + y) + z 15b. �� + ��= �� · ��

12a. x · ( y + z) = x · y + x · z Distributive 16a. x + �� · y = x + y

12b. x + y · z = (x + y) · (x + z) 16b. x · (�� + y) = x · y

13a. x + x · y = x Absorption 17a. x · y + y · z +�� · z = x · y + �� ·z


Consensus
13b. x · (x + y) = x 17b. (x + y) · (y + z) · (�� + z) = (x + y) · (�� +
z)

Synthesis Using AND , OR and Not


Gates Truth table of a function to be synthesized

x1 x2 f(x1,x2) 0 0 1 Synthesis Process


011

100

111

Thus f may be realized as

Minimal cost realization

Logic circuit
Three Variables Minterms and

Maxterms
Sum Of Product and Product of Sum Form

Sum

Of Product Product Of Sum


x1 x2 x3

000

001

010

011

100

101

110

111

Row

No. f
00

11

20

30

41

51

61

70
NAND and NOR Logic Networks
Using NOR Gates to Implement a Product-of-Sums

Using NAND Gates to Implement a Sum-of-Products

The Ven Diagram


• perfect induction to verify
the theorems and properties
• A simple visual aid

Verification of the distributive property


x · ( y + z) = x · y + x · z

The Venn diaram reresentation.

Example
2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2
.9,2.1 0,2.11,2.12,2.13

Design Example 1
Three-Way Light Control

Q: Assume that a large room has three doors and that a switch near each door controls a light in the
room. It has to be possible to turn the light on or off by changing the state of any one of the switches.

Plan=> Assign Variables


Draw Truth Table
Write down the equation
Simplify the equation
Draw the logic circuit diagram
The switch on each door= x1 ,x2, x3 Light bub = f
Truth Table
x1 x2 x3 f
0000
0011
0101
0110
1001
1010
1100
1111

Three-Way Light Control


input signals x1 and x2. The values of these signals
Design Example 2 change in time, perhaps at regular intervals. Thus

Multiplexer Circuit sequences of 0s and 1s are applied on each of the


inputs x1 and x2. We want to design a circuit that
produces an output that has the same value as either x1
or x2, dependent on the value of a selection control
In computer systems it is often necessary to choose signal s.
data from exactly one of a number of possible sources. Assume that the output of the circuit will be the same as
Suppose that there are two sources of data, provided as the value of input x1 if s = 0, and it will be the same as
x2 if s = 1.
s x1 x2 f 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1
11001111

Inputs =s , x1, x2 Output = f


Truth Table

Multiplexer Circuit
Next Lecture • Introduction to CAD Tools

You might also like