You are on page 1of 39

FAST- National University of Computer and

Emerging Sciences, CFD Campus

Computer Logic Design


Sara Saleem, School of Computing
Spring 2014
Lecture 1- Introduction

Slides Courtesy: Dr. Waseem Ikram, Dr. Viktor Gruev


Administrivia
• Instructor: Sara Saleem
• Office: Room 128, First Floor
• Email: TBA
• Office Hours: Monday/Wednesday 3:00-4:00PM and by appointment
• Books
• Digital Design by M. Morris Mano, Michael Cilleti; Prentice Hall, 5th Edition
• Logic and Computer Design Fundamentals by M. Morris Mano, Charles R
Kime; Pearson , 2nd Edition

2
Grading
• Class Participation: 5% of grade
• I expect everyone of you to take active part in class discussions and your class participation
grade will depend on that.
• Assignments (4): 5% of grade
• Assignments must be attempted independently. Late submissions will NOT be accepted.
Partial credit will be given to work that are incomplete but submitted on time.
• You may discuss assignments in groups but you have to submit individual responses.
Plagiarism or incorporating another student's ideas will result in a grade of 'zero' for that
assignment.
• Quizzes (5) : 10% of grade
• Popup Quizzes
• Mid-terms (2): 30% of grade
• Final Exam: 50% of grade
• If grading of assignments/quizzes/exams seems incorrect, you may appeal for a
re-grade. The request for re-grade must be made within 3 days from the return of
the assignments/quizzes/exams.
3
About Me

4
Class Policies
• Zero tolerance towards late arrival in class
• I am opting the idea of Rs.10 FINE.
• Zero tolerance towards ANY disturbance in class
• No use of cell phones
• No chitchat
• No discussion
• Raise your hand before asking any question and then WAIT for the
permission

5
Digital Systems are Everywhere
• Communications
• Multi-media
• Manufacturing
• Consumer electronics
• Health care
• Defense and security
• Software
• Automotive

(Source: R. Tummala, IEEE Spectrum, June 2006) 6


Life Changers

Of these 30 innovations , 10 are


directly related to advances in
Digital Logic and Solid State
Circuits;

Another 8 are the indirect


results of ICs.

7
See artilcel at: http://knowledge.wharton.upenn.edu/article.cfm?articleid=2163
Computer Logic Design
• A digital system is an interconnection
of digital modules.
?
• CLD Deals with building blocks of
digital systems
(Intel)

8
What this course is about?
This course provides an introduction to logic design and the basic
building blocks used in digital systems, in particular digital computers.

9
Why study computer logic design?
• Look “under the hood” of computers. Solid understanding , insight,
even better programmer when aware of hardware resource issues
• Computer architecture
• System software
• Computer networks

10
What you’ll learn?
• By the end of the this course
• You’ll have the understanding of the basics of Boolean algebra and
the operation of logic components, combinational, and sequential circuits
• You’ll be having preliminary knowledge of the design of digital systems.

11
Analogue vs Digital
Analogue
• Continuous Quantity
• Intensity of Light
• Temperature
• Velocity
• Can take infinite many values
Digital
• Discrete set of values
• Can take only finite values

12
Continuous Signal

45 45
42 41
40 40
37
35 35 34 35
temperature 0C

temperature 0C
30 30 29
25 25 25 25
23 22
20 20
18
15 15

10 10
7
5 5 4
1 2
0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
time time

13
Digital Representation

45 45
42 41
40 40
37
35 35 35
34

temperature 0C
temperature 0C

30 29 30

25 25 25 25
23 22
20 20
18
15 15

10 10
7
5 4 5
1 2
0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
samples time

14
Electronic Processing
• Analogue Systems
• Digital Systems
• Representing quantities in Digital Systems

15
Representing Digital Values
39 0C ? Digital 39mV
System

8
b1

b2

b3

b4
1mV = 1

0
Vcc1

GND
a1

a2

a3

a4
1

4
6.25 x 1015 V !!
6.25 x 1018 ?

16
Digital Systems
• Two Voltage Levels
• Two States
• On/Off
• Black/White
• Hot/Cold
• Stationary/Moving

17
Binary Number System
• Binary Numbers
• Representing Multiple Values
• Combination of 0v & 5v

18
Merits of Digital Systems
• Efficient Processing & Data Storage
• Efficient & Reliable Transmission
• Detection and Correction of Errors
• Precise & Accurate Reproduction
• Easy Design and Implementation
• Occupy minimum space

19
Information Processing
• Numbers
• Text
• Formula and Equations
• Drawings and Pictures
• Sound and Music

