0% found this document useful (0 votes)
52 views40 pages

Chapter 2 - P1 - Logic Gates-Boolean Algebra

This document is a lecture on Digital Systems focusing on Logic Gates and Boolean Algebra, covering topics such as Boolean constants, truth tables, operations with gates, and Boolean theorems. It includes examples and diagrams to illustrate the implementation of circuits from Boolean expressions and the use of NOR and NAND gates. The document serves as a comprehensive guide for understanding the fundamentals of digital logic design.
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)
52 views40 pages

Chapter 2 - P1 - Logic Gates-Boolean Algebra

This document is a lecture on Digital Systems focusing on Logic Gates and Boolean Algebra, covering topics such as Boolean constants, truth tables, operations with gates, and Boolean theorems. It includes examples and diagrams to illustrate the implementation of circuits from Boolean expressions and the use of NOR and NAND gates. The document serves as a comprehensive guide for understanding the fundamentals of digital logic design.
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/ 40

University of Technology and Education

Faculty of Electrical & Electronic Engineering

Lecture:
DIGITAL SYSTEMS
Chapter 2:
Logic Gates and Boolean Algebra

Nguyen Thanh Hai, PhD

1
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

1 Boolean Constants and Variables


2 Truth Tables
3 Operations with Gates
4 Describing Logic Circuits Algebraically
5 Implementing Circuits from Boolean Expressions
6 NOR Gates and NAND Gates
7 Boolean Theorems
8 DeMorgan’s Theorems
9 IEEE/ANSI Standard Logic Symbols

2
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


1. Boolean Constants and Variables

Logic 0 Logic 1
False True
Off On
Low High
No Yes
Open switch Closed switch

3
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


2. Truth Tables
A B C Y
Input Output 0 0 0 0
0 0 1 1
A B Y
0 1 0 1
0 0 1
0 1 1 0
0 1 0 1 0 0 0
1 0 1 1 0 1 0
1 1 0 1 1 0 0
A 1 1 1 1
?
Y
B
4
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


3. Operations with Gates
OR Operations with OR Gates Y=A+B
Input Output
A B Y A
Y=A+B
0 0 0 B
0 1 1
1 0 1 OR gate with two
1 1 1 logic inputs

Truth Table
5
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


OR Operations with OR Gates
Input Output
A B C Y Y=A+B+C
0 0 0 0
0 0 1 1 A
0 1 0 1 Y=A+B+C
B
0 1 1 1 C
1 0 0 1
1 0 1 1 OR gate with
1 1 0 1 three logic inputs
1 1 1 1
Truth Table 6
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Example 1:
Determine the OR gate output in Figure. The OR gate inputs A
and B are varying according to the timing diagrams shown. A
starts out LOW at time t0, goes HIGH at t1, back LOW at t3, and
so on. A 1
0
A
B
1 Y=A+B
0 B
1
Output
0
Output

t0 t1 t 2 t 3 t 4 t 5 t 6 t 7

7
Nguyen Thanh Hai, PhD Time
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

AND Operations with AND Gates

Input Output Y=A  B


A B Y
A
0 0 0 Y=A.B
0 1 0
B
1 0 0
AND gate with
1 1 1
two logic inputs

Truth Table

8
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

Example 2:
Determine the output Y from the AND gate in Figure for the given
output waveforms.
A 1
0
Solution:
1 A
B Y=A.B
0 B
1
Output
0
Output

t0 t1 t 2 t 3 t 4 t 5 t 6 t 7

9
Nguyen Thanh Hai, PhD
Time
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

NOT Operation

Input Output Y=A A Y=A


A Y
0 1
NOT gate
1 0

Truth Table
10

0 1

10
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

Summary of Boolean Operations

OR AND NOT
0 1
0+0=0 0.0=0 10

0+1=1 0.1=0

1+0=1 1.0=0

1+1=1 1.1=1

11
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Describing Logic Circuits Algebraically
A
A.B
B Y=A  B+C

A
A+B
B Y=(A+B)  C

