32
Lecture 1: Spring 2018 1 ECE/ENGRD 2300 Digital Logic & Computer Organization Course Overview Zhiru Zhang School of Electrical and Computer Engineering

ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Embed Size (px)

Citation preview

Page 1: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Spring 2018

1

ECE/ENGRD 2300Digital Logic & Computer Organization

Course Overview

Zhiru ZhangSchool of Electrical and Computer Engineering

Page 2: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Digital Computers are Everywhere

2

Page 3: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Changing Every Aspect of Our Life

3

and many more …

Page 4: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 4

Digital (Super)Intelligence?

Source: http://www.economist.com/news/science-and-technology/21694540-win-or-lose-best-five-battle-contest-another-milestone

Mar 2016: Google’s AlphaGo won the match against Go top player Lee Sedol

Page 5: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 5

How Do We Build a Complex Computer System?

Computer:Hardware & Software

Circuit Board (PCB):»8 / system

1-2B devices

Integrated Circuit (IC):»8-16 / PCB

.25M-16M devicesModule:»8-16 / IC

100K devices

Cell:»1K-10K / Module

16-64 devicesGate:»2-16 / Cell8 devices

Scheme for representinginformation

MOSFET

Page 6: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 6

Our Plan of Attack …• Understand how things work, bottom-up

• Encapsulate our understanding using appropriate abstractions

• Roll up our sleeves and design at each level of hierarchy

Page 7: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Required Textbook

• Get 2nd edition

7

Page 8: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 8

Class Resources• Course website

– http://www.csl.cornell.edu/courses/ece2300/– Lecture slides, syllabus, and other handouts

• CMS: Course management system – Assignments and grades – Electronic submissions required – Enrollment information to come

• Piazza – Announcements and Q&A– Enrollment information to come

Page 9: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 9

• PhD TA– Nitish Srivastava (nks45) – Philip Bedoukian (pbb59)

• MEng TAs– Deepak Agarwal (da475)

• Undergrad TAs– Norman Chen (nyc7)– Derek Cheng (dsc252)– Julia Currie (jbc262) – Giacomo Di Liberto (gvd8)– Yiwen Huang (yh385)– Evan Kravitz (esk95)– Adeel Mahmood (am2384)– Kevin Ying (kzy2)

• Staff email: [email protected]

Teaching Assistants

Page 10: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Seeking Help After Class

10

• Piazza– Questions on lectures, assignments, and labs– Monitored by instructor & Tas

• Staff email– Grading related questions to instructor & TAs

• Instructor email– Private matters/appointment

• Office hours– Instructor: Thursday, 4:00-5:30pm, Rhodes 320– TA office hours to be announced soon

Page 11: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

LET’S PLAY A GAME TO TEST HOW GOOD YOUR MEMORY IS

A Memory Game: Dirty Bit

Page 12: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Grading

12

• Participation: 3%

• Quizzes: 6%

• Homework: 12%

• Labs: 30%

• Prelim 1: 12%

• Prelim 2: 16%

• Final: 21%

Page 13: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Participation (3%)

13

• Participating in-class activities– Asking & answering questions in class– Games and bonus problems

• Contributing to Piazza forum– Asking good questions & helping other students

• A (very) rough rubric– Very active = 3pts– Somewhat engaged = 1~2pts– No impression = 0pt

Page 14: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 14

• Labs (30%)– Six labs

• Prelab: write-up of your (partial) design • Lab section: implement and test your design • Lab report: write up your findings

– Lab 1 starts on Monday January 29th

• Homework (12%)– Assigned most weeks (~8 problem sets)

Labs and Homework (42%)

Page 15: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Exams and Quizzes (55%)

15

• Prelims (28%)– Thursday, March 1, in class– Tuesday, April 17, Phillips 101

• Final Exam (21%)– Tuesday May 22, location TBD

• Quizzes (6%)– You will need to answer pop quiz questions in most

lectures (using paper & pencil)– Three lowest scores will be dropped

Page 16: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Important Policies• Late Policy

– We collect assignments the instant they are due• Late submissions = 0 points • Applies to homework, prelabs, and lab reports

– You can submit up to TWO assignments after the deadline without penalty

• Total SIX slip days; At most ONE slip day for prelab• Intended to cover minor illnesses or “crunch time”

– If you have a serious illness or family emergency, contact me

• Regrade Policy– Submit regrade form within one week if you feel a

grading mistake has been made

16

Page 17: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

How to Do Well in This Class

17

• Come to every lecture and participate– Put your laptop away

