Review for Midterm 1 CPSC 321 Computer Architecture Andreas Klappenecker.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Goal: Write Programs in Assembly
Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
1 CONSTRUCTING AN ARITHMETIC LOGIC UNIT CHAPTER 4: PART II.
Assembly Language II CPSC 321 Andreas Klappenecker.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
Computer Architecture CPSC 321 Andreas Klappenecker.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Computer Architecture CPSC 321 E. J. Kim. Overview Logical Instructions Shifts.
Arithmetic IV CPSC 321 Andreas Klappenecker. Any Questions?
1  2004 Morgan Kaufmann Publishers Chapter Three.
Arithmetic II CPSC 321 Andreas Klappenecker. Any Questions?
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
1 Chapter 4: Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture Assembly Language and.
Instruction Representation II (1) Fall 2005 Lecture 10: Instruction Representation II.
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
Review CPSC 321 Andreas Klappenecker. Administrative Issues Midterm is on October 12 Allen Parish’s help session Friday 10:15-12:15.
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
Arithmetic III CPSC 321 Andreas Klappenecker. Any Questions?
1 ECE369 Chapter 3. 2 ECE369 Multiplication More complicated than addition –Accomplished via shifting and addition More time and more area.
1  1998 Morgan Kaufmann Publishers Chapter Four Arithmetic for Computers.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
Chapter 3 Arithmetic for Computers. Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
CS 1 •This is Computer Science 1. •Who is Professor Adams?
1 Bits are just bits (no inherent meaning) — conventions define relationship between bits and numbers Binary numbers (base 2)
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
Chapter 4 The Von Neumann Model
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Basic History of Computing. Al-Khwarizmi written in 830, Hisab al-jabr w’al- muqabalathe al- jabr; in the title we get algebra developed the concept.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Computer Architecture And Organization UNIT-II General System Architecture.
Informationsteknologi Friday, September 28, 2007Computer Architecture I - Class 21 Today’s class More assembly language programming.
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
Small constants are used quite frequently (50% of operands) e.g., A = A + 5; B = B + 1; C = C - 18; Solutions? Why not? put 'typical constants' in memory.
Who invented the computer?
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
COMPUTER ORGANIZATION LECTURE 3: ISA YASSER MOHAMMAD.
Arithmetic-Logic Units. Logic Gates AND gate OR gate NOT gate.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
Lecture 16: 10/29/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
1 CPTR 220 Computer Organization Computer Architecture Assembly Programming.
Control Structures Computer Organization I 1 October 2009 © McQuain, Feng & Ribbens Conditional Control Structure if ( i < j ) goto A; else.
Computer System Design Lecture 3
Computer Arthmetic Chapter Four P&H.
Chapter 4 The Von Neumann Model
MIPS Coding Continued.
Chapter 4 The Von Neumann Model
Arithmetic Logical Unit
Computer Arithmetic Multiplication, Floating Point
MIPS Assembly.
MIPS Coding Continued.
CS334: MIPS language _Mars simulator Lab 2_1
7/6/
MIPS instructions.
Chapter 4 The Von Neumann Model
Dr. Clincy Professor of CS
Presentation transcript:

Review for Midterm 1 CPSC 321 Computer Architecture Andreas Klappenecker

Administrative Issues Office hours have been moved: Wednesday October 15 and 22 canceled Thursday October 16 and 2:00pm- 3:00pm Talk by Bjarne Stroustrup 4:10pm, HRBB 124

Reading Assignments Chapter 1,2,3,4, Appendix B How does the algorithm work? What is the complexity of the algorithm? Work some examples Get familiar with number representations Assembly programming, the gory details Combinatorial circuits Read keyword list first, then the chapter

Early History 1938 Zuse’s Z1 electromechanical, experimental Zuse’s Z2 almost identical to Z Zuse’s Z3 first reliable, freely programmable computer memory based on relays did not have stored program concept Turing-complete

Early History Mark 1 Colossus memory based on vacuum tubes special purpose machine, not Turing complete but it had some flexibility used in Bletchley Park to break the fish cipher

Early History 1944 Harvard Mark I by Aiken and team decimal number system memory based on relays 1945 ENIAC by Eckert and Mauchly memory based on vacuum tubes 1945 von Neumann et al. introduce the stored program principle incorporated in EDVAC design

Questions How was the memory of xyz realized? Was xyz Turing-complete? Who designed xyz? …

MIPS Assembly Language Complete a template program What does the code fragment do? Stack usage for recursive procedures know every nut, bolt and screw slightly different skills needed Know your [pseudo]instructions Is blt a,b,c an instruction?

MIPS Addressing Modes Immediate addressing Register addressing Base displacement addressing PC-relative addressing address is the sum of the PC and a constant in the instruction Pseudo-direct addressing jump address is 26bits of instruction concatenated with upper bits of PC

Addressing Modes Register Addressing add $s1, $s2, $s3 $s1 = $s2 + $s3 Immediate Addressing addi $s1, $s2, 100 $s1 = $s

Addressing Modes Base addressing lw $s1, 100($s2) $s1 = Memory[$s2+100] PC-relative branch beq $s1, $s2, 25 if ($s1 == $s2) goto PC

Addressing Modes Pseudo-direct addressing j 1000 goto 1000 concatenate 26bit address with upper bits of the PC Study section 3.8 for further details In particular, get used to Figure 3.18

Arithmetic Know how to add and subtract Know when overflow occurs Be able to construct an ALU or something like that Carry lookahead

Idea of Carry Lookahead c in a b c out s c out =ab+c in (a xor b) =ab+ac in +bc in =ab+(a+b)c in = g + p c in Generate g = ab Propagate p = a+b

Carry Lookahead Iterate the idea, generate and propagate c i+1 = g i + p i c i = g i + p i (g i-1 + p i-1 c i-1 ) = g i + p i g i-1 + p i p i-1 c i-1 = g i + p i g i-1 + p i p i-1 g i-2 +…+ p i p i-1 …p 1 g 0 +p i p i-1 …p 1 p 0 c 0 Two level AND-OR circuit Carry is known early!

Booth’s Multiplication Looking at 2 bits of multiplier If the bits are 00 => do nothing 10 => beginning run of 1’s: subtract 01 => end of run of 1’s: add 11 => do nothing

Booth’s Multiplication Multiply 0010 by 0110 = sub [= add ] add [= add ]

Floating Point Know the IEEE 754 representation sign bit s exponent E with 8 bits significand S with 23 bits bias 127 (-1) s x (1+S)x2 (E-127) Given: 32 bits, interpret Know all conversions

Final Remarks Use exercises at end of chapter to check knowledge Answers are usually easy to figure out with the help of the text Do not cheat! Read the text carefully, then attempt to solve the problems Appendices A and B are useful bedtime reading There is a need for speed!