12
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Describing Logic Circuits Algebraically

A A
Y=A+B
B

A
A+B Y=A+B
B

13
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


A A
B ABC
C
Y=ABC(A+D)
(A+D)
A
D
(A+D)
A
A+B (A+B)C
B
C (A+B)C

D D  (A+B)C

E
Y=[D  (A+B)C]E
14
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Implementing Circuits From Boolean Expressions
Example 3:
Draw the circuit diagram to implement the expression
Y=(A+B)(B  C)
Solution:
A
(A+B)
B
Y=(A+B)(B+C)

B
C
(B  C) 15
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Implementing Circuits From Boolean Expressions

Review Questions

1. Draw the circuit diagram that implements the following


expression using gates with no more three inputs
Y=ABC( A  D)
2. Draw the circuit diagram for the expression
Y=AC+BC +ABC
3. Draw the circuit diagram for

Y=[D+(A+B)C.E
16
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


NOR Gates and NAND Gates

OR NOR
A Y=(A+B)
B A B A+B AB
Denotes
(a)
inversion 0 0 0 1

0 1 1 0
A
B 1 0 1 0
(b) 1 1 1 0

17
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


NOR Gates and NAND Gates
Example 4:
Determine the Boolean of the expression for a three-input
NOR gate followed by an INVERTER
Solution:
As shown in the following figure. The expression at the NOR
output is (A  B+C) , which is then fed through an INVERTER
to produce Y=A  B+C

(A  B+C)
A Y=A  B+C  A  B+C
B
C 18
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Example 5: NOR Gates and NAND Gates

Determine the waveform at output of a NOR gate, in which


the input waveform is shown in the below figure.
Solution:
-Way-1: to find the OR output waveform and then invert it
-Way-2: the output of a NOR gate will be the inversion of the input
waveform. A 1
A Y=(A+B)
0
B
1
B
0

1
Output 19
Nguyen Thanh Hai, PhD 0
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


NOR Gates and NAND Gates

A AND NAND
Y=AB
B A B AB AB
Denotes 0 0 0 1
(a)
inversion
0 1 0 1

1 0 0 1
A AB
AB
B 1 1 1 0

(b)
20
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Example 6: NOR Gates and NAND Gates

Determine the waveform at output of a NAND gate having the


inputs as shown in the below figure.
Solution:
-Way-1: to find the AND output waveform and then invert it
-Way-2: the output of a NAND gate will be the inversion of the
input waveform. 1
A A Y=AB
0
B
1
B
0

1
Output 21
Nguyen Thanh Hai, PhD
0
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Example 7: NOR Gates and NAND Gates
Determine the output level in the below figure for A=B=C=1
and D=0.
Solution: Y= AB(C  D)
-Way-1: to use the expression for Y
 11 (1  0)
-Way-2: to write down the input logic
levels on the circuit diagram in  11 (1)
Figure.
 1 1  0
1
C CD 0  0 1
0 1
D 1 Y= AB(C  D)
B 1
22
Nguyen Thanh Hai, PhD A
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Exclusive-OR and Exclusive-NOR Circuits
A
XOR gate symbols
B Input Output
A B Y
A 0 0 0
Y  AB  AB
B 0 1 1
1 0 1
Y=A  B 1 1 0
A
=AB+AB
B
23
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Exclusive-OR and Exclusive-NOR Circuits
A
XNOR gate symbols
B
Input Output
A B Y
Y  AB  AB
0 0 1
0 1 0
1 0 0
Y=A  B 1 1 1
A
=AB+AB
B
24
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Boolean Theorems
x
(1) x 0 = 0 0
0

x
x
(2) x 1 = x 1
x
(3) xx = x x

x
(4) xx = 0 0

25
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Boolean Theorems
x
(5) x+0=x x
0
x
(6) x+1=1 1
1
x
(7) x+x=x x

x
(8) x+x=1 1

26
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Multivariable Theorems
(9) x y  yx
Commutative laws
(10) x y  y x

(11) x  ( y  z)  ( x  y)  z  x  y  z
Associative laws
(12) x( yz )  ( xy ) z  xyz

(13a) x( y  z )  xy  xz Distributive laws


(13b) (w+x)( y  z )  wy  xy  wz  xz
27
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Multivariable Theorems

(14) x  xy  x *
* Using cases
(15a) x  xy  x  y *

x  x y  ( x  xy )  x  y  ( x  xy )
( x  y)  ( x  y)

(15b) x  xy  x  y
28
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

Example 8:
Simplify the expression y=ABD+ABD
Solution:
According to theorem (13) y=AB(D+D)

y=AB 1
Using theorem (8) and (2)
=AB
Review questions: Simplify the following expressions
1) y=AC+ABC
2) y=ABCD+ABCD
3) y=AD+ABD 29
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


