ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.

Slides:



Advertisements
Similar presentations
Radix Conversion Given a value X represented in source system with radix  s, represent the same number in a destination system with radix  d Consider.
Advertisements

CENG536 Computer Engineering Department Çankaya University.
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
Assembly Language and Computer Architecture Using C++ and Java
Copyright 2008 Koren ECE666/Koren Part.1.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
Assembly Language and Computer Architecture Using C++ and Java
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Number Systems and Arithmetic
Number Systems Lecture 02.
Fixed-Point Negative Numbers Two Common Forms: 1.Signed-Magnitude Form 2.Complement Forms Signed-Magnitude Numbers First Digit is Sign Digit, Remaining.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Simple Data Type Representation and conversion of numbers
Number Systems - Part II
ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.
Data Representation – Binary Numbers
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
General Fixed Radix Number Systems Nonredundant Positive radix, ß n digits in digit set Vector:
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic.
Part.7.1 Copyright 2007 Koren & Krishna, Morgan-Kaufman FAULT TOLERANT SYSTEMS Part 7 - Coding.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
Lecture Overview Introduction Positional Numbering System
ECE232: Hardware Organization and Design
Chapter 8 Problems Prof. Sin-Min Lee Department of Mathematics and Computer Science.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
Number Representation Part 1 Fixed-Radix Unsigned Representations ECE 645: Lecture 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
Topic 1 – Number Systems. What is a Number System? A number system consists of an ordered set of symbols (digits) with relations defined for addition,
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
FAMU-FSU College of Engineering 1 Part III The Arithmetic/Logic Unit.
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
Introduction To Number Systems Binary System M. AL-Towaileb1.
IT1004: Data Representation and Organization Negative number representation.
CO5023 Introduction to Digital Circuits. What do we know so far? How to represent numbers (integers and floating point) in binary How to convert between.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
FAMU-FSU College of Engineering 1 Computer Architecture EEL 4713/5764, Spring 2006 Dr. Michael Frank Module #9 – Number Representations.
Recursive Architectures for 2DLNS Multiplication RESEARCH CENTRE FOR INTEGRATED MICROSYSTEMS - UNIVERSITY OF WINDSOR 11 Recursive Architectures for 2DLNS.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Number Representation Part 1 ECE 645: Lecture 4. Required Reading Chapter 1, Numbers and Arithmetic, Sections Chapter 2, Representing Signed Numbers.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
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.
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 6 Overview Number Systems and Radix Conversion Fixed point.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Binary Numbers The arithmetic used by computers differs in some ways from that used by people. Computers perform operations on numbers with finite and.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
CS2100 Computer Organisation
Chapter 2 Binary Number Systems.
Introduction To Number Systems
Addition and Subtraction
UNIVERSITY OF MASSACHUSETTS Dept
Digital Logic and Computer Organization
Number Systems and Binary Arithmetic
CS1010 Programming Methodology
Topic 3d Representation of Real Numbers
Data Representation Data Types Complements Fixed Point Representation
Data Representation in Computer Systems
Digital Systems and Binary Numbers
Prof. Giancarlo Succi, Ph.D., P.Eng.
Arithmetic Logic Unit A.R. Hurson Electrical and Computer Engineering Missouri University of Science & Technology A.R. Hurson.
Topic 3d Representation of Real Numbers
Introduction To Number Systems
Presentation transcript:

ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation Part 2: Addition/Subtraction Part 3: Multiplication Part 4: Division Part 5: Real Arithmetic (Floating-Point) Part 6: Function Evaluation Part 7: Implementation Topics

Course Learning Objectives Computer Arithmetic students will be able to explain the relative merits of number systems used by arithmetic circuits including both fixed- and floating-point number systems 2. demonstrate the use of key acceleration algorithms and hardware for addition/subtraction, multiplication, and division, plus certain functions 3. distinguish between the relative theoretical merits of the different acceleration schemes

Course Learning Objectives (Continued) 4. identify the implementation limitations constraining the speed of acceleration schemes 5. evaluate, design, and optimize arithmetic circuits for low-power 6. evaluate, design, and optimize arithmetic circuits for precision

Course Learning Objectives (Continued) 7. design, simulate, and evaluate an arithmetic circuit using appropriate references including current journal and conference literature 8. write a paper compatible with journal format standards on an arithmetic design 9. make a professional presentation with strong technical content and audience interaction