20
Logic Gates
• Building Blocks
• AND, OR and NOT Gates
• NAND, NOR, XOR and XNOR Gates
• Integrated Circuits (ICs)

21
Logic Gate Symbol and ICs

AND Gate OR Gate NOT Gate

NAND Gate NOR Gate XOR Gate XNOR Gate

Vcc

13

12

11

10

8
7400 NAND Gate IC

GND
4

6
1

3
Combinational Circuits
• Combination of Logic Gates
• Adder Combinational Sum
Circuit
• Functional Devices
• Adders
• Comparators
• Encoders/Decoders
• Multiplexers/Demultiplexers Carry

23
Sequential Circuits
• Memory Element Input 1
a1 b1
5

Output

• Current & Previous State Combinational


2 6
a2 b2

Logic Circuit
• Flip-Flops
• Counters & Registers
1 5
a1 b1

Memory Element

24
Programmable Logic Devices (PLDs)
• Configurable Hardware
• Combinational Circuits
• Sequential Circuits
• Low chip count
• Lower Cost
• Short development time

25
Memory
• Storage
• RAM (Random Access Memory)
• Read-Write
• Volatile
• ROM (Read-Only Memory)
• Read-Only
• Non-Volatile

26
Summary
• Continuous Signals
• Digital Representation in Binary
• Information Processing
• Logic Gates

29
Summary
• Combinational & Sequential Circuits
• Programmable Logic Devices (PLDs)
• Memory (RAM & ROM)

30
Number Systems and Codes
• Decimal Number System
• Caveman Number System
• Binary Number System
• Hexadecimal Number System
• Octal Number System

31
Decimal Number System
• Ten unique numbers 0,1..9
• Combination of digits
• Positional Number System
• 275 = 2 x 102 + 7 x 101 + 5 x 100
• Base or Radix 10
• Weight 1, 10, 100, 1000 ….

32
Representing Fractions
• Fractions can be represented in decimal number system in a manner
= 3 x 102 + 8 x 101 + 2 x 100 + 9 x 10-1 + 1 x 10-2
= 300 + 80 + 2 + 0.9 + 0.01
= 382.91
• Generic way:
a5a4a3a2a1a0. a-1a-2a-3 = 105a5 + 104a4 + 103a3 + 102a2 + 101a1 + 100a0 +
10-1a-1 + 10-2a-2 + 10-3a-3

33
Caveman Number System
• ∑, ∆, >, Ω and ↑
• Base – 5 Number System
• ∆Ω↑∑ = 220

34
Caveman Number System
Decimal Number Caveman Number Decimal Number Caveman Number

0 ∑ 10 >∑
1 ∆ 11 >∆
2 > 12 >>
3 Ω 13 >Ω
4 ↑ 14 >↑
5 ∆∑ 15 Ω∑
6 ∆∆ 16 Ω∆
7 ∆> 17 Ω>
8 ∆Ω 18 ΩΩ
9 ∆↑ 19 Ω↑
Caveman Number System
• Mr. Caveman is using a base 5 number system. Thus the number
∆Ω↑∑ in decimal is
= ∆ x 53 + Ω x 52 + ↑ x 51 + ∑ x 50
= ∆ x 125 + Ω x 25 + ↑ x 5 + ∑ x 1
= (1) x 125 + (3) x 25 + (4) x 5 + (0) x 1
= 125 + 75 + 20 + 0 = 220

36
Binary Number System
• Two unique numbers 0 and 1
• Base – 2
• A binary digit is a bit
• Combination of bits to represent larger values

37
Binary Number System
Decimal Number Binary Number Decimal Number Binary Number

0 0 10 1010
1 1 11 1011
2 10 12 1100
3 11 13 1101
4 100 14 1110
5 101 15 1111
6 110 16 10000
7 111 17 10001
8 1000 18 10010
9 1001 19 10011
Combination of Binary Bits
• Combination of Bits
• 100112 = 1910
= (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21)
+ (1 x 20)
= (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2)
+ (1 x 1)
= 16 + 0 + 0 + 2 + 1
= 19

39
Fractions in Binary
• Fractions in Binary
• 1011.1012 = 11.625
= (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20)
+ (1 x 2-1) + (0 x 2-2) + (1 x 2-3)
= (1 x 8) + (0 x 4) + (1 x 2) + (1 x 1)
+ (1 x 1/2) + (0 x 1/4) + (1 x 1/8)
= 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
= 11.625
• Floating Point Notations

40
41

You might also like