DeMorgan’s Theorems

The OR sum of two variables is inverted

(16) ( x  y)  x  y

The AND product of two variables is inverted

(17) ( x  y)  x  y

30
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


DeMorgan’s Theorems

Example 9:
Simplify the expression
z=(A+C)  (B+D)

Solution:
According to theorem (17) z=(A+C)  (B+D)

Using theorem (16) z=(A  C)  (B  D)

31
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Implications of DeMorgan’s Theorems

Review questions:
1. Use DeMorgan’s theorems to convert the expression z=(A+B)  C
to one that has only single-variable inversions.

z=(A+B)  C  A+B+C=A  B+C=A  B+C


2. Repeat question 1 for the expression y=RST+Q

y=RST+Q  RST  Q=(R+S+T)  Q  (R+S+T)  Q

32
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Implications of DeMorgan’s Theorems
Review questions:

3. Implement a circuit having the output expression z=ABC


using only a NOR gate and an INVERTER.
z=ABC=(A+B)  C=(A+B)+C  (A+B)+C

4. Use DeMorgan’s theorems to convert y=A+B+CD to an


expression containing only single-variable inversions.

y=A+B+CD  A  B  CD  A  B  (C+D)=A  B  (C+D)

33
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Universality of NAND gates and NOR Gates
Inverter
A Y=A  A  A Y=A
A

A
A
y=AB=A+B A
B
B
B
OR

34
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


Universality of NAND gates and NOR Gates

A (1) 74LS00
(3)
(2) 74LS00
(9) (8) A

B (4) B
(6) (10)
(5) OR
74LS00 35
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra


IEEE/ANSI Standard Logic Symbols
A NOT
x A x
1

A AND A
x x
B B &

A A
OR
x x
B B 1

A NAND A
x x
B B &

A A
x OR x
B B 1

(a) Traditional (b) IEEE/ANSI


36
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

Build a logic circuit using the following formula:

f (C , B, A)  CBA (0,1,3,4,6)

37
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

Các làm làm bài tập về nhà. Vào trang LMS download file Problem
4: Simplify Expression and Karnaugh Map , làm bài 4-8,
Figure 4-69 như sau:
1. Vẽ bảng trạng thái của mạch
2. 3 công tắt ngõ vào (door, ignition, lights), khi nào ngõ vào mức
1/0?
3. đèn alarm thì LED ON hay OFF
4. Viết biểu thức ngõ ra dùng SOP, dựa vào bảng trạng thái câu 1
5. Xác định các dòng, điện áp tại chân alarm (tra cứu datasheet), xác
định Rb tại chân B transistor, Điện trở hạn dòng RL cho LED (Điện áp
LED là 2,7V, dòng cực đại là 20mA),
6. Xác định dòng Ic của Transistor (tra cứu hệ số khuếch đại)
7. Giải thích toàn bộ nguyên lý hoạt động của mạch

38
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

1 Algebraic Simplification
2 Designing Combinational Logic Circuits
3 Karnaugh Map Method
4 Enable/Disable Circuits
5 Basic Characteristics of Digital ICs

39
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering

Logic Gates and Boolean Algebra

The End

40
Nguyen Thanh Hai, PhD

You might also like