1
1
CSE 320
Computer Organization
and Architecture
2
Course organization
Computing environment
Overview of course topics
Today’s Lecture
2
3
Course website
http://www.cse.msu.edu/~cse320/
Syllabus and calendar
Enrollment
Course Organization
4
Hardware: array of ARM processors
o pi1.cse.msu.edu
.
.
o pi22.cse.msu.edu
Operating system: Linux
Accounts
Computing Environment
3
5
Due Thursday, 9/5 (by 11:59 PM)
Focuses on computing environment:
o UNIX tutorial
o Using the "vim" editor
o Using the "handin" system
Computer Project #1
6
The Information Revolution
Computers have led to a third revolution for
civilization, with the information revolution taking its
place alongside the agricultural and industrial
revolutions.
This race to innovate has led to unprecedented
progress since the inception of electronic computing
in the late 1940s. Had the transportation industry
kept pace with the computer industry, for example,
today we could travel from New York to London in
a second for a penny. (Patterson and Hennessy)
4
7
The Information Revolution
Driven by rapid innovation in technology
Complex applications now feasible
• World Wide Web
• Cell phones
• Computers in automobiles
• Human genome project
8
Computer architecture focuses on the functional
behavior of a computing system as viewed by
the programmer (such as the size of an integer
data object in bytes).
Computer organization focuses on the structural
relationships which are not visible to the
programmer (such as the clock frequency or the
total size of RAM).
Architecture and Organization
5
9
We can view a computing
system at several levels,
from the highest level (users
running programs) to the
lowest level (transistors
operating according to the
laws of physics).
Levels of Abstraction
10
The von Neumann
model consists of five
major components:
1) input unit
2) output unit
3) arithmetic logic unit
4) memory unit
5) control unit
The von Neumann Model
6
11
Refinement of the von Neumann model
Communication between components handled by the
system bus
The System Bus Model
12
Fetch Phase:
o RAM[ PC ] ==> IR
Execute Phase:
o decode IR
o take appropriate action
o update PC
The Fetch-Execute Cycle
7
13
Assume each instruction is 4 bytes long
Assume PC: 00010700
Fetch phase:
o access RAM[ 00010700 ]
o copy 4 bytes (E0827003) to IR
IR now contains: E0827003
Example
14
Assume IR: E0827003
Execute phase:
o decode IR
ADD instruction on ARM
o take appropriate action
R[2] + R[3] ==> R[7]
o update PC
PC + 4 ==> PC
Example (continued)
8
15
RAM
Address
Data
00000000
00000001
00000002
.
.
.
.
00010700 E0
. 82
. 70
. 03
.
.
FFFFFFFD
FFFFFFFE
FFFFFFFF
CPU
PC: 00010700
E0827003IR:
16
CPU
PC: 00010700
IR: E0827003
ADD
R[2]
R[3]
R[7]
9
17
Must be able to convert between bases:
Machines use base 2 (binary)
Humans use base 10 (decimal)
Humans abbreviate base 2 using base 16
(hexadecimal) or base 8 (octal)
Number Systems
18
Decimal Hexadecimal Octal Binary
0 0 0 0000
1 1 1 0001
2 2 2 0010
3 3 3 0011
4 4 4 0100
5 5 5 0101
6 6 6 0110
7 7 7 0111
8 8 10 1000
9 9 11 1001
10 A 12 1010
11 B 13 1011
12 C 14 1100
13 D 15 1101
14 E 16 1110
15 F 17 1111
10
19
Powers of Two
• 20 = 1
• 21 = 2
• 22 = 4
• 23 = 8
• 24 = 16
• 25 = 32
• 26 = 64
• 27 = 128
• 28 = 256
• 29 = 512
• 210 = 1024
• 211 = 2048
• 212 = 4096
• 213 = 8192
• 214 = 16384
• 215 = 32768
20
Base 16 often used instead of base 2
Example:
0100101101111100 = 4b7c
Groups of four bits (from right):
0100 1011 0111 1100 = 4b7c
Shorthand for Binary
11
21
Base 8 sometimes used instead of base 2
Example:
010010110111110 = 22676
Groups of three bits (from right):
010 010 110 111 110 = 22676
Shorthand for Binary
22
Example: ASCII characters
A 1000001 100 0001 41
B 1000010 100 0010 42
C 1000011 100 0011 43
.
.
.
X 1011000 101 1000 58
Y 1011001 101 1001 59
Z 1011010 101 1010 5a
12
23
Example: UNIX file permissions
Permissions for each file:
rwx rwx rwx (owner, group, world)
Make directory public:
chmod 755 my_directory
Make file private:
chmod 600 my_file
24
Example: 2756 base 8 ==> base 10
2756 base 8 = 2 * 83 + 7 * 82 + 5 * 81 + 6 * 80
= 1518 base 10
Nested form:
2756 base 8 = (((((((2) * 8) + 7) * 8) + 5) * 8) + 6)
= 1518 base 10
Convert Other Base to Decimal
13
25
Algorithm:
answer = 0
iterate over digits in original number
answer = answer * base + current digit
Convert Other Base to Decimal
26
2756 base 8 ==> base 10
answer = 0
= (0 * 8) + 2 = 2
= (2 * 8) + 7 = 23
= (23 * 8) + 5 = 189
= (189 * 8) + 6 = 1518
2756 base 8 = 1518 base 10
Convert Other Base to Decimal
14
27
Example: 44 base 10 ==> base 2
44 / 2 = 22 R 0
22 / 2 = 11 R 0
11 / 2 = 5 R 1
5 / 2 = 2 R 1
2 / 2 = 1 R 0
1 / 2 = 0 R 1
44 base 10 = 101100 base 2
Convert Decimal to Other Base
28
Example: 44 base 10 ==> base 8
44 / 8 = 5 R 4
5 / 8 = 0 R 5
44 base 10 = 54 base 8
Convert Decimal to Other Base
15
29
Algorithm:
value = original number
loop until value == 0
current digit = value % base
value = value / base
Convert Decimal to Other Base
30
Base 2 ==> Base 16: group digits
ex: 1100011 base 2 ==> 63 base 16
Base 16 ==> Base 2: decompose digits
ex: 5C base 16 ==> 1011100 base 2
Other Base ==> Base 10: multiply and add
Base 10 ==> Other Base: repeated division
Summary: base conversions
1
1
Today: Combinational Circuits
(H&H 2.1-2.9)
Next: continued
Handouts
Syllabus (old)
Lecture Topics
2
Self-study module #1 (this week)
Consulting hours posted
Project #1 (due no later than 9/5)
Reminder: check account password
Reminder: use Pi array
Announcements
2
3
Due Thursday, 9/5 (by 11:59 PM)
Focuses on computing environment:
o UNIX tutorial
o Using the "vim" editor
o Using the "handin" system
Computer Project #1
4
Circuit design based on Boolean algebra
Three equivalent representations
o algebraic expressions
o truth tables
o circuit diagram
Combinational Circuits
3
5
Expression in Boolean algebra:
F(A,B) = A'B + AB'
Truth table:
Example: Exclusive OR
A B F(A,B)
0 0 0
0 1 1
1 0 1
1 1 0
6
Circuit diagram:
A B
F(A,B)
4
7
Boolean algebra
8
All possible functions on two inputs
5
9
Basic Logic Gates
10
Other Logic Gates
6
11
Any circuit can be defined using only:
{ NOT, AND, OR }
Other complete gate sets:
{ NAND }
{ NOR }
Complete Gate Sets
12
Useful to define gates which have more
than 2 inputs.
AND: output is 1 if all inputs are 1
OR: output is 1 if any input is 1
Not meaningful for NOT
More Than Two Inputs
7
13
Can be implemented using cascading:
Can also be implemented directly
(more efficient)
More Than Two Inputs
14
Canonical Sum-of-Products Form:
F(A,B) = A'B + AB'
The expression is the sum of a series of
products, where each product is a minterm
A minterm is a product where each
variable is present (complemented or
uncomplemented)
Standard Forms
8
15
For a function with two inputs, there are
four possible minterms:
m0: A'B'
m1: A'B
m2: AB'
m3: AB
Canonical SOP form has a subset of all
possible minterms
Minterms
16
For a function with three inputs, there are
eight possible minterms:
m0: A'B'C' m4: AB'C'
m1: A'B'C m5: AB'C
m2: A'BC' m6: ABC'
m3: A'BC m7: ABC
For a function with four inputs, there are
sixteen possible minterms
Minterms
9
17
The following are in canonical SOP form:
F(A,B) = A'B' + A'B + AB'
G(A,B,C) = A'BC + AB'C + ABC' + ABC
H(A,B,C,D) = A'B'C'D' + A'B'CD + ABCD'
Examples
18
The following are equivalent:
F(A,B) = A'B' + A'B + AB'
F(A,B) = m0 + m1 + m2
F(A,B) = minterms( 0, 1, 2 )
Alternate notation (minterm lists)
10
19
G(A,B,C) = A'BC + AB'C + ABC' + ABC
= minterms( 3, 5, 6, 7 )
H(A,B,C,D) = A'B'C'D' + A'B'CD + ABCD'
= minterms( 0, 3, 14 )
Additional Examples:
20
Canonical Sum-of-Products Form:
F(A,B) = A'B + AB' = minterms( 1, 2 )
Truth table:
Truth tables and minterms
A B F(A,B)
0 0 0 m0
0 1 1 m1
1 0 1 m2
1 1 0 m3
11
21
Canonical Sum-of-Products form makes it
easy to convert between representations:
Given: G(A,B,C) = minterms( 3, 5, 6, 7 )
G(A,B,C) = A'BC + AB'C + ABC' + ABC
truth table has 1's in rows m3, m5, m6, m7
circuit diagram has four AND gates (one
for each minterm) and one OR gate
22
Ideally, a Boolean expression will be as simple as
possible and still generate the correct values
Note that there are an infinite number of Boolean
expressions that represent the same function:
F(A,B) = A'B + AB'
= A'B + AB' + AB'
= A'B + AB' + AB' + AB'
Minimization
12
23
The minimized (optimal, simplified) Boolean
expression is the one which has:
the fewest number of gates
the fewest number of inputs to gates
Reminder: we’re working with the complete
gate set { NOT, AND, OR }
Minimization Criteria
24
Three techniques:
Algebraic manipulation
Karnaugh map
Quine-McCluskey algorithm
Minimization Techniques
13
25
Apply the postulates and theorems of
Boolean algebra:
AB' + AB = A(B' + B) (distributive law)
= A(1) (complement law)
= A (identity law)
Algebraic Manipulation
26
F(A,B,C) = A'BC' + A'BC + ABC' + ABC
= A'B(C' + C) + ABC' + ABC
= A'B(1) + ABC' + ABC
= A'B + ABC' + ABC
= A'B + AB(C' + C)
= A'B + AB(1)
= A'B + AB
= (A' + A)B
= (1)B
= B
14
27
Fill in the entries in a K-map, then inspect it
to identify the optimal expression
Karnaugh map is rectangular and has one
entry for each minterm – adjacent minterms
can be combined (same rules as algebraic
manipulation)
Karnaugh Map
28
K-map for function with 2 inputs
A' A
B' m0 m2
B m1 m3
A
0 1
B
0 m0 m2
1 m1 m3
15
29
Minimized function: F(A,B) = A
Example: F(A,B) = AB' + AB
A' A
B' 0 1
B 0 1
A
0 1
B
0 0 1
1 0 1
30
Minimized function: F(A,B) = AB' + A'B
Example: F(A,B) = AB' + A'B
A' A
B' 0 1
B 1 0
A
0 1
B
0 0 1
1 1 0
16
31
K-map for function with 3 inputs
A'B' A'B AB AB'
C' m0 m2 m6 m4
C m1 m3 m7 m5
32
K-map for function with 3 inputs
AB
00 01 11 10
C
0 m0 m2 m6 m4
1 m1 m3 m7 m5
17
33
F(A,B,C) = minterms( 2, 3, 6, 7 )
= A'BC' + A'BC + ABC' + ABC
= A'B(C' + C) + ABC' + ABC
= A'B + ABC' + ABC
= A'B + AB(C' + C)
= A'B + AB
= (A' + A)B
= B
Ex: Algebraic Manipulation
34
F(A,B,C) = B
Ex: Karnaugh Map
A'B' A'B AB AB'
C' 0 1 1 0
C 0 1 1 0
18
35
F(A,B,C) = B
Ex: Karnaugh Map
AB
00 01 11 10
C
0 0 1 1 0
1 0 1 1 0
36
The majority function is true when more than half
of the inputs are true.
Majority function
on 3 inputs:
Application: Majority Function
19
37
F(A,B,C) = minterms( 3, 5, 6, 7 )
= A'BC + AB'C + ABC' + ABC
Gates: 8
Inputs: 19
38
F(A,B,C) = minterms( 3, 5, 6, 7 )
= A'BC + AB'C + ABC' + ABC
= A'BC + AB'C + ABC' + ABC + ABC + ABC
= (A'+A)BC + AC(B'+B) + AB(C'+C)
= BC + AC + AB
= AB + AC + BC
20
39
F(A,B,C) = minterms( 3, 5, 6, 7 )
AB
00 01 11 10
C
0 0 0 1 0
1 0 1 1 1
40
F(A,B,C) = minterms( 3, 5, 6, 7 )
Minimized function: F(A,B,C) = AB + AC + BC
AB
00 01 11 10
C
0 0 0 1 0
1 0 1 1 1
21
41
Minimized function: F(A,B,C) = AB + AC + BC
Gates: 4 Inputs to gates: 9
42
K-map for function with 4 inputs
A'B' A'B AB AB'
C'D' m0 m4 m12 m8
C'D m1 m5 m13 m9
CD m3 m7 m15 m11
CD' m2 m6 m14 m10
22
43
K-map for function with 4 inputs
AB
00 01 11 10
CD
00 m0 m4 m12 m8
01 m1 m5 m13 m9
11 m3 m7 m15 m11
10 m2 m6 m14 m10
44
F(A,B,C,D) =
AB' +
AC'D' +
B'CD' +
A'BC'D
Ex: F(A,B,C,D) = minterms( 2, 5, 8, 9, 10, 11, 12 )
AB
00 01 11 10
CD
00 0 0 1 1
01 0 1 0 1
11 0 0 0 1
10 1 0 0 1
23
45
F(A,B,C,D) =
BD +
A'BC' +
AC'D +
ABC +
A'CD
Ex: F(A,B,C,D) = minterms( 3,4,5,7,9,13,14,15 )
AB
00 01 11 10
CD
00 0 1 0 0
01 0 1 1 1
11 1 1 1 0
10 0 0 1 0
46
F(A,B,C,D) =
A'BC' +
AC'D +
ABC +
A'CD
Ex: F(A,B,C,D) = minterms( 3,4,5,7,9,13,14,15 )
AB
00 01 11 10
CD
00 0 1 0 0
01 0 1 1 1
11 1 1 1 0
10 0 0 1 0
24
47
Start with 1’s which are isolated
Find 1’s that can only be included in 2-cover
Find 1’s that can only be included in 4-cover
Find 1’s that can only be included in 8-cover
Continue until all 1’s covered at least once
Order is important!
48
K-maps are "circular":

More Related Content

PPTX
Seminar PSU 10.10.2014 mme
PPT
Basic_analysis.ppt
PDF
peRm R group. Review of packages for r for market data downloading and analysis
PPT
Parallel Prefix Adders Presentation
PPT
Chapter 3 2
PDF
Cbse question paper class_xii_paper_2000
PDF
Perm winter school 2014.01.31
PPT
Datapath subsystem multiplication
Seminar PSU 10.10.2014 mme
Basic_analysis.ppt
peRm R group. Review of packages for r for market data downloading and analysis
Parallel Prefix Adders Presentation
Chapter 3 2
Cbse question paper class_xii_paper_2000
Perm winter school 2014.01.31
Datapath subsystem multiplication

What's hot (20)

PDF
Scala.io
PDF
A109211002 switchingtheoryandlogicdesign1
PDF
Cs101 endsem 2014
PPT
Stdlib functions lesson
PPTX
Seminar psu 20.10.2013
PDF
Introduction to NumPy for Machine Learning Programmers
PDF
CLIM Undergraduate Workshop: Tutorial on R Software - Huang Huang, Oct 23, 2017
PPTX
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
KEY
Numpy Talk at SIAM
PPTX
Presentation 2(power point presentation) dis2016
PDF
Efficient Random-Walk Methods forApproximating Polytope Volume
PDF
Volume and edge skeleton computation in high dimensions
PDF
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
PDF
Lab 2-Simple Combinational Logic
PDF
Lab 3 Multi-Function Gate
PDF
Ece 465 project_1_report_vishesh_shravan
PDF
Compiling fµn language
PPT
Python (1)
PDF
GNU octave
PDF
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
Scala.io
A109211002 switchingtheoryandlogicdesign1
Cs101 endsem 2014
Stdlib functions lesson
Seminar psu 20.10.2013
Introduction to NumPy for Machine Learning Programmers
CLIM Undergraduate Workshop: Tutorial on R Software - Huang Huang, Oct 23, 2017
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Numpy Talk at SIAM
Presentation 2(power point presentation) dis2016
Efficient Random-Walk Methods forApproximating Polytope Volume
Volume and edge skeleton computation in high dimensions
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
Lab 2-Simple Combinational Logic
Lab 3 Multi-Function Gate
Ece 465 project_1_report_vishesh_shravan
Compiling fµn language
Python (1)
GNU octave
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
Ad

Similar to Chapter 1 (20)

PDF
Chapter 2
PPT
computer system architecture for control system.ppt
PDF
Basic arithmetic, instruction execution and program
PDF
Vic broquard c++ for computer science and engineering 2006
PDF
COMPUTER ORGANIZATION NOTES Unit 2
PPT
8086-instruction-set-ppt
PDF
C++ progrmming language
PDF
COA Chapter 1.pdf
PPT
100_2_digitalSystem_Chap1 (2).ppt
PPT
Unit 2 8086 Instruction set.ppt notes good
PPTX
Chapter_02_The_Language_of_Bits_Any.pptx
PPT
ece552_08_integer_multiply.ppt
PPT
ece552_08_integer_multiply.ppt
PPT
ece552_08_integer_multiply.ppt
PDF
Math for programmers
PPT
integers multipliers and their functioning
PPT
ece552_08_integer_mccccccccccultiply.ppt
PPTX
Ch 2.pptx
PPT
digital systems and information
PPT
Cha_2b_8086-Instruction-set-ppt microprocessor
Chapter 2
computer system architecture for control system.ppt
Basic arithmetic, instruction execution and program
Vic broquard c++ for computer science and engineering 2006
COMPUTER ORGANIZATION NOTES Unit 2
8086-instruction-set-ppt
C++ progrmming language
COA Chapter 1.pdf
100_2_digitalSystem_Chap1 (2).ppt
Unit 2 8086 Instruction set.ppt notes good
Chapter_02_The_Language_of_Bits_Any.pptx
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
Math for programmers
integers multipliers and their functioning
ece552_08_integer_mccccccccccultiply.ppt
Ch 2.pptx
digital systems and information
Cha_2b_8086-Instruction-set-ppt microprocessor
Ad

More from EasyStudy3 (20)

PDF
Week 7
PDF
Chapter 3
PDF
Week 6
PDF
2. polynomial interpolation
PDF
Chapter2 slides-part 2-harish complete
PDF
PDF
Chapter 5
PDF
Lec#4
PDF
Chapter 12 vectors and the geometry of space merged
PDF
Week 5
PDF
Chpater 6
PDF
Chapter 5
PDF
Lec#3
PDF
Chapter 16 2
PDF
Chapter 5 gen chem
PDF
Topic 4 gen chem guobi
PDF
Gen chem topic 3 guobi
PDF
Chapter 2
PDF
Gen chem topic 1 guobi
Week 7
Chapter 3
Week 6
2. polynomial interpolation
Chapter2 slides-part 2-harish complete
Chapter 5
Lec#4
Chapter 12 vectors and the geometry of space merged
Week 5
Chpater 6
Chapter 5
Lec#3
Chapter 16 2
Chapter 5 gen chem
Topic 4 gen chem guobi
Gen chem topic 3 guobi
Chapter 2
Gen chem topic 1 guobi

Recently uploaded (20)

PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Empowerment Technology for Senior High School Guide
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PPTX
Climate Change and Its Global Impact.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
CRP102_SAGALASSOS_Final_Projects_2025.pdf
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Journal of Dental Science - UDMY (2020).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
HVAC Specification 2024 according to central public works department
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Empowerment Technology for Senior High School Guide
Journal of Dental Science - UDMY (2022).pdf
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
Race Reva University – Shaping Future Leaders in Artificial Intelligence
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Climate Change and Its Global Impact.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
CRP102_SAGALASSOS_Final_Projects_2025.pdf
Cambridge-Practice-Tests-for-IELTS-12.docx
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Share_Module_2_Power_conflict_and_negotiation.pptx
Environmental Education MCQ BD2EE - Share Source.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Journal of Dental Science - UDMY (2020).pdf
English Textual Question & Ans (12th Class).pdf
HVAC Specification 2024 according to central public works department

Chapter 1

  • 1. 1 1 CSE 320 Computer Organization and Architecture 2 Course organization Computing environment Overview of course topics Today’s Lecture
  • 2. 2 3 Course website http://www.cse.msu.edu/~cse320/ Syllabus and calendar Enrollment Course Organization 4 Hardware: array of ARM processors o pi1.cse.msu.edu . . o pi22.cse.msu.edu Operating system: Linux Accounts Computing Environment
  • 3. 3 5 Due Thursday, 9/5 (by 11:59 PM) Focuses on computing environment: o UNIX tutorial o Using the "vim" editor o Using the "handin" system Computer Project #1 6 The Information Revolution Computers have led to a third revolution for civilization, with the information revolution taking its place alongside the agricultural and industrial revolutions. This race to innovate has led to unprecedented progress since the inception of electronic computing in the late 1940s. Had the transportation industry kept pace with the computer industry, for example, today we could travel from New York to London in a second for a penny. (Patterson and Hennessy)
  • 4. 4 7 The Information Revolution Driven by rapid innovation in technology Complex applications now feasible • World Wide Web • Cell phones • Computers in automobiles • Human genome project 8 Computer architecture focuses on the functional behavior of a computing system as viewed by the programmer (such as the size of an integer data object in bytes). Computer organization focuses on the structural relationships which are not visible to the programmer (such as the clock frequency or the total size of RAM). Architecture and Organization
  • 5. 5 9 We can view a computing system at several levels, from the highest level (users running programs) to the lowest level (transistors operating according to the laws of physics). Levels of Abstraction 10 The von Neumann model consists of five major components: 1) input unit 2) output unit 3) arithmetic logic unit 4) memory unit 5) control unit The von Neumann Model
  • 6. 6 11 Refinement of the von Neumann model Communication between components handled by the system bus The System Bus Model 12 Fetch Phase: o RAM[ PC ] ==> IR Execute Phase: o decode IR o take appropriate action o update PC The Fetch-Execute Cycle
  • 7. 7 13 Assume each instruction is 4 bytes long Assume PC: 00010700 Fetch phase: o access RAM[ 00010700 ] o copy 4 bytes (E0827003) to IR IR now contains: E0827003 Example 14 Assume IR: E0827003 Execute phase: o decode IR ADD instruction on ARM o take appropriate action R[2] + R[3] ==> R[7] o update PC PC + 4 ==> PC Example (continued)
  • 8. 8 15 RAM Address Data 00000000 00000001 00000002 . . . . 00010700 E0 . 82 . 70 . 03 . . FFFFFFFD FFFFFFFE FFFFFFFF CPU PC: 00010700 E0827003IR: 16 CPU PC: 00010700 IR: E0827003 ADD R[2] R[3] R[7]
  • 9. 9 17 Must be able to convert between bases: Machines use base 2 (binary) Humans use base 10 (decimal) Humans abbreviate base 2 using base 16 (hexadecimal) or base 8 (octal) Number Systems 18 Decimal Hexadecimal Octal Binary 0 0 0 0000 1 1 1 0001 2 2 2 0010 3 3 3 0011 4 4 4 0100 5 5 5 0101 6 6 6 0110 7 7 7 0111 8 8 10 1000 9 9 11 1001 10 A 12 1010 11 B 13 1011 12 C 14 1100 13 D 15 1101 14 E 16 1110 15 F 17 1111
  • 10. 10 19 Powers of Two • 20 = 1 • 21 = 2 • 22 = 4 • 23 = 8 • 24 = 16 • 25 = 32 • 26 = 64 • 27 = 128 • 28 = 256 • 29 = 512 • 210 = 1024 • 211 = 2048 • 212 = 4096 • 213 = 8192 • 214 = 16384 • 215 = 32768 20 Base 16 often used instead of base 2 Example: 0100101101111100 = 4b7c Groups of four bits (from right): 0100 1011 0111 1100 = 4b7c Shorthand for Binary
  • 11. 11 21 Base 8 sometimes used instead of base 2 Example: 010010110111110 = 22676 Groups of three bits (from right): 010 010 110 111 110 = 22676 Shorthand for Binary 22 Example: ASCII characters A 1000001 100 0001 41 B 1000010 100 0010 42 C 1000011 100 0011 43 . . . X 1011000 101 1000 58 Y 1011001 101 1001 59 Z 1011010 101 1010 5a
  • 12. 12 23 Example: UNIX file permissions Permissions for each file: rwx rwx rwx (owner, group, world) Make directory public: chmod 755 my_directory Make file private: chmod 600 my_file 24 Example: 2756 base 8 ==> base 10 2756 base 8 = 2 * 83 + 7 * 82 + 5 * 81 + 6 * 80 = 1518 base 10 Nested form: 2756 base 8 = (((((((2) * 8) + 7) * 8) + 5) * 8) + 6) = 1518 base 10 Convert Other Base to Decimal
  • 13. 13 25 Algorithm: answer = 0 iterate over digits in original number answer = answer * base + current digit Convert Other Base to Decimal 26 2756 base 8 ==> base 10 answer = 0 = (0 * 8) + 2 = 2 = (2 * 8) + 7 = 23 = (23 * 8) + 5 = 189 = (189 * 8) + 6 = 1518 2756 base 8 = 1518 base 10 Convert Other Base to Decimal
  • 14. 14 27 Example: 44 base 10 ==> base 2 44 / 2 = 22 R 0 22 / 2 = 11 R 0 11 / 2 = 5 R 1 5 / 2 = 2 R 1 2 / 2 = 1 R 0 1 / 2 = 0 R 1 44 base 10 = 101100 base 2 Convert Decimal to Other Base 28 Example: 44 base 10 ==> base 8 44 / 8 = 5 R 4 5 / 8 = 0 R 5 44 base 10 = 54 base 8 Convert Decimal to Other Base
  • 15. 15 29 Algorithm: value = original number loop until value == 0 current digit = value % base value = value / base Convert Decimal to Other Base 30 Base 2 ==> Base 16: group digits ex: 1100011 base 2 ==> 63 base 16 Base 16 ==> Base 2: decompose digits ex: 5C base 16 ==> 1011100 base 2 Other Base ==> Base 10: multiply and add Base 10 ==> Other Base: repeated division Summary: base conversions
  • 16. 1 1 Today: Combinational Circuits (H&H 2.1-2.9) Next: continued Handouts Syllabus (old) Lecture Topics 2 Self-study module #1 (this week) Consulting hours posted Project #1 (due no later than 9/5) Reminder: check account password Reminder: use Pi array Announcements
  • 17. 2 3 Due Thursday, 9/5 (by 11:59 PM) Focuses on computing environment: o UNIX tutorial o Using the "vim" editor o Using the "handin" system Computer Project #1 4 Circuit design based on Boolean algebra Three equivalent representations o algebraic expressions o truth tables o circuit diagram Combinational Circuits
  • 18. 3 5 Expression in Boolean algebra: F(A,B) = A'B + AB' Truth table: Example: Exclusive OR A B F(A,B) 0 0 0 0 1 1 1 0 1 1 1 0 6 Circuit diagram: A B F(A,B)
  • 19. 4 7 Boolean algebra 8 All possible functions on two inputs
  • 21. 6 11 Any circuit can be defined using only: { NOT, AND, OR } Other complete gate sets: { NAND } { NOR } Complete Gate Sets 12 Useful to define gates which have more than 2 inputs. AND: output is 1 if all inputs are 1 OR: output is 1 if any input is 1 Not meaningful for NOT More Than Two Inputs
  • 22. 7 13 Can be implemented using cascading: Can also be implemented directly (more efficient) More Than Two Inputs 14 Canonical Sum-of-Products Form: F(A,B) = A'B + AB' The expression is the sum of a series of products, where each product is a minterm A minterm is a product where each variable is present (complemented or uncomplemented) Standard Forms
  • 23. 8 15 For a function with two inputs, there are four possible minterms: m0: A'B' m1: A'B m2: AB' m3: AB Canonical SOP form has a subset of all possible minterms Minterms 16 For a function with three inputs, there are eight possible minterms: m0: A'B'C' m4: AB'C' m1: A'B'C m5: AB'C m2: A'BC' m6: ABC' m3: A'BC m7: ABC For a function with four inputs, there are sixteen possible minterms Minterms
  • 24. 9 17 The following are in canonical SOP form: F(A,B) = A'B' + A'B + AB' G(A,B,C) = A'BC + AB'C + ABC' + ABC H(A,B,C,D) = A'B'C'D' + A'B'CD + ABCD' Examples 18 The following are equivalent: F(A,B) = A'B' + A'B + AB' F(A,B) = m0 + m1 + m2 F(A,B) = minterms( 0, 1, 2 ) Alternate notation (minterm lists)
  • 25. 10 19 G(A,B,C) = A'BC + AB'C + ABC' + ABC = minterms( 3, 5, 6, 7 ) H(A,B,C,D) = A'B'C'D' + A'B'CD + ABCD' = minterms( 0, 3, 14 ) Additional Examples: 20 Canonical Sum-of-Products Form: F(A,B) = A'B + AB' = minterms( 1, 2 ) Truth table: Truth tables and minterms A B F(A,B) 0 0 0 m0 0 1 1 m1 1 0 1 m2 1 1 0 m3
  • 26. 11 21 Canonical Sum-of-Products form makes it easy to convert between representations: Given: G(A,B,C) = minterms( 3, 5, 6, 7 ) G(A,B,C) = A'BC + AB'C + ABC' + ABC truth table has 1's in rows m3, m5, m6, m7 circuit diagram has four AND gates (one for each minterm) and one OR gate 22 Ideally, a Boolean expression will be as simple as possible and still generate the correct values Note that there are an infinite number of Boolean expressions that represent the same function: F(A,B) = A'B + AB' = A'B + AB' + AB' = A'B + AB' + AB' + AB' Minimization
  • 27. 12 23 The minimized (optimal, simplified) Boolean expression is the one which has: the fewest number of gates the fewest number of inputs to gates Reminder: we’re working with the complete gate set { NOT, AND, OR } Minimization Criteria 24 Three techniques: Algebraic manipulation Karnaugh map Quine-McCluskey algorithm Minimization Techniques
  • 28. 13 25 Apply the postulates and theorems of Boolean algebra: AB' + AB = A(B' + B) (distributive law) = A(1) (complement law) = A (identity law) Algebraic Manipulation 26 F(A,B,C) = A'BC' + A'BC + ABC' + ABC = A'B(C' + C) + ABC' + ABC = A'B(1) + ABC' + ABC = A'B + ABC' + ABC = A'B + AB(C' + C) = A'B + AB(1) = A'B + AB = (A' + A)B = (1)B = B
  • 29. 14 27 Fill in the entries in a K-map, then inspect it to identify the optimal expression Karnaugh map is rectangular and has one entry for each minterm – adjacent minterms can be combined (same rules as algebraic manipulation) Karnaugh Map 28 K-map for function with 2 inputs A' A B' m0 m2 B m1 m3 A 0 1 B 0 m0 m2 1 m1 m3
  • 30. 15 29 Minimized function: F(A,B) = A Example: F(A,B) = AB' + AB A' A B' 0 1 B 0 1 A 0 1 B 0 0 1 1 0 1 30 Minimized function: F(A,B) = AB' + A'B Example: F(A,B) = AB' + A'B A' A B' 0 1 B 1 0 A 0 1 B 0 0 1 1 1 0
  • 31. 16 31 K-map for function with 3 inputs A'B' A'B AB AB' C' m0 m2 m6 m4 C m1 m3 m7 m5 32 K-map for function with 3 inputs AB 00 01 11 10 C 0 m0 m2 m6 m4 1 m1 m3 m7 m5
  • 32. 17 33 F(A,B,C) = minterms( 2, 3, 6, 7 ) = A'BC' + A'BC + ABC' + ABC = A'B(C' + C) + ABC' + ABC = A'B + ABC' + ABC = A'B + AB(C' + C) = A'B + AB = (A' + A)B = B Ex: Algebraic Manipulation 34 F(A,B,C) = B Ex: Karnaugh Map A'B' A'B AB AB' C' 0 1 1 0 C 0 1 1 0
  • 33. 18 35 F(A,B,C) = B Ex: Karnaugh Map AB 00 01 11 10 C 0 0 1 1 0 1 0 1 1 0 36 The majority function is true when more than half of the inputs are true. Majority function on 3 inputs: Application: Majority Function
  • 34. 19 37 F(A,B,C) = minterms( 3, 5, 6, 7 ) = A'BC + AB'C + ABC' + ABC Gates: 8 Inputs: 19 38 F(A,B,C) = minterms( 3, 5, 6, 7 ) = A'BC + AB'C + ABC' + ABC = A'BC + AB'C + ABC' + ABC + ABC + ABC = (A'+A)BC + AC(B'+B) + AB(C'+C) = BC + AC + AB = AB + AC + BC
  • 35. 20 39 F(A,B,C) = minterms( 3, 5, 6, 7 ) AB 00 01 11 10 C 0 0 0 1 0 1 0 1 1 1 40 F(A,B,C) = minterms( 3, 5, 6, 7 ) Minimized function: F(A,B,C) = AB + AC + BC AB 00 01 11 10 C 0 0 0 1 0 1 0 1 1 1
  • 36. 21 41 Minimized function: F(A,B,C) = AB + AC + BC Gates: 4 Inputs to gates: 9 42 K-map for function with 4 inputs A'B' A'B AB AB' C'D' m0 m4 m12 m8 C'D m1 m5 m13 m9 CD m3 m7 m15 m11 CD' m2 m6 m14 m10
  • 37. 22 43 K-map for function with 4 inputs AB 00 01 11 10 CD 00 m0 m4 m12 m8 01 m1 m5 m13 m9 11 m3 m7 m15 m11 10 m2 m6 m14 m10 44 F(A,B,C,D) = AB' + AC'D' + B'CD' + A'BC'D Ex: F(A,B,C,D) = minterms( 2, 5, 8, 9, 10, 11, 12 ) AB 00 01 11 10 CD 00 0 0 1 1 01 0 1 0 1 11 0 0 0 1 10 1 0 0 1
  • 38. 23 45 F(A,B,C,D) = BD + A'BC' + AC'D + ABC + A'CD Ex: F(A,B,C,D) = minterms( 3,4,5,7,9,13,14,15 ) AB 00 01 11 10 CD 00 0 1 0 0 01 0 1 1 1 11 1 1 1 0 10 0 0 1 0 46 F(A,B,C,D) = A'BC' + AC'D + ABC + A'CD Ex: F(A,B,C,D) = minterms( 3,4,5,7,9,13,14,15 ) AB 00 01 11 10 CD 00 0 1 0 0 01 0 1 1 1 11 1 1 1 0 10 0 0 1 0
  • 39. 24 47 Start with 1’s which are isolated Find 1’s that can only be included in 2-cover Find 1’s that can only be included in 4-cover Find 1’s that can only be included in 8-cover Continue until all 1’s covered at least once Order is important! 48 K-maps are "circular":