Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee. Steve Jobs custom Apple I and other historic machines are on display at Seattle museum

Similar documents
Lecture 19: Computers. Pay no attention to the man behind the curtain.

Basic Input and Output

Lecture 01: Basic Structure of Computers

Memory, Data, & Addressing I

Instructor: Teaching Assistants: Justin Hsia Anupam Gupta, Cheng Ni, Eugene Oh, Sam Wolfson, Sophie Tian, Teagan Horkan

CPS104 Computer Organization Lecture 1. CPS104: Computer Organization. Meat of the Course. Robert Wagner

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Basic Input and Output

CPS104 Computer Organization Lecture 1

Topic Notes: MIPS Instruction Set Architecture

Functions in Processing

CS3350B Computer Architecture Winter 2015

ECE232: Hardware Organization and Design

Computer Architecture 2/26/01 Lecture #

CPE300: Digital System Architecture and Design

CS 101, Mock Computer Architecture

2/15/2008. Announcements. Programming. Instruction Execution Engines. Following Instructions. Instruction Execution Engines. Anatomy of a Computer

Computer Architecture

CS61C : Machine Structures

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

PC I/O. May 7, Howard Huang 1

Knowledge Organiser. Computing. Year 10 Term 1 Hardware

ECE232: Hardware Organization and Design

Faculty of Science FINAL EXAMINATION

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

HANDOUT: COMPUTER PARTS

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Review of Last Lecture. CS 61C: Great Ideas in Computer Architecture. MIPS Instruction Representation II. Agenda. Dealing With Large Immediates

Recursion I. CSE 120 Spring Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee

Intentionally Blank 0

Truth Table! Review! Use this table and techniques we learned to transform from 1 to another! ! Gate Diagram! Today!

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides

INFORMATION COMUNICATION TECHNOLOGY SKS Lecture Two

Components of a personal computer

15/09/15. Introduction to Computers & The Internet. Contents. Computer hardware and software. Input and output devices CPU. Memory.

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Introduction to Digital Logic

CS 61C: Great Ideas in Computer Architecture. MIPS Instruction Formats

EECE 321: Computer Organization

Basic Input and Output

Lecture Topics ECE 341. Lecture # 8. Functional Units. Information Processed by a Computer

CS61C : Machine Structures

CS1004: Intro to CS in Java, Spring 2005

SECTION 2 (Part B) Types And Components Of Computer Systems. Sophia Pratzioti

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

ECE 468 Computer Architecture and Organization Lecture 1

Technology in Action

UC Berkeley CS61C : Machine Structures

14:332:331. Week 13 Basics of Cache

CS61C Machine Structures. Lecture 13 - MIPS Instruction Representation I. 9/26/2007 John Wawrzynek. www-inst.eecs.berkeley.

Processor design - MIPS

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

14:332:331. Lecture 1

COMPUTER ORGANIZATION (CSE 2021)

Welcome to Part 3: Memory Systems and I/O

HARDWARE. There are a number of factors that effect the speed of the processor. Explain how these factors affect the speed of the computer s CPU.

CS 61C: Great Ideas in Computer Architecture. Direct Mapped Caches

Chapter 4. The Processor

Computer Architecture. Fall Dongkun Shin, SKKU

CS 351 Exam 2, Fall 2012

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

Computer Architecture and Assembly Language. Spring

CSC 220: Computer Organization Unit 12 CPU programming

Chapter 9: A Closer Look at System Hardware

Chapter 9: A Closer Look at System Hardware 4

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

ECE 486/586. Computer Architecture. Lecture # 7

CpE 442 Introduction To Computer Architecture Lecture 1

COMPUTER ORGANIZATION (CSE 2021)

Fundamentals of Programming Session 1

CS311 Lecture: The Architecture of a Simple Computer

Computer Basics/Algorithms

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Chapter 4 The Components of the System Unit

378: Machine Organization and Assembly Language

Information Science 1

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Chapter 4. The Processor

CS61C : Machine Structures

CISC 360. Computer Architecture. Seth Morecraft Course Web Site:

