# CS61C L10 MIPS Instruction Representation II, Floating Point I (6)

Size: px
Start display at page:

Download "CS61C L10 MIPS Instruction Representation II, Floating Point I (6)"

## Transcription

5 CS61C L1 MIPS Instruction Representation II, Floating Point I (27) Other Numbers What about other numbers? Very large numbers? (seconds/century) 3,155,76, 1 ( x 1 9 ) Very small numbers? (atomic diameter).1 1 (1. 1 x 1-8 ) Rationals (repeating pattern) 2/3 ( ) Irrationals 2 1/2 ( ) Transcendentals e ( ), π ( ) All represented in scientific notation Scientific Notation (in Decimal) mantissa x 1 23 decimal point exponent radix (base) Normalized form: no leadings s (exactly one digit to left of decimal point) Alternatives to representing 1/1,,, Normalized: 1. x 1-9 Not normalized:.1 x 1-8,1. x 1-1 CS61C L1 MIPS Instruction Representation II, Floating Point I (28) Scientific Notation (in Binary) Floating Point Representation (1/2) mantissa exponent Normal format: +1.xxxxxxxxxx two *2 yyyy two Multiple of Word Size (32 bits) 1. two x 2-1 radix (base) binary point Computer arithmetic that supports it called floating point, because it represents numbers where the binary point is not fixed, as it is for integers Declare such variable in C as float S Exponent Significand 1 bit 8 bits 23 bits S represents Sign Exponent represents y s Significand represents x s Represent numbers as small as 2. x 1-38 to as large as 2. x 1 38 CS61C L1 MIPS Instruction Representation II, Floating Point I (29) CS61C L1 MIPS Instruction Representation II, Floating Point I (3) Floating Point Representation (2/2) What if result too large? (> 2.x1 38 ) Overflow! Overflow Exponent larger than represented in 8-bit Exponent field What if result too small? (>, < 2.x1-38 ) Underflow! Underflow Negative exponent larger than represented in 8-bit Exponent field How to reduce chances of overflow or underflow? Double Precision Fl. Pt. Representation Next Multiple of Word Size (64 bits) S Exponent Significand 1 bit 11 bits 2 bits Significand (cont d) 32 bits Double Precision (vs. Single Precision) C variable declared as double Represent numbers almost as small as 2. x 1-38 to almost as large as 2. x 1 38 But primary advantage is greater accuracy due to larger significand CS61C L1 MIPS Instruction Representation II, Floating Point I (31) CS61C L1 MIPS Instruction Representation II, Floating Point I (32)