• Read the book sections before class

• Keep up with the week to week assignments

• Seek help if necessary

Page 18: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Academic Integrity

18

• http://cuinfo.cornell.edu/aic.cfm

• Discussion of homework problems and lab concepts? YES

• Misrepresenting someone else’s work as your own is prohibited – Getting someone else’s work? NO – Sharing your work with others? NO – Finding solutions on the web? NO

• Buying or selling course materials to commercial vendors (including Internet sites)? NO

Page 19: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 19

Tentative Course Schedule

• Complete schedule is on course website

Page 20: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Course Content• Binary numbers and logic gates• Boolean algebra and combinational logic• Sequential logic and state machines• Binary arithmetic• Memories

• Instruction set architecture• Processor organization• Caches and virtual memory• Input/output• Advanced topics

20

Digital logic

Computer organization

Page 21: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 21

Where This Course Sits in the “Stack”

TraditionalCS

TraditionalEE

ComputerEngineering

Atomicphysics

Devices

Electroniccircuits

Digitallogicdesign

Chipdesign Computerorganization

Programminglanguage

high

er le

vels

of a

bstra

ctio

n

Instructionsetarchitecture

Systemsoftware(compilers,OS)

Application

Page 22: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Binary Digital Systems

• Basic unit of information: the binary digit, or bit– Two values: 0 and 1

• 0 and 1 represented by voltages

22

• Digital system:Finite number of values

• Binary (base 2) systemUse two states: 0 and 1

2V “1”

0V “0”

Page 23: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

0 and 1 Don’t Have to be Exact• 0 and 1 represented by

voltage ranges (logic levels)

• Electronic circuits do not need to be perfect

• We can tolerate some noise and computers still work

23

0.5V

1.5V

2V“1”

0V“0”

Page 24: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Can We Represent More Than 2 Values?

24

• Yes – just use multiple bits – A collection of 2 bits gives 4 possible values

• 00, 01, 10, 11 – A collection of 3 bits gives 8 possible values

• 000, 001, 010, 011, 100, 101, 110, 111

• A collection of n bits gives 2n possible values

Page 25: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Positional Number Representation• Recall positional notation for decimal numbers

• Similar positional system for binary

25

329101102 100

3x100 + 2x10 + 9x1 = 329

base 10(decimal)

1012122 20

1x4 + 0x2 + 1x1 = 5

base 2(binary)

Page 26: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 26

• White stone = 0• Black stone = 1

• Convert each row into a decimal number

1*23+1*22+0*21+1*20

= 8 + 4 + 0 + 1 = 13

From Stones to Numbers

Page 27: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Logic Gates

27

A B Y0 0 00 1 11 0 11 1 1

A B Y0 0 00 1 01 0 01 1 1

ANDGate

AANDB,A•B

AB

Y

ORGate

AORB,A+B

AB

Y

• Logic gates are functions: take one or more binary inputs and produce a binary output

A Y0 11 0

NOTGate

NOTA,A,A’

A Y

TruthTable

Page 28: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Build a 1-Bit Adder

28

• Inputs: A, B and Cin (carry-in)• Outputs: S (sum) and Cout (carry-out)

A B Cin Cout S

0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

A B Y0 0 00 1 11 0 11 1 0

XORGateA•B’+A’•B

Page 29: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1: 29

A B

Cout Cin

S

a1 b1

A B

Cout Cin

S

s1

c1A B

Cout Cin

S

s0

A B

Cout Cin

S

s2

c2A B

Cout Cin

S

s15

a0 b0a2 b2a15 b15

c16 0

abstraction

Build a Multi-Bit Adder

Page 30: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Build a Programmable Microprocessor

30

PC

RF

LDSASBDRD_in

ALU DataRAM

DataA

DataB

V C Z N

Fm … F0

SE

IMMMB

M_address

Data_in

MW MD

01

01

Inst. RAM

MP

BS

01ZZ’NN’CV

01234567

Decoder

DRSASB

IMMMBFSMDLD

MWBS

SE(OFF,0) AdderMP

01

+2

Page 31: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Build a Complete Computer

31

AB Y

Page 32: ECE/ENGRD 2300 Digital Logic & Computer Organization · ECE/ENGRD 2300 Digital Logic & Computer Organization ... LET’S PLAY A GAME TO TEST ... • Prelim 2: 16%

Lecture 1:

Before Next Class

• Read the syllabus!• H&H 1.1-1.4.2, 1.5-1.6.2, 2.1-2.3

32

Next Time

Switching Algebra