Agenda. CS 61C: Great Ideas in Computer Architecture. Virtual Memory II. Goals of Virtual Memory. Memory Hierarchy Requirements

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

CC411: Introduction To Microprocessors

CS/COE1541: Introduction to Computer Architecture

IC220 SlideSet #2: Instructions (Chapter 2)

Name: Date: Hour: The abacus (still in use today) is about 5,000 years old. Not a computer.

Introduction. Arizona State University 1

Computer Organization

CS 61c: Great Ideas in Computer Architecture

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

Clever Signed Adder/Subtractor. Five Components of a Computer. The CPU. Stages of the Datapath (1/5) Stages of the Datapath : Overview

In this lecture, we will look at how storage (or memory) works with processor in a computer system. This is in preparation for the next lecture, in

Chapter 1 Introduction. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 4. The Processor Designing the datapath

ENCM 369 Winter 2017 Lab 3 for the Week of January 30

CSE 410 Computer Systems. Hal Perkins Spring 2010 Lecture 12 More About Caches

Transcription:

Computers CSE 120 Spring 2017 Instructor: Justin Hsia Teaching Assistants: Anupam Gupta, Braydon Hall, Eugene Oh, Savanna Yee Steve Jobs custom Apple I and other historic machines are on display at Seattle museum In the earliest days of those early days, Steves Wozniak and Jobs made their first device together: the Apple I. Few of these were sold, and fewer still survive but the Living Computers museum in Seattle managed to get three. And one of them was Jobs personal machine. That s the mission of the museum, though: the Apple I, along with dozens of other ancient computers are deliberately there to be touched and, if not truly understood, at least experienced. https://techcrunch.com/2017/04/17/steve jobs custom apple i andother historic machines are on display at seattle museum/

Administrivia Assignments: Creativity Assignment (4/24) Reading Check 5 (4/27) Midterm in class on Wednesday (4/26) Bring 1 sheet of notes (2 sided, letter, handwritten) Fill in the blank(s), short answer questions, multiple choice Questions 1 7 on readings and big ideas (drop 2 lowest scores) [10 pt] Questions 8 10 on computational thinking (code: reading, writing, and debugging) [20 pt] Time is not your friend Short answers should be short Skip questions and come back later 2

Living Computers Museum Report Due Sunday, May 14 You have weeks 5 7 to complete Required to visit the Living Computers Museum in SODO 2245 1 st Avenue South, Seattle, WA 98134 Your admission has been paid for! (transportation is not) Lots of hands on exhibits involving old computers and modern gadgets and other big ideas from CSE120 We encourage you to visit in groups! Worksheet to complete after visit Involves some photos, a little bit of research, and some written responses 3

Outline Student Work Showcase Computer Components Computer Instructions Instruction Execution 4

Jumping Monster Aliakesi Zhuranko Jack Cummings 5

Outline Student Work Showcase Computer Components Computer Instructions Instruction Execution 6

Computers are Complex http://xkcd.com/676/ 7

Audience Responses What are different computer components you ve heard of? Hard drive RAM (memory) CPU (processor) Monitor Graphics Card Motherboard Keyboard Mouse Speakers Etc 8

Five Components of a Computer Control Datapath Memory Input Output Processor Control Computer Memory Devices Input Datapath Output 9

Input Devices that send information to the computer Examples we ve seen: Mouse Keyboard Ethernet cable/wireless card Other examples: Microphone External sensors Disk (read) 10

Output Devices that the computer sends information to Examples we ve seen: Monitor/graphics card Ethernet cable/wireless card Other examples: Speakers Printers Disk (write) 11

Memory Place for temporary data storage Typically random access memory (RAM) Data is lost when the computer loses power! Permanent storage goes to disk Needed by programs as they run Running out of available memory is typically what causes your computer to slow down 12

Central Processing Unit (CPU) The brain of the computer the circuitry that carries out the instructions Datapath all of the hardware components needed to handle all possible instructions Control the routing (decision making) that determines correct instruction execution Confusingly, modern CPUs contain multiple processors that can each run multiple processes simultaneously More on this in a later lecture 13