6 CS61C L1 MIPS Instruction Representation II, Floating Point I (33) QUAD Precision Fl. Pt. Representation Next Multiple of Word Size (128 bits) Unbelievable range of numbers Unbelievable precision (accuracy) This is currently being worked on The current version has 15 bits for the exponent and 112 bits for the significand Oct-Precision? That s just silly! It s been implemented before IEEE 754 Floating Point Standard (1/4) Single Precision, DP similar Sign bit: 1 means negative means positive Significand: To pack more bits, leading 1 implicit for normalized numbers bits single, bits double always true: Significand < 1 (for normalized numbers) Note: has no leading 1, so reserve exponent value just for number CS61C L1 MIPS Instruction Representation II, Floating Point I (34) IEEE 754 Floating Point Standard (2/4) Kahan wanted FP numbers to be used even if no FP hardware; e.g., sort records with FP numbers using integer compares Could break FP number into 3 parts: compare signs, then compare exponents, then compare significands Wanted it to be faster, single compare if possible, especially if positive numbers Then want order: Highest order bit is sign ( negative < positive) Exponent next, so big exponent => bigger # Significand last: exponents same => bigger # IEEE 754 Floating Point Standard (3/4) Negative Exponent? 2 s comp? 1. x 2-1 v. 1. x2 +1 (1/2 v. 2) 1/ This notation using integer compare of 1/2 v. 2 makes 1/2 > 2! Instead, pick notation 1 is most negative, and is most positive 1. x 2-1 v. 1. x2 +1 (1/2 v. 2) 1/ CS61C L1 MIPS Instruction Representation II, Floating Point I (35) CS61C L1 MIPS Instruction Representation II, Floating Point I (36) IEEE 754 Floating Point Standard (4/4) Called Biased Notation, where bias is number subtract to get real number IEEE 754 uses bias of 127 for single prec. Subtract 127 from Exponent field to get actual value for exponent 123 is bias for double precision Summary (single precision): S Exponent Significand 1 bit 8 bits 23 bits (-1) S x (1 + Significand) x 2 (Exponent-127) Double precision identical, except with exponent bias of 123 CS61C L1 MIPS Instruction Representation II, Floating Point I (37) And in conclusion Floating Point numbers approximate values that we want to use. IEEE 754 Floating Point Standard is most widely accepted attempt to standardize interpretation of such numbers Every desktop or server computer sold since ~1997 follows these conventions Summary (single precision): S Exponent Significand 1 bit 8 bits 23 bits (-1) S x (1 + Significand) x 2 (Exponent-127) Double precision identical, bias of 123 CS61C L1 MIPS Instruction Representation II, Floating Point I (4)

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #10 Instruction Representation II, Floating Point I 2005-10-03 Lecturer PSOE, new dad Dan Garcia www.cs.berkeley.edu/~ddgarcia #9 bears

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 14 Introduction to MIPS Instruction Representation II Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia Are you P2P sharing fans? Two

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 14 Introduction to MIPS Instruction Representation II 2004-02-23 Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia In the US, who is

### I-Format Instructions (3/4) Define fields of the following number of bits each: = 32 bits

