Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct. 2015 NYU.

Slides:



Advertisements
Similar presentations
Lecture 11 Oct 12 Circuits for floating-point operations addition multiplication division (only sketchy)
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Faculty of Computer Science © 2006 CMPUT 229 Floating Point Representation Operating with Real Numbers.
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Simple Data Type Representation and conversion of numbers
Data Representation – Binary Numbers
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Computer Architecture Lecture 3: Logical circuits, computer arithmetics Piotr Bilski.
3-1 Chapter 3 - Arithmetic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer Architecture.
Computing Systems Basic arithmetic for computers.
Computer Architecture
ECE232: Hardware Organization and Design
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Data Representation in Computer Systems
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
9.4 FLOATING-POINT REPRESENTATION
Figure 1.1 Block diagram of a digital computer. Functional Units.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
CSC 221 Computer Organization and Assembly Language
Lecture 12: Integer Arithmetic and Floating Point CS 2011 Fall 2014, Dr. Rozier.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Floating Point Arithmetic
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Computer Architecture Lecture 22 Fasih ur Rehman.
Lecture 2 Binary Arithmetic Topics Terminology Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement August 26, 2003 CSCE 211.
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
Computer Architecture Lecture 15 Fasih ur Rehman.
Computer Architecture Lecture Notes Spring 2005 Dr. Michael P. Frank Competency Area 4: Computer Arithmetic.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Number Representation and Arithmetic Circuits
Numbers in Computers.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
Computer Organization & Design 计算机组成与设计 Weidong Wang ( 王维东 ) College of Information Science & Electronic Engineering 信息与通信工程研究所 Zhejiang.
Floating Point Arithmetic – Part I
Array multiplier TU/e Processor Design 5Z032.
NxN Crossbar design for Barrel Shifter
Outline Introduction Floating Point Arithmetic Adder Multiplier.
Data Representation and Arithmetic Algorithms
The IEEE Floating Point Standard and execution units for it
How to represent real numbers
Multiprocessor & Multicomputer
Data Representation and Arithmetic Algorithms
Digital System Design II 数字系统设计2
The IEEE Floating Point Standard and execution units for it
Recent from Dr. Dan Lo regarding 12/11/17 Dept Exam
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU

Overflow (for two’s complement arithmetic) value too large to represent in (32-bit) word for addition, occurs when you add two positive numbers and get a negative result you add two negative numbers and get a positive result 10/13/15Computer Architecture lecture 112

Multiplication sequential circuit 10/13/15Computer Architecture lecture 113

Multiplication sequential circuit, shared register 10/13/15Computer Architecture lecture 114

Multiplication combinatorial circuit n rows of adders, one for each multiplier bit 10/13/15Computer Architecture lecture 115

Multiplication tree of adders 10/13/15Computer Architecture lecture 116

Multiplication carry save: carries propagated diagonally (see diagram with lecture notes) 10/13/15Computer Architecture lecture 117

Division Sequential circuit 10/13/15Computer Architecture lecture 118

Division Harder to speed up but programs don’t divide very often 10/13/15Computer Architecture lecture 119

Floating point representation: sign S, exponent E, and fraction F value = (-1) S × F × 2 E IEEE 754 floating-point standard standard sizes standard representations for 0, ∞, … makes floating code portable 10/13/15Computer Architecture lecture 1110 sizesize of E fieldsize of F field single precision32 bits8 bits23 bits double precision64 bits11 bits52 bits

Floating point addition Basic algorithm: 1.align decimal points 1.if exponents differ, adjust operand with smaller exponent so exponents are equal 2.add fractions 3.normalize result 10/13/15Computer Architecture lecture 1111

Floating point addition Example (decimal): 0.95 x x /13/15Computer Architecture lecture 1112

Floating point addition Example (decimal): 0.95 x x /13/15Computer Architecture lecture 1113

Floating point addition Example (decimal): 0.95 x x x /13/15Computer Architecture lecture 1114

Floating point addition Example (decimal): 0.95 x x x /13/15Computer Architecture lecture 1115

Floating point multiplication Basic algorithm: add exponents, multiply fractions 10/13/15Computer Architecture lecture 1116

Precision Why do we need such precision (particularly, double precision)? What do we measure so precisely? 10/13/15Computer Architecture lecture 1117