Computer Internals: Physical View USB, etc. CPU (empty slot) I/O controller Memory Storage connections 14

The Operating System Everything mentioned up to this point was hardware The piece of software that ties everything together and coordinates between hardware and software is the operating system (OS) It s a program, just like everything else, but more important The OS has special privileges The OS is heavily responsible for the security of your computer (programs and data) 15

Outline Student Work Showcase Computer Components Computer Instructions Instruction Execution 16

What Does an Instruction Look Like? Just like all other data on a computer, instructions are also just binary data! Example: 0x4801FE tells my computer to add one number to another Similar to x = x + y; An executable (program) contains the binary encoding of all of its instructions and data Plus some other information Hex view demo [see Panopto] 17

Limited Instructions The number and type of instructions is always limited The agent can only do certain pre defined actions In a computer, this is determined by the Instruction Set Architecture (ISA) The CPU and other hardware is designed to execute only these instructions 18

Types of Instructions 1) Perform arithmetic operation in the CPU c = a + b; z = x * y; i = h && g; 2) Control flow: what instruction to execute next Normally whatever instruction comes next in sequence Jump to function calls Possibly jump on conditional branches Possibly jump for loops 3) Transfer data between the CPU and memory Load data from memory into CPU Store CPU data into memory 19

How Can We Get Away With This? Most computation handled by CPU, but it can only hold a small amount of information at a time For reasons of cost and speed As needed, transfer data between CPU and Memory As an added trick, treat all Input and Output like memory CPU Memory Interconnection Bus Disks Net USB Etc. 20

Memory We can think of memory as a single, massive array Every memory entry is the same size (1 byte) Every memory entry has an index (memory address) and a value (data) If our computer instructions need to use data that is stored in memory, it can reference it by using the correct memory address Address (hex): Value (hex): A7 00 32 00 00 FA CE 26 F4 DE AD 96 Memory 21

Where are the Instructions? When a program is running, the instructions for that program are stored in memory Faster to read instructions from memory than from executable file on disk The CPU reads instructions for execution in the exact same way that it reads data from memory Take advantage of existing hardware 22

Generating Instructions Must learn how to specify complex tasks using just these simple actions In reality, this is often done automatically for us: Higher Level Language Program (e.g. Processing) Compiler Assembly Language Program (e.g. x86 64, MIPS) Assembler Machine Language Program (executable) temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) 0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111 23

Outline Student Work Showcase Computer Components Computer Instructions Instruction Execution 24

Instruction Execution The agent follows the instructions flawlessly and mindlessly A computer will follow the instructions given by a program and should produce identical results if given identical inputs The CPU knows where to find the next instruction using the program counter (PC) PC contains the address of the next instruction in memory PC gets updated after each instruction is executed, sometimes jumping around based on the program s control flow 25

Fetch Execute Cycle The most basic operation of a computer is to continually perform the following cycle: 1) Fetch the next instruction (read from memory) 2) Execute the instruction based on its purpose and specified data Furthermore, the Execution portion can be broken down into the following rough steps: 1) Instruction decode 2) Data fetch 3) Instruction computation 4) Store result Machine: 0x4801FE Assembly: add %rdi, %rsi 26

Arithmetic and Logic Unit (ALU) A special logic block that is part of the CPU and performs the arithmetic operations Performs the operations needed to cover all the instructions that the CPU can understand Typically limited to two operands, which restricts the overall instruction set 27

Computer Components Revisited 28

Clock Rate The rate at which your CPU can perform a Fetch Execute cycle Must make sure that clock speed is slow enough to accommodate the slowest instruction Clock rate is usually given in Hertz (Hz = second 1 ) Example: 2 GHz = one instruction every = Clock rate is not a good indicator of speed CPU must often wait for data from memory or I/O devices 29

Example: Running a Processing Program 1) The Processing environment compiles your code into machine language Your Processing code gets converted into machine code (just 0 s and 1 s) 2) When you run the program, memory is allocated for the program s instructions, variables, and data 3) Starting from the beginning (setup(), in this case), the computer will perform the Fetch Execute cycle Keeps going unless end of program is reached or an error is encountered before then 30