Importance of Computer Arithmetic 3.2 GHz Pentium has a clock cycle of 0.31 ns Can one integer addition be done < 0.31 ns in execution stage of Pipeline? What if you had to build a 32-bit adder – ripple carry and a gate delay was approximately 0.1 ns? STEP Note: added from right to left. Why?

Ripple-carry Structure STEP 2 – Design a circuit c 32 z 31 z1z1 z0z0 c 31 c2c2 c1c1 c 0 =0 x 31 y 31 x1x1 y1y1 x0x0 y0y0 – Each box is a full-adder – Implement it

Full-Adder Implementation xy c in xy c in c out = c in x + c in y + x y

Adder Circuit Analysis STEP 3 – Analysis Critical Path is carry chain, 2 gate delays/bit 2  32 = 64 (64)(0.1ns) = 6.4ns 6.4ns >> 0.31ns Must Use Faster Adder and/or Pipeline More!!!!

Number Systems Roman Numeral System Symbolic DigitsRULES: If symbol is repeated or lies to the right of another higher-valued symbol, value is additive XX=10+10=20 CXX= =120 If symbol is repeated or lies to the left of a higher-valued symbol, value is subtractive XXC = - (10+10) = 80 XLVIII = -(10) = 48

Weighted Positional Number System Example: Arabic Number System (first used by Chinese)

Addition Paradigms right to left serial right to left, parallel random

Binary Number System n-ordered sequence: each x i  {0,1} is a BInary digiT (BIT) magnitude of n is important sequence is a short-hand notation more precise definition is: This is a radix-polynomial form

Number System A Number System is defined if the following exist Example: The binary number system Addition operator defined by addition table 4.Multiplication operator defined by multiplication table 1. A digit set 2.A radix or base value 3.An addition operation 4.A multiplication operation

Number System Observations Cardinality of digit set (2) is equal to radix value Addition operator XOR, Multiplication is AND How many integers exist? Mathematically, there are an infinite number,  In computer, finite range due to register length smallest representable number largest representable number range of representable numbers [-inclusive; (-exclusive interval bounds When ALU produces a result >Xmax or <Xmin, incorrect result occurs ALU should produce an error signal

Example Assume 4-bit registers, unsigned binary numbers Answer in register is =3 10 Overflow

Machine Representations Most familiar number systems are: 1.nonredundant – every value is uniquely represented by a radix polynomial 2.weighted – sequence of weights determines the value of the n-tuple formed from the digit set 3.positional – w i depends only on position i 4.conventional number systems where ß is a constant. These are fixed-radix systems.

Example Since octal is fixed-radix and positional, we can rewrite this value using shorthand notation Note the importance of the use of 0 to serve as a coefficient of the weight value w 2 =8 2

Fixed-Radix Systems Register of length n can represent a number with a fractional part and an integral part k – number of integral digits m – number of fractional digits n = k + m radix point A programmer can use an implied radix point in any position

Scaling Factors Fixed point arithmetic can utilize scaling factors to adjust radix point position a – scaling factor no correction must divide by a must multiply by a

Unit in the Last Position (ulp) Given w 0 =r -m and n, the position of the radix point is determined Simpler to disregard position of the radix point in fixed point by using unit in least (significant) position ulp For fractions For integers Example ulp = 1  = ulp is the smallest amount a fixed point number may increase or decrease ulp = 1

Radix Conversion Given a number in old radix r, conversion to the new radix R representation - can be accomplished doing the arithmetic in the old or new radix - old and new representations may not be exactly equal

Radix Conversion Given a value X represented in source system with radix  s, represent the same number in a destination system with radix  d Consider the integral part of the number, X I, in the  d system Can Repeatedly Divide to Obtain Converted Value Consider the integral part of the number, X I, in the  d system If X I is divided by  d, we obtain x 0 as a remainder and quotient

Radix Conversion Example X I =  s =10  d =3 Fixed-point Decimal to Ternary Integer Conversion, (arithmetic in old radix) Check by evaluating the radix polynomial X I =

Radix Conversion (fractional) Consider the fractional part of the value in  d Fixed point system Thus, P I is the desired digit We can repeatedly multiply by the  d value

Radix Conversion Example X I =  s =10  d =5 Fixed-point Decimal to Pentary Fractional Conversion (arithmetic in old radix) is Finite Fraction for  s =10, but infinite fraction for  d =5