CS61C L10 MIPS Instruction Representation II (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #10 Instruction Representation II 2007-7-8 Review There are register calling conventions!

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures #16 Cal rolls over OSU Behind the arm of Nate Longshore s 341 yds passing & 4 TDs, the Bears roll 41-13. Recall they stopped our winning streak

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #11 Floating Point I 2008-7-9 Upcoming Programming Contests! http://www.icfpcontest.org/ 7/11-7/14 QuickTime and a TIFF (Uncompressed) decompressor

### EEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture

EEM 486: Computer Architecture Lecture 2 MIPS Instruction Set Architecture EEM 486 Overview Instruction Representation Big idea: stored program consequences of stored program Instructions as numbers Instruction

### CS61C - Machine Structures. Lecture 6 - Instruction Representation. September 15, 2000 David Patterson.

CS61C - Machine Structures Lecture 6 - Instruction Representation September 15, 2000 David Patterson http://www-inst.eecs.berkeley.edu/~cs61c/ 1 Review Instructions: add, addi, sub, lw, sw beq, bne, j

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 15 Floating Point I 2008-02-27 TA Ordinaire Dave Jacobs www.ocf.berkeley.edu/~djacobs Doomsday Seed Vault Opens The seed bank on a remote

### 95% of the folks out there are completely clueless about floating-point.

CS61C L15 Floating Point I (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 15 Floating Point I 28-2-27 TA Ordinaire Dave Jacobs www.ocf.berkeley.edu/~djacobs Doomsday Seed Vault Opens

### CS 61c: Great Ideas in Computer Architecture

MIPS Instruction Formats July 2, 2014 Review New registers: \$a0-\$a3, \$v0-\$v1, \$ra, \$sp New instructions: slt, la, li, jal, jr Saved registers: \$s0-\$s7, \$sp, \$ra Volatile registers: \$t0-\$t9, \$v0-\$v1, \$a0-\$a3

### Review. Lecture #9 MIPS Logical & Shift Ops, and Instruction Representation I Logical Operators (1/3) Bitwise Operations

CS6C L9 MIPS Logical & Shift Ops, and Instruction Representation I () inst.eecs.berkeley.edu/~cs6c CS6C : Machine Structures Lecture #9 MIPS Logical & Shift Ops, and Instruction Representation I 25-9-28

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

CS 61C: Great Ideas in Computer Architecture MIPS Instruction Representation II Guest Lecturer: Justin Hsia 2/11/2013 Spring 2013 Lecture #9 1 Review of Last Lecture Simplifying MIPS: Define instructions

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 15 Floating Point 2010-02-24! Hello to Robb Neuschwander listening from Louisville, KY!!!Lecturer SOE Dan Garcia!!!www.cs.berkeley.edu/~ddgarcia

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

CS 61C: Great Ideas in Computer Architecture MIPS Instruction Formats Instructors: Vladimir Stojanovic and Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/sp16 1 Machine Interpretation Levels of Representation/Interpretation

### Lecture 13: (Integer Multiplication and Division) FLOATING POINT NUMBERS

Lecture 13: (Integer Multiplication and Division) FLOATING POINT NUMBERS Lecture 13 Floating Point I (1) Fall 2005 Integer Multiplication (1/3) Paper and pencil example (unsigned): Multiplicand 1000 8

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

CS 61C: Great Ideas in Computer Architecture MIPS Instruction Formats Instructor: Justin Hsia 6/27/2012 Summer 2012 Lecture #7 1 Review of Last Lecture New registers: \$a0-\$a3, \$v0-\$v1, \$ra, \$sp Also: \$at,

### Computer Science 61C Spring Friedland and Weaver. Instruction Encoding

Instruction Encoding 1 Instruction Formats I-format: used for instructions with immediates, lw and sw (since offset counts as an immediate), and branches (beq and bne) since branches are "relative" to

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 13 Introduction to MIPS Instruction Representation I Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia Anyone seen Terminator? Military

### 3.5 Floating Point: Overview

3.5 Floating Point: Overview Floating point (FP) numbers Scientific notation Decimal scientific notation Binary scientific notation IEEE 754 FP Standard Floating point representation inside a computer

### UCB CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Guest Lecturer Alan Christopher Lecture 08 MIPS Instruction Representation I 2014-02-07 BOINC MORE THAN JUST SETI@HOME BOINC (developed here

### Lecture 9: Disassembly

Lecture 9: Disassembly CSE 30: Computer Organization and Systems Programming Winter 2010 Rajesh Gupta / Ryan Kastner Dept. of Computer Science and Engineering University of California, San Diego Instruction

### 95% of the folks out there are completely clueless about floating-point.

CS61C L11 Floating Point (1) Instructor Paul Pearce inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Well, not quite yet. A UC Davis student (shown left) is attempting to standardize hella

### UCB CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Instructor Paul Pearce Lecture 11 Floating Point 2010-07-08 Well, not quite yet. A UC Davis student (shown left) is attempting to standardize

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 13 MIPS Instruction Representation I New 160 Megapixel camera!! The Seitz 6 x 17 panorama camera sells for \$36K, and produces a 21,250 x

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

CS61C Machine Structures Lecture 13 - MIPS Instruction Representation I 9/26/2007 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS 61C L13 MIPS Instruction Representation

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures \$2M 3D camera Lecture 8 MIPS Instruction Representation I Instructor: Miki Lustig 2014-09-17 August 25: The final ISA showdown: Is ARM, x86, or

### Chapter Three. Arithmetic

Chapter Three 1 Arithmetic Where we've been: Performance (seconds, cycles, instructions) Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: Implementing

### CS 61C: Great Ideas in Computer Architecture. MIPS Instruc,on Representa,on II. Dan Garcia

CS 61C: Great Ideas in Computer Architecture MIPS Instruc,on Representa,on II Dan Garcia 1 Review of Last Lecture Simplifying MIPS: Define instruc?ons to be same size as data word (one word) so that they

### Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21

2.9 Communication with People: Byte Data & Constants Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21 32: space 33:! 34: 35: #...

### Floating Point Numbers. Lecture 9 CAP

Floating Point Numbers Lecture 9 CAP 3103 06-16-2014 Review of Numbers Computers are made to deal with numbers What can we represent in N bits? 2 N things, and no more! They could be Unsigned integers:

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

CS 61C: Great Ideas in Computer Architecture MIPS Instruction Formats Instructors: John Wawrzynek & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/fa15 1 Machine Interpretation Levels of Representation/Interpretation

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

Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

### CS61C Machine Structures. Lecture 12 - MIPS Procedures II & Logical Ops. 2/13/2006 John Wawrzynek. www-inst.eecs.berkeley.

CS61C Machine Structures Lecture 12 - MIPS Procedures II & Logical Ops 2/13/2006 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS 61C L12 MIPS Procedures II / Logical (1)

### CS 61C: Great Ideas in Computer Architecture Floating Point Arithmetic

CS 61C: Great Ideas in Computer Architecture Floating Point Arithmetic Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ New-School Machine Structures (It s a bit

### Unsigned Binary Integers

Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0

### Unsigned Binary Integers

Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0

### Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch

### ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department

### Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

Instructions: MIPS ISA Chapter 2 Instructions: Language of the Computer 1 PH Chapter 2 Pt A Instructions: MIPS ISA Based on Text: Patterson Henessey Publisher: Morgan Kaufmann Edited by Y.K. Malaiya for

### Topic Notes: MIPS Instruction Set Architecture

Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.

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

CS 61C: Great Ideas in Computer Architecture MIPS Instruction Formats Instructors: Bernhard Boser and Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/fa16 9/15/16 Fall 2016 - Lecture #7 1 Review: Basic

### Floating Point Arithmetic

Floating Point Arithmetic CS 365 Floating-Point What can be represented in N bits? Unsigned 0 to 2 N 2s Complement -2 N-1 to 2 N-1-1 But, what about? very large numbers? 9,349,398,989,787,762,244,859,087,678

### Review 1/2 MIPS assembly language instructions mapped to numbers in 3 formats. CS61C Negative Numbers and Logical Operations R I J.

CS61C Negative Numbers and Logical Operations cs 61C L7 Number.1 Lecture 7 February 10, 1999 Dave Patterson (http.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs61c/schedule.html Review 1/2

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #12 MIPS Instruction Rep III, Running a Program I aka Compiling, Assembling, Linking, Loading (CALL) 2005-0xA Lecturer PSOE, new dad Dan

### Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1

Chapter 3 MIPS Assembly Language Ó1998 Morgan Kaufmann Publishers 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive

### CS3350B Computer Architecture MIPS Instruction Representation

CS3350B Computer Architecture MIPS Instruction Representation Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada

### 101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009

101 Assembly ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 What is assembly? 79 Why are we learning assembly now? 80 Assembly Language Readings: Chapter 2 (2.1-2.6, 2.8, 2.9, 2.13, 2.15), Appendix

### Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Stored Program Concept nstructions: nstructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch &

### CS 61C: Great Ideas in Computer Architecture Performance and Floating Point Arithmetic

CS 61C: Great Ideas in Computer Architecture Performance and Floating Point Arithmetic Instructors: Bernhard Boser & Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/ 10/25/16 Fall 2016 -- Lecture #17

### Floating Point. The World is Not Just Integers. Programming languages support numbers with fraction

1 Floating Point The World is Not Just Integers Programming languages support numbers with fraction Called floating-point numbers Examples: 3.14159265 (π) 2.71828 (e) 0.000000001 or 1.0 10 9 (seconds in

### IEEE Standard 754 for Binary Floating-Point Arithmetic.

CS61C L11 Floating Point II (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #11 Floating Point II 2005-10-05 There is one handout today at the front and back of the room! Lecturer

### CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

### CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014

B CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014 DUE : March 3, 2014 READ : - Related sections of Chapter 2 - Related sections of Chapter 3 - Related sections of Appendix A - Related sections

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

Computer Science and Engineering 331 Midterm Examination #1 Fall 2000 Name: Solutions S.S.#: 1 41 2 13 3 18 4 28 Total 100 Instructions: This exam contains 4 questions. It is closed book and notes. Calculators

### Signed Multiplication Multiply the positives Negate result if signs of operand are different

Another Improvement Save on space: Put multiplier in product saves on speed: only single shift needed Figure: Improved hardware for multiplication Signed Multiplication Multiply the positives Negate result

### Lecture 4: MIPS Instruction Set

Lecture 4: MIPS Instruction Set No class on Tuesday Today s topic: MIPS instructions Code examples 1 Instruction Set Understanding the language of the hardware is key to understanding the hardware/software

### Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine

Machine Language Instructions Introduction Instructions Words of a language understood by machine Instruction set Vocabulary of the machine Current goal: to relate a high level language to instruction

### CS 110 Computer Architecture MIPS Instruction Formats

CS 110 Computer Architecture MIPS Instruction Formats Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides based

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

Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

### The MIPS Instruction Set Architecture

The MIPS Set Architecture CPS 14 Lecture 5 Today s Lecture Admin HW #1 is due HW #2 assigned Outline Review A specific ISA, we ll use it throughout semester, very similar to the NiosII ISA (we will use

### CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

### Outline. What is Performance? Restating Performance Equation Time = Seconds. CPU Performance Factors

CS 61C: Great Ideas in Computer Architecture Performance and Floating-Point Arithmetic Instructors: Krste Asanović & Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/fa17 Outline Defining Performance

### CS 61C: Great Ideas in Computer Architecture Performance and Floating-Point Arithmetic

CS 61C: Great Ideas in Computer Architecture Performance and Floating-Point Arithmetic Instructors: Krste Asanović & Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/fa17 10/24/17 Fall 2017-- Lecture

### CS3350B Computer Architecture MIPS Introduction

CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January

### Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

Instructions: Chapter 3 : MIPS Downloaded from: http://www.cs.umr.edu/~bsiever/cs234/ Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive

### MIPS (SPIM) Assembler Syntax

MIPS (SPIM) Assembler Syntax Comments begin with # Everything from # to the end of the line is ignored Identifiers are a sequence of alphanumeric characters, underbars (_), and dots () that do not begin

### Chapter 2. Instruction Set Architecture (ISA)

Chapter 2 Instruction Set Architecture (ISA) MIPS arithmetic Design Principle: simplicity favors regularity. Why? Of course this complicates some things... C code: A = B + C + D; E = F - A; MIPS code:

### ecture 25 Floating Point Friedland and Weaver Computer Science 61C Spring 2017 March 17th, 2017

ecture 25 Computer Science 61C Spring 2017 March 17th, 2017 Floating Point 1 New-School Machine Structures (It s a bit more complicated!) Software Hardware Parallel Requests Assigned to computer e.g.,

### Instructions: Language of the Computer

CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1 The Language a Computer Understands Word a computer understands: instruction

### Computer Architecture. The Language of the Machine

Computer Architecture The Language of the Machine Instruction Sets Basic ISA Classes, Addressing, Format Administrative Matters Operations, Branching, Calling conventions Break Organization All computers

### Computer Architecture

CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,

### ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design Lecture 15: Midterm 1 Review Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Basics Midterm to cover Book Sections (inclusive) 1.1 1.5

### CS 110 Computer Architecture MIPS Instruction Formats

CS 110 Computer Architecture MIPS Instruction Formats Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides based

### Review Reserve exponents, significands: Exponent Significand Object nonzero Denorm anything +/- fl. pt. # /- 255 nonzero NaN

CS61C L11 MPS nstruction ep, unning a Program (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #12 MPS nstruction ep, unning a Program aka Compiling, Assembling, Linking, Loading (CALL)

### CS222: MIPS Instruction Set

CS222: MIPS Instruction Set Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati 1 Outline Previous Introduction to MIPS Instruction Set MIPS Arithmetic's Register Vs Memory, Registers

### Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Introduction to the MIPS Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Introduction to the MIPS The Microprocessor without Interlocked Pipeline Stages

### CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 15 Floating Point!!Senior Lecturer SOE Dan Garcia!!!www.cs.berkeley.edu/~ddgarcia! UNUM, Float replacement? Dr. John Gustafson, Senior Fellow

### Review. Lecture #7 MIPS Decisions So Far...

CS61C L7 MIPS Decisions (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #7 MIPS Decisions 2005-09-21 There is one handout today at the front and back of the room! Lecturer PSOE, new

### COMPSCI 313 S Computer Organization. 7 MIPS Instruction Set

COMPSCI 313 S2 2018 Computer Organization 7 MIPS Instruction Set Agenda & Reading MIPS instruction set MIPS I-format instructions MIPS R-format instructions 2 7.1 MIPS Instruction Set MIPS Instruction

### UCB CS61C : Machine Structures

inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Instructor Paul Pearce Lecture 12 Instruction Format III and Compilation 2010-07-12 This week UCB will begin mailing genetic testing kits to

### Chapter 2: Instructions:

Chapter 2: Instructions: Language of the Computer Computer Architecture CS-3511-2 1 Instructions: To command a computer s hardware you must speak it s language The computer s language is called instruction

### CENG3420 Lecture 03 Review

CENG3420 Lecture 03 Review Bei Yu byu@cse.cuhk.edu.hk 2017 Spring 1 / 38 CISC vs. RISC Complex Instruction Set Computer (CISC) Lots of instructions of variable size, very memory optimal, typically less

### ECE 331 Hardware Organization and Design. Professor Jay Taneja UMass ECE - Discussion 5 2/22/2018

ECE 331 Hardware Organization and Design Professor Jay Taneja UMass ECE - jtaneja@umass.edu Discussion 5 2/22/2018 Today s Discussion Topics Program Concepts Floating Point Floating Point Conversion Floating

### ECE 486/586. Computer Architecture. Lecture # 7

ECE 486/586 Computer Architecture Lecture # 7 Spring 2015 Portland State University Lecture Topics Instruction Set Principles Instruction Encoding Role of Compilers The MIPS Architecture Reference: Appendix

### bits 5..0 the sub-function of opcode 0, 32 for the add instruction

CS2 Computer Systems note 1a Some MIPS instructions More details on these, and other instructions in the MIPS instruction set, can be found in Chapter 3 of Patterson and Hennessy. A full listing of MIPS

### ECE232: Hardware Organization and Design. Computer Organization - Previously covered

ECE232: Hardware Organization and Design Part 6: MIPS Instructions II http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Computer Organization

### 5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers

CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-2 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language

### Recap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011

CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-3 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language

### MIPS PROJECT INSTRUCTION SET and FORMAT

ECE 312: Semester Project MIPS PROJECT INSTRUCTION SET FORMAT This is a description of the required MIPS instruction set, their meanings, syntax, semantics, bit encodings. The syntax given for each instruction

### ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 Sources: Computer

### Programmable Machines

Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

### CS3350B Computer Architecture

CS3350B Computer Architecture Winter 2015 Lecture 4.1: MIPS ISA: Introduction Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted d from lectures on Computer Organization and Design, Patterson & Hennessy,

### Instructors: Randy H. Katz David A. PaHerson hhp://inst.eecs.berkeley.edu/~cs61c/fa10. Fall Lecture #6. Agenda

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Instructors: Randy H. Katz David A. PaHerson hhp://inst.eecs.berkeley.edu/~cs61c/fa10 Fall 2010 - - Lecture #6 1 Agenda Review Overflow

### Programmable Machines

Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

### Chapter 2. Instructions:

Chapter 2 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive e.g., MIPS Arithmetic Instructions We ll be working with

### MIPS%Assembly% E155%

MIPS%Assembly% E155% Outline MIPS Architecture ISA Instruction types Machine codes Procedure call Stack 2 The MIPS Register Set Name Register Number Usage \$0 0 the constant value 0 \$at 1 assembler temporary

### Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.

Today s topics CS/COE1541: Introduction to Computer Architecture MIPS operations and operands MIPS registers Memory view Instruction encoding A Review of MIPS ISA Sangyeun Cho Arithmetic operations Logic