Digital Design and Computer Architecture Lecture 1 Digital

  • Slides: 27
Download presentation
Digital Design and Computer Architecture Lecture 1 Digital Design and Computer Architecture Harris &

Digital Design and Computer Architecture Lecture 1 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007 1

Logistics • Handouts: – Syllabus, Lecture Notes • Lab 1 posted on the website:

Logistics • Handouts: – Syllabus, Lecture Notes • Lab 1 posted on the website: – www. jlc. tcu. edu. tw • Reading for next Monday (9/29: 點名) – 1. 6 -1. 7, 1. 9, 2. 1 -2. 3 2

Overview • More Logistics: – Course Objectives – Course Requirements – Schedule • Digital

Overview • More Logistics: – Course Objectives – Course Requirements – Schedule • Digital Design – Managing Complexity – Number Systems – Logic Gates 3

Course Objectives • To become a competent digital designer • To learn to recognize

Course Objectives • To become a competent digital designer • To learn to recognize and apply the principles of abstraction, modularity, hierarchy, and regularity in digital design • To hone your debugging skills by designing, building, and testing digital circuits • To design, build, and test your own clock • To understand what’s under the hood of a computer • To have fun while you’re doing it! 4

Course Requirements • Class Participation – If you need to miss class, email me

Course Requirements • Class Participation – If you need to miss class, email me beforehand • Assignments: – Weekly problem sets (10%), due Monday Morning – Semester labs (電子鐘 15% + 組合語言程式 15%) – Reading • Exams – Midterm (25%) – Final (35%) • Team policy for bi-weekly discussion – – (75%個人成績+25%團體成績) for Midterm and Final Number of team member 5~6, Bonus for participation: +3; leader +5 5

Syllabus • Read the syllabus! 6

Syllabus • Read the syllabus! 6

Digital Design General engineering principles for complex systems: – Abstraction – Discipline – The

Digital Design General engineering principles for complex systems: – Abstraction – Discipline – The three -Y’s • Hierarchy • Modularity • Regularity 7

Abstraction • Hiding details when they aren’t important 8

Abstraction • Hiding details when they aren’t important 8

Discipline • Intentionally restricting your design choices (so that you can work more productively

Discipline • Intentionally restricting your design choices (so that you can work more productively at a higher level of abstraction) 9

The Three -Y’s • Hierarchy – Dividing a system into modules and submodules •

The Three -Y’s • Hierarchy – Dividing a system into modules and submodules • Modularity – Well-defined functions and interfaces • Regularity – Uniformity, so modules can be easily reused 10

Digital Abstraction • 1’s and 0’s • bits: binary digit 11

Digital Abstraction • 1’s and 0’s • bits: binary digit 11

Number Systems • Decimal numbers • Binary numbers 12

Number Systems • Decimal numbers • Binary numbers 12

Number Conversion • Decimal to binary conversion: – Convert 101012 to decimal • Decimal

Number Conversion • Decimal to binary conversion: – Convert 101012 to decimal • Decimal to binary conversion: – Convert 4710 to binary 13

Hexadecimal Numbers Hex Digit Decimal Equivalent Binary Equivalent 0 0 0000 1 1 0001

Hexadecimal Numbers Hex Digit Decimal Equivalent Binary Equivalent 0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 8 1000 9 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 14

Number Conversion • Hexadecimal to binary conversion: – Convert 4 AF 16 (0 x

Number Conversion • Hexadecimal to binary conversion: – Convert 4 AF 16 (0 x 4 AF) to binary • Hexadecimal to decimal conversion: – Convert 0 x 4 AF to decimal 15

Bits, Bytes, Nibbles… • Bits • Bytes & Nibbles • Bytes • (how they

Bits, Bytes, Nibbles… • Bits • Bytes & Nibbles • Bytes • (how they are put in memory? ) 16

Addition • Decimal • Binary 17

Addition • Decimal • Binary 17

Binary Addition Examples • Add the following 4 -bit binary numbers 18

Binary Addition Examples • Add the following 4 -bit binary numbers 18

Signed Binary Numbers • Sign and Magnitude: – 1 sign bit, N-1 magnitude bits

Signed Binary Numbers • Sign and Magnitude: – 1 sign bit, N-1 magnitude bits – Example: -5 = 11012 +5 = 01012 • Two’s Complement( why? ) – Same as unsigned binary, but most significant bit (msb) has value of -2 N-1 – Most positive 4 -bit number: 01112 – Most negative 4 -bit number: 10002 19

“Taking the Two’s Complement” • Reversing the sign of a two’s complement number •

“Taking the Two’s Complement” • Reversing the sign of a two’s complement number • Method: 1. Invert the bits 2. Add 1 • Example: Reverse the sign of 0111 1. 1000 2. + 1 1001 20

Two’s Complement Examples • Take the two’s complement of 0101. • Take the two’s

Two’s Complement Examples • Take the two’s complement of 0101. • Take the two’s complement of 1010. 21

Two’s Complement Addition • Add 6 + (-6) using two’s complement numbers. • Add

Two’s Complement Addition • Add 6 + (-6) using two’s complement numbers. • Add -2 + 3 using two’s complement numbers. 22

Logic Gates 23

Logic Gates 23

Two-Input Logic Gates 24

Two-Input Logic Gates 24

More Two-Input Logic Gates 25

More Two-Input Logic Gates 25

Multiple-Input Logic Gates How about 4 -input XOR? 26

Multiple-Input Logic Gates How about 4 -input XOR? 26

Next Time • Beneath the digital abstraction • Transistors • Boolean algebra 27

Next Time • Beneath the digital abstraction • Transistors • Boolean algebra 27