Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure!

Size: px
Start display at page:

Download "Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure!"

Transcription

1 c 10 =0 c 9 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 10 =1 c 9 =1 c 8 =1 c 7 =0 c 6 =1 c 5 =1 c 4 =1 c 8 =1 c 7 =1 c 6 =0 c 5 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 8 =1 c 7 =1 c 6 =1 c 5 =0 c 4 =1 b 7 =0 b 6 =0 b 5 =0 b 4 =0 b 3 =1 b 2 =1 b 1 =1 b 0 =0 c 7 =1 c 6 =1 c 5 =1 c 7 =0 c 6 =0 c 5 =1 ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure! PROBLEM 1 (10 PTS) Calculate the result of the additions and subtractions for the following fixed-point numbers UNSIGNED SIGNED UNSIGNED: SIGNED: PROBLEM 2 (10 PTS) Multiply the following signed fixed-point numbers: x x x x x x Instructor: Daniel Llamocca

2 x x x x x x PROBLEM 3 (15 PTS) Get the division result (with x = 4 fractional bits ) for the following signed fixed-point numbers: : To unsigned and then alignment, a = 6: Append x = 4 zeros: Integer Division: = = = Q = , R = Qf = (x = 4) Final result (2C): = : To unsigned and then alignment, a = 6: = = Append x = 4 zeros: Integer Division: Q = 10, R = 1110 Qf = 10.(x = 4) Final result (2C): = : To unsigned (denominator) and then alignment, a = 3: = Append x = 4 zeros: Integer Division: Q = , R = 10 Qf = (x = 4) Final result (2C): = 2C( ) = Instructor: Daniel Llamocca

3 : To unsigned (denominator) and then alignment, a = 6: Append x = 4 zeros: Integer Division: Q = 100, R = Qf = (x = 4) Final result (2C): = 0.01 = PROBLEM 4 (5 PTS) We want to represent numbers between and 179. What is the fixed point format that requires the fewest number of bits for a resolution better or equal than ? 2C representation for integers: 2 n 1 to 2 n 1 1. For 2 n , we have that n 9, so we pick n = 9. For the fractional part, we select the number of fractional bits p that make the resolution better or equal than : Then the Fixed Point format required in [20 11]. 2 p p p = 11 PROBLEM 5 (10 PTS) Complete the table for the following floating point formats (which resemble the IEEE-754 standard) with 16, 24, 48 bits. Only consider ordinary numbers. Exponent Significant bits (E) bits (p) Min Max Range of e Range of significand [ 30,31] [1, ] [ 62,63] [1, ] [ 510,511] [1, ] PROBLEM 6 (20) Calculate the decimal values of the following floating point numbers represented as hexadecimals. Show your procedure. Single (32 bits) Double (64 bits) F DECADE FDEAD378 3DE ABBAA FACEB0E8 7FF32B5A ACCEDE78 FA09D3784D089B7D 80DEADBEE D3787F FA0BEBE80BEEF0A FDB FA09D37809ABC0DE FF ABC0DE DECAFC0FFEE00800 F : e + bias = = 240 e = = 113 Mantissa ([24 23]) = = X = = DECADE: e + bias = = 1 e = = 126 Mantissa = = X = = FDEAD378: e + bias = 1111 = 251 e = = 124 Mantissa = = X = = DE38866: e + bias = 0111 = 123 e = = 4 Mantissa = = X = = Instructor: Daniel Llamocca

4 800ABBAA: e + bias = = 0 Denormal number e = 126 Mantissa = = X = = FACEB0E8: e + bias = = 245 e = = 118 Mantissa = = X = = FF32B5A: e + bias = = 255, f 0 X = NaN ACCEDE78: e + bias = 0001 = 89 e = = 38 Mantissa = = X = = FA09D3784D089B7D: e + bias = = 1952 e = = 929 Mantissa ([53 52]) = = X = = DEADBEE : e + bias = = 13 e = = 1010 Mantissa = = X = = D3787F888800: e + bias = = 0 Denormal number e = 1022 Mantissa = = X = = FA0BEBE80BEEF0A0: e + bias = = 1952 e = = 929 Mantissa = = X = = FDB: e + bias = = 1175 e = = 152 Mantissa = = X = = FA09D37809ABC0DE: e + bias = = 1952 e = = 929 Mantissa = = X = = FF ABC0DE: e + bias = = 2040 e = = 1017 Mantissa = = X = = DECAFC0FFEE00800: e + bias = 100 = 1516 e = = 493 Mantissa = = X = = Instructor: Daniel Llamocca

5 PROBLEM 7 (30) Calculate the result of the following operations with 32-bit floating point numbers. Truncate the results when required. When doing fixed-point division, use 8 fractional bits. Show your procedure. FA FF800FAD CA09D F800FEA + 09ABC0DE 5A09D FDB FC09D F DE32B5A FF DE D959 FA09D378-09ABC0DE FA09D300 4D FE FA09DF00 7F A09D300 0BEEF ABC0DE FF FE0000 FA09D X = FA FF800FAD: FF800FAD: e + bias = = 255, f 0 FF800FAD = NaN X = # + NaN = NaN X = 7F800FEA + 09ABC0DE: 7F800FEA: e + bias = = 255, f 0 7F800FEA = NaN X = NaN + # = NaN X = FC09D F800000: 7F800000: e + bias = = 255, f = 0 7F = + X = # + = + X = 3DE D959: 3DE38866: e + bias = 0111 = 123 e = = 4 Mantissa = DE38866 = D959: e + bias = 01 = 102 e = = 25 Mantissa = D959 = X = X = X = X = = = X = = 3DE3886A X = CA09D : CA98D378: e + bias = = 148 e = = 21 Mantissa = DE38866 = : e + bias = = 0 Denormal number e = = 0 X = = X = = CA09D378 X = 5A09D FDB: 5A09D378: e + bias = 0100 = 180 e = = 53 Mantissa = A09D378 = Instructor: Daniel Llamocca

6 40490FDB: e + bias = = e = = 1 Mantissa = FDB = X = X = The division by 2 52 requires more than p + 1 = 24 bits for proper representation. Thus, we approximate the second operand by 0. X = = X = = 5A09D378 X = 7DE32B5A FF800000: FF800000: e + bias = = 255, f = 0 FF = X = # ( ) = + X = 7F X = FA09D378 09ABC0DE: FA09D378: e + bias = = 244 e = = 117 Mantissa = FA09D378 = ABC0DE: e + bias = = 19 e = = 108 Mantissa = ABC0DE = X = X = The division by requires more than p + 1 = 24 bits for proper representation. Thus, we approximate the second operand by 0. X = = X = = FA09D378 X = FA09D300 4D080000: FA09D300: e + bias = = 244 e = = 117 Mantissa = FA09D300 = D080000: e + bias = 10 = 154 e = = 27 Mantissa = D = X = X = e + bias = = 271 > 254 In this case, there is an overflow. The value X is assigned to. X = = FF X = FE: : e + bias = = 0 Denormal number e = = 0 X = 0 # = 0 X = Instructor: Daniel Llamocca

7 X = FA09DF00 7F800000: 7F800000: e + bias = = 255, f = 0 7F = + X = ( #) = X = = FF X = 7A09D300 0BEEF000: 7A09D300: e + bias = = 244 e = = 117 Mantissa = A09D300 = BEEF000: e + bias = 0001 = 23 e = = 104 Mantissa = BEEF000 = X = X = = = e + bias = = 141 = X = = 4680A35F (four bits were truncated) X = : : e + bias = = 146 e = = 19 Mantissa = = : e + bias = = 128 e = = 1 Mantissa = BEEF000 = X = Alignment: = = Append x = 8 zeros: Integer division Q = 110, R = Qf = Thus: X = = = = e + bias = = 145 = X = = 489B0000 X = ABC0DE: : e + bias = = 0 Denormal number e = = 0 X = 0 # = 0 X = Instructor: Daniel Llamocca

8 X = FF FE0000: FF800000: e + bias = = 255, f = 0 FF = X = # = X = FF X = FA09D FA09D300: e + bias = = 244 e = = 117 Mantissa = FA09D300 = : e + bias = = 144 e = = 17 Mantissa = = X = Alignment: = = Append x = 8 zeros: Integer division Q = , R = Qf = Thus: X = = = = = e + bias = = 226 = X = = F Instructor: Daniel Llamocca

Binary Floating-Point Numbers

Binary Floating-Point Numbers Binary Floating-Point Numbers S exponent E significand M F=(-1) s M β E Significand M pure fraction [0, 1-ulp] or [1, 2) for β=2 Normalized form significand has no leading zeros maximum # of significant

More information

Unit 1 - Computer Arithmetic

Unit 1 - Computer Arithmetic FIXD-POINT (FX) ARITHMTIC Unit 1 - Comuter Arithmetic INTGR NUMBRS n bit number: b n 1 b n 2 b 0 Decimal Value Range of values UNSIGND n 1 SIGND D = b i 2 i D = 2 n 1 b n 1 + b i 2 i n 2 i=0 i=0 [0, 2

More information

How do computers represent numbers?

How do computers represent numbers? How do computers represent numbers? Tips & Tricks Week 1 Topics in Scientific Computing QMUL Semester A 2017/18 1/10 What does digital mean? The term DIGITAL refers to any device that operates on discrete

More information

Chapter 1 Error Analysis

Chapter 1 Error Analysis Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of

More information

Chapter 1: Introduction and mathematical preliminaries

Chapter 1: Introduction and mathematical preliminaries Chapter 1: Introduction and mathematical preliminaries Evy Kersalé September 26, 2011 Motivation Most of the mathematical problems you have encountered so far can be solved analytically. However, in real-life,

More information

Conversions between Decimal and Binary

Conversions between Decimal and Binary Conversions between Decimal and Binary Binary to Decimal Technique - use the definition of a number in a positional number system with base 2 - evaluate the definition formula ( the formula ) using decimal

More information

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin

More information

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri MATH 1101 haalshehri@ksu.edu.sa 1 Introduction To Number Systems First Section: Binary System Second Section: Octal Number System Third Section: Hexadecimal System 2 Binary System 3 Binary System The binary

More information

Number Representation and Waveform Quantization

Number Representation and Waveform Quantization 1 Number Representation and Waveform Quantization 1 Introduction This lab presents two important concepts for working with digital signals. The first section discusses how numbers are stored in memory.

More information

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Numbering Systems Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Addition & Subtraction using Octal & Hexadecimal 2 s Complement, Subtraction Using 2 s Complement.

More information

Divider Implementation

Divider Implementation c n = cn-= LCTRICAL AD COTR GIRIG DPARTT, OAKLAD UIVRSITY RCRLA@OU ALGORITH Divider Implementation The division of two unsigned integer numbers A (where A is the dividend and the divisor), results in a

More information

Chapter 4 Number Representations

Chapter 4 Number Representations Chapter 4 Number Representations SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 9, 2016 Table of Contents 1 Fundamentals 2 Signed Numbers 3 Fixed-Point

More information

Introduction CSE 541

Introduction CSE 541 Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters

More information

Scientific Notation. Chemistry Honors

Scientific Notation. Chemistry Honors Scientific Notation Chemistry Honors Used to easily write very large or very small numbers: 1 mole of a substance consists of 602,000,000,000,000,000,000,000 particles (we ll come back to this in Chapter

More information

Cs302 Quiz for MID TERM Exam Solved

Cs302 Quiz for MID TERM Exam Solved Question # 1 of 10 ( Start time: 01:30:33 PM ) Total Marks: 1 Caveman used a number system that has distinct shapes: 4 5 6 7 Question # 2 of 10 ( Start time: 01:31:25 PM ) Total Marks: 1 TTL based devices

More information

ALU (3) - Division Algorithms

ALU (3) - Division Algorithms HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)

More information

ECE 372 Microcontroller Design

ECE 372 Microcontroller Design Data Formats Humor There are 10 types of people in the world: Those who get binary and those who don t. 1 Information vs. Data Information An abstract description of facts, processes or perceptions How

More information

Chapter 4: Radicals and Complex Numbers

Chapter 4: Radicals and Complex Numbers Section 4.1: A Review of the Properties of Exponents #1-42: Simplify the expression. 1) x 2 x 3 2) z 4 z 2 3) a 3 a 4) b 2 b 5) 2 3 2 2 6) 3 2 3 7) x 2 x 3 x 8) y 4 y 2 y 9) 10) 11) 12) 13) 14) 15) 16)

More information

Unit 1 Part 1: Significant Figures and Scientific Notation. Objective understand significant figures and their rules. Be able to use scientific

Unit 1 Part 1: Significant Figures and Scientific Notation. Objective understand significant figures and their rules. Be able to use scientific Unit 1 Part 1: Significant Figures and Scientific Notation. Objective understand significant figures and their rules. Be able to use scientific notation in calculations. Significant figures - consist of

More information

ENGIN 112 Intro to Electrical and Computer Engineering

ENGIN 112 Intro to Electrical and Computer Engineering ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems Overview Hexadecimal numbers Related to binary and octal numbers Conversion between hexadecimal, octal and binary Value

More information

Notes for Chapter 1 of. Scientific Computing with Case Studies

Notes for Chapter 1 of. Scientific Computing with Case Studies Notes for Chapter 1 of Scientific Computing with Case Studies Dianne P. O Leary SIAM Press, 2008 Mathematical modeling Computer arithmetic Errors 1999-2008 Dianne P. O'Leary 1 Arithmetic and Error What

More information

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460

Arithmetic and Error. How does error arise? How does error arise? Notes for Part 1 of CMSC 460 Notes for Part 1 of CMSC 460 Dianne P. O Leary Preliminaries: Mathematical modeling Computer arithmetic Errors 1999-2006 Dianne P. O'Leary 1 Arithmetic and Error What we need to know about error: -- how

More information

Ex code

Ex code Ex. 8.4 7-4-2-1 code Codeconverter 7-4-2-1-code to BCD-code. When encoding the digits 0... 9 sometimes in the past a code having weights 7-4-2-1 instead of the binary code weights 8-4-2-1 was used. In

More information

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1 RADIX r NUMBER SYSTEM Let (N) r be a radix r number in a positional weighting number system, then (N) r = d n 1 r n 1 + + d 0 r 0 d 1 r 1 + + d m r m where: r = radix d i = digit at position i, m i n 1

More information

Complement Arithmetic

Complement Arithmetic Complement Arithmetic Objectives In this lesson, you will learn: How additions and subtractions are performed using the complement representation, What is the Overflow condition, and How to perform arithmetic

More information

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,

More information

DIVIDER IMPLEMENTATION

DIVIDER IMPLEMENTATION c n = cn-= DAIL LLAOCCA CLab@OU DIVID IPLTATIO The division of two unsigned integer numbers A (where A is the dividend and the divisor), results in a quotient and a residue. These quantities are related

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Data Representation & 2 s Complement James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Data

More information

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation 4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL

More information

Chapter 8: Solutions to Exercises

Chapter 8: Solutions to Exercises 1 DIGITAL ARITHMETIC Miloš D. Ercegovac and Tomás Lang Morgan Kaufmann Publishers, an imprint of Elsevier Science, c 2004 with contributions by Fabrizio Lamberti Exercise 8.1 Fixed-point representation

More information

MATH ASSIGNMENT 03 SOLUTIONS

MATH ASSIGNMENT 03 SOLUTIONS MATH444.0 ASSIGNMENT 03 SOLUTIONS 4.3 Newton s method can be used to compute reciprocals, without division. To compute /R, let fx) = x R so that fx) = 0 when x = /R. Write down the Newton iteration for

More information

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems Menu Review of number systems >Binary math >Signed number systems Look into my... 1 Our decimal (base 10 or radix 10) number system is positional. Ex: 9437 10 = 9x10 3 + 4x10 2 + 3x10 1 + 7x10 0 We have

More information

Name: Chapter 7: Exponents and Polynomials

Name: Chapter 7: Exponents and Polynomials Name: Chapter 7: Exponents and Polynomials 7-1: Integer Exponents Objectives: Evaluate expressions containing zero and integer exponents. Simplify expressions containing zero and integer exponents. You

More information

CSE 241 Digital Systems Spring 2013

CSE 241 Digital Systems Spring 2013 CSE 241 Digital Systems Spring 2013 Instructor: Prof. Kui Ren Department of Computer Science and Engineering Lecture slides modified from many online resources and used solely for the educational purpose.

More information

Section 3 Using Scientific Measurements. Look at the specifications for electronic balances. How do the instruments vary in precision?

Section 3 Using Scientific Measurements. Look at the specifications for electronic balances. How do the instruments vary in precision? Lesson Starter Look at the specifications for electronic balances. How do the instruments vary in precision? Discuss using a beaker to measure volume versus using a graduated cylinder. Which is more precise?

More information

Mathematical preliminaries and error analysis

Mathematical preliminaries and error analysis Mathematical preliminaries and error analysis Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan September 12, 2015 Outline 1 Round-off errors and computer arithmetic

More information

Lecture 7. Floating point arithmetic and stability

Lecture 7. Floating point arithmetic and stability Lecture 7 Floating point arithmetic and stability 2.5 Machine representation of numbers Scientific notation: 23 }{{} }{{} } 3.14159265 {{} }{{} 10 sign mantissa base exponent (significand) s m β e A floating

More information

What Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract

What Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract What Every Programmer Should Know About Floating-Point Arithmetic Last updated: November 3, 2014 Abstract The article provides simple answers to the common recurring questions of novice programmers about

More information

Chapter 1 Mathematical Preliminaries and Error Analysis

Chapter 1 Mathematical Preliminaries and Error Analysis Chapter 1 Mathematical Preliminaries and Error Analysis Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128A Numerical Analysis Limits and Continuity

More information

Multiplication of signed-operands

Multiplication of signed-operands Multiplication of signed-operands Recall we discussed multiplication of unsigned numbers: Combinatorial array multiplier. Sequential multiplier. Need an approach that works uniformly with unsigned and

More information

Tutorial 2: Expressing Uncertainty (Sig Figs, Scientific Notation and Rounding)

Tutorial 2: Expressing Uncertainty (Sig Figs, Scientific Notation and Rounding) Tutorial 2: Expressing Uncertainty (Sig Figs, Scientific Notation and Rounding) Goals: To be able to convert quantities from one unit to another. To be able to express measurements and answers to the correct

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Computer Representation of Numbers Counting numbers (unsigned integers) are the numbers 0,

More information

Alg 1B Chapter 7 Final Exam Review

Alg 1B Chapter 7 Final Exam Review Name: Class: Date: ID: A Alg B Chapter 7 Final Exam Review Please answer all questions and show your work. Simplify ( 2) 4. 2. Simplify ( 4) 4. 3. Simplify 5 2. 4. Simplify 9x0 y 3 z 8. 5. Simplify 7w0

More information

Optimizing MPC for robust and scalable integer and floating-point arithmetic

Optimizing MPC for robust and scalable integer and floating-point arithmetic Optimizing MPC for robust and scalable integer and floating-point arithmetic Liisi Kerik * Peeter Laud * Jaak Randmets * * Cybernetica AS University of Tartu, Institute of Computer Science January 30,

More information

What Fun! It's Practice with Scientific Notation!

What Fun! It's Practice with Scientific Notation! What Fun! It's Practice with Scientific Notation! Review of Scientific Notation Scientific notation provides a place to hold the zeroes that come after a whole number or before a fraction. The number 100,000,000

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors 3-1 Roundoff errors and floating-point arithmetic

More information

Lecture 2: Number Representations (2)

Lecture 2: Number Representations (2) Lecture 2: Number Representations (2) ECE 645 Computer Arithmetic 1/29/08 ECE 645 Computer Arithmetic Lecture Roadmap Number systems (cont'd) Floating point number system representations Residue number

More information

Negative Bit Representation Outline

Negative Bit Representation Outline Negative Bit Representation Outline 1. Negative Bit Representation Outline 2. Negative Integers 3. Representing Negativity 4. Which Bit for the Sign? 5. Sign-Value 6. Disadvantages of Sign-Value 7. One

More information

ECE380 Digital Logic. Positional representation

ECE380 Digital Logic. Positional representation ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with

More information

Order of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n

Order of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n Week 3 Jack Carl Kiefer (94-98) Jack Kiefer was an American statistician. Much of his research was on the optimal design of eperiments. However, he also made significant contributions to other areas of

More information

2 ways to write the same number: 6,500: standard form 6.5 x 10 3 : scientific notation

2 ways to write the same number: 6,500: standard form 6.5 x 10 3 : scientific notation greater than or equal to one, and less than 10 positive exponents: numbers greater than 1 negative exponents: numbers less than 1, (> 0) (fractions) 2 ways to write the same number: 6,500: standard form

More information

Next, we include the several conversion from type to type.

Next, we include the several conversion from type to type. Number Conversions: Binary Decimal; Floating Points In order to communicate with a computer, we need, at some point, to speak the same language. The words of our language are made up of combinations of

More information

NAME DATE PERIOD. A negative exponent is the result of repeated division. Extending the pattern below shows that 4 1 = 1 4 or 1. Example: 6 4 = 1 6 4

NAME DATE PERIOD. A negative exponent is the result of repeated division. Extending the pattern below shows that 4 1 = 1 4 or 1. Example: 6 4 = 1 6 4 Lesson 4.1 Reteach Powers and Exponents A number that is expressed using an exponent is called a power. The base is the number that is multiplied. The exponent tells how many times the base is used as

More information

Numerical Methods - Preliminaries

Numerical Methods - Preliminaries Numerical Methods - Preliminaries Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Preliminaries 2013 1 / 58 Table of Contents 1 Introduction to Numerical Methods Numerical

More information

1 ERROR ANALYSIS IN COMPUTATION

1 ERROR ANALYSIS IN COMPUTATION 1 ERROR ANALYSIS IN COMPUTATION 1.2 Round-Off Errors & Computer Arithmetic (a) Computer Representation of Numbers Two types: integer mode (not used in MATLAB) floating-point mode x R ˆx F(β, t, l, u),

More information

Representing Numbers on the Computer

Representing Numbers on the Computer Representing Numbers on the Computer Let s calculate J! Program Maxnumber * * Check what the max numbers are on the computer * Integer N * * N= Do J=,2 N=N*J Print *,J,N Enddo stop end What happened? J

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b.

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5. Ax = b. CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 5 GENE H GOLUB Suppose we want to solve We actually have an approximation ξ such that 1 Perturbation Theory Ax = b x = ξ + e The question is, how

More information

NUMBER SYSTEMS. and DATA REPRESENTATION. for COMPUTERS (PROBLEM ANSWERS)

NUMBER SYSTEMS. and DATA REPRESENTATION. for COMPUTERS (PROBLEM ANSWERS) NUMBER SYSTEMS and DATA REPRESENTATION for COMPUTERS (PROBLEM ANSWERS) 05 March 2008 Number Systems and Data Representation 2 Table of Contents Table of Contents... 2 Conversion Between Binary and Hexadecimal

More information

QUADRATIC PROGRAMMING?

QUADRATIC PROGRAMMING? QUADRATIC PROGRAMMING? WILLIAM Y. SIT Department of Mathematics, The City College of The City University of New York, New York, NY 10031, USA E-mail: wyscc@cunyvm.cuny.edu This is a talk on how to program

More information

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS

FLOATING POINT ARITHMETHIC - ERROR ANALYSIS FLOATING POINT ARITHMETHIC - ERROR ANALYSIS Brief review of floating point arithmetic Model of floating point arithmetic Notation, backward and forward errors Roundoff errors and floating-point arithmetic

More information

Chapter 1 Indices & Standard Form

Chapter 1 Indices & Standard Form Chapter 1 Indices & Standard Form Section 1.1 Simplifying Only like (same letters go together; same powers and same letter go together) terms can be grouped together. Example: a 2 + 3ab + 4a 2 5ab + 10

More information

UNIT V FINITE WORD LENGTH EFFECTS IN DIGITAL FILTERS PART A 1. Define 1 s complement form? In 1,s complement form the positive number is represented as in the sign magnitude form. To obtain the negative

More information

Number Bases. Ioan Despi. University of New England. August 4, 2013

Number Bases. Ioan Despi. University of New England. August 4, 2013 Number Bases Ioan Despi despi@turing.une.edu.au University of New England August 4, 2013 Outline Ioan Despi AMTH140 2 of 21 1 Frequently Used Number Systems 2 Conversion to Numbers of Different Bases 3

More information

ECS 231 Computer Arithmetic 1 / 27

ECS 231 Computer Arithmetic 1 / 27 ECS 231 Computer Arithmetic 1 / 27 Outline 1 Floating-point numbers and representations 2 Floating-point arithmetic 3 Floating-point error analysis 4 Further reading 2 / 27 Outline 1 Floating-point numbers

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and

More information

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1 Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

Introduction and mathematical preliminaries

Introduction and mathematical preliminaries Chapter Introduction and mathematical preliminaries Contents. Motivation..................................2 Finite-digit arithmetic.......................... 2.3 Errors in numerical calculations.....................

More information

UNIT 4 NOTES: PROPERTIES & EXPRESSIONS

UNIT 4 NOTES: PROPERTIES & EXPRESSIONS UNIT 4 NOTES: PROPERTIES & EXPRESSIONS Vocabulary Mathematics: (from Greek mathema, knowledge, study, learning ) Is the study of quantity, structure, space, and change. Algebra: Is the branch of mathematics

More information

8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points.

8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points. Data analysis and modeling: the tools of the trade Patrice Koehl Department of Biological Sciences National University of Singapore http://www.cs.ucdavis.edu/~koehl/teaching/bl5229 koehl@cs.ucdavis.edu

More information

Chapter 3 Experimental Error

Chapter 3 Experimental Error Chapter 3 Experimental Error Homework Due Friday January 27 Problems: 3-2, 3-5, 3-9, 3-10, 3-11, 3-12, 3-14, 3-19 Chapter 3 Experimental Error Uncertainties They are everywhere!! We need to learn to understand

More information

Sect Exponents: Multiplying and Dividing Common Bases

Sect Exponents: Multiplying and Dividing Common Bases 154 Sect 5.1 - Exponents: Multiplying and Dividing Common Bases Concept #1 Review of Exponential Notation In the exponential expression 4 5, 4 is called the base and 5 is called the exponent. This says

More information

History & Binary Representation

History & Binary Representation History & Binary Representation C. R. da Cunha 1 1 Instituto de Física, Universidade Federal do Rio Grande do Sul, RS 91501-970, Brazil. August 30, 2017 Abstract In this lesson we will review the history

More information

SECTION Types of Real Numbers The natural numbers, positive integers, or counting numbers, are

SECTION Types of Real Numbers The natural numbers, positive integers, or counting numbers, are SECTION.-.3. Types of Real Numbers The natural numbers, positive integers, or counting numbers, are The negative integers are N = {, 2, 3,...}. {..., 4, 3, 2, } The integers are the positive integers,

More information

Chapter 4: Radicals and Complex Numbers

Chapter 4: Radicals and Complex Numbers Chapter : Radicals and Complex Numbers Section.1: A Review of the Properties of Exponents #1-: Simplify the expression. 1) x x ) z z ) a a ) b b ) 6) 7) x x x 8) y y y 9) x x y 10) y 8 b 11) b 7 y 1) y

More information

8.1 Multiplication Properties of Exponents Objectives 1. Use properties of exponents to multiply exponential expressions.

8.1 Multiplication Properties of Exponents Objectives 1. Use properties of exponents to multiply exponential expressions. 8.1 Multiplication Properties of Exponents Objectives 1. Use properties of exponents to multiply exponential expressions. 2. Use powers to model real life problems. Multiplication Properties of Exponents

More information

A number that can be written as, where p and q are integers and q Number.

A number that can be written as, where p and q are integers and q Number. RATIONAL NUMBERS 1.1 Definition of Rational Numbers: What are rational numbers? A number that can be written as, where p and q are integers and q Number. 0, is known as Rational Example:, 12, -18 etc.

More information

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

Jim Lambers MAT 610 Summer Session Lecture 2 Notes Jim Lambers MAT 610 Summer Session 2009-10 Lecture 2 Notes These notes correspond to Sections 2.2-2.4 in the text. Vector Norms Given vectors x and y of length one, which are simply scalars x and y, the

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

Tunable Floating-Point for Energy Efficient Accelerators

Tunable Floating-Point for Energy Efficient Accelerators Tunable Floating-Point for Energy Efficient Accelerators Alberto Nannarelli DTU Compute, Technical University of Denmark 25 th IEEE Symposium on Computer Arithmetic A. Nannarelli (DTU Compute) Tunable

More information

1. Revision Description Reflect and Review Teasers Answers Recall of Rational Numbers:

1. Revision Description Reflect and Review Teasers Answers Recall of Rational Numbers: 1. Revision Description Reflect Review Teasers Answers Recall of Rational Numbers: A rational number is of the form, where p q are integers q 0. Addition or subtraction of rational numbers is possible

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and

More information

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor Proposal to Improve Data Format Conversions for a Hybrid Number System Processor LUCIAN JURCA, DANIEL-IOAN CURIAC, AUREL GONTEAN, FLORIN ALEXA Department of Applied Electronics, Department of Automation

More information

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System? :33:3 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 3 Lecture #: Binary Number System Complement Number Representation X Y Why Binary Number System? Because

More information

Chapter 1: Preliminaries and Error Analysis

Chapter 1: Preliminaries and Error Analysis Chapter 1: Error Analysis Peter W. White white@tarleton.edu Department of Tarleton State University Summer 2015 / Numerical Analysis Overview We All Remember Calculus Derivatives: limit definition, sum

More information

6-3 Solving Systems by Elimination

6-3 Solving Systems by Elimination Another method for solving systems of equations is elimination. Like substitution, the goal of elimination is to get one equation that has only one variable. To do this by elimination, you add the two

More information

CHAPTER 2 NUMBER SYSTEMS

CHAPTER 2 NUMBER SYSTEMS CHAPTER 2 NUMBER SYSTEMS The Decimal Number System : We begin our study of the number systems with the familiar decimal number system. The decimal system contains ten unique symbol 0, 1, 2, 3, 4, 5, 6,

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register

More information

Computer Number Systems

Computer Number Systems Computer Number Systems All computers are electronic devices and can ultimately do one thing: detect whether an electrical signal is on or off. Therefore, the earliest computer scientists realized that

More information

TI-84+ GC 2: Exponents and Scientific Notation

TI-84+ GC 2: Exponents and Scientific Notation Rev 6-- Name Date TI-84+ GC : Exponents and Scientific Notation Objectives: Use the caret and square keys to calculate exponents Review scientific notation Input a calculation in scientific notation Recognize

More information

Digital Electronics 1

Digital Electronics 1 ELETRONIS ENGINEERING SERIES igital Electronics ombinational Logic ircuits Tertulien Ndjountche igital Electronics Series Editor Robert aptist igital Electronics ombinational Logic ircuits Tertulien

More information

arxiv: v1 [cs.na] 15 Apr 2013

arxiv: v1 [cs.na] 15 Apr 2013 Relative error due to a single bit-flip in floating-point arithmetic Bradley R. Lowery arxiv:1304.4292v1 [cs.na] 15 Apr 2013 February 7, 2014 We consider the error due to a single bit-flip in a floating

More information

Topics Covered in This Chapter:

Topics Covered in This Chapter: Introduction to Powers of 10 Topics Covered in This Chapter: I-1: Scientific Notation I-2: Engineering Notation and Metric Prefixes I-3: Converting between Metric Prefixes I-4: Addition and Subtraction

More information

Uncertainties in Measurement

Uncertainties in Measurement Uncertainties in Measurement Laboratory investigations involve taking measurements of physical quantities. All measurements will involve some degree of experimental uncertainty. QUESTIONS 1. How does one

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Floating Point Number Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le Floating Point Number Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview Real number system Examples Absolute and relative errors Floating point numbers Roundoff

More information

Section 3-4: Least Common Multiple and Greatest Common Factor

Section 3-4: Least Common Multiple and Greatest Common Factor Section -: Fraction Terminology Identify the following as proper fractions, improper fractions, or mixed numbers:, proper fraction;,, improper fractions;, mixed number. Write the following in decimal notation:,,.

More information

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

Skills Practice Skills Practice for Lesson 4.1

Skills Practice Skills Practice for Lesson 4.1 Skills Practice Skills Practice for Lesson.1 Name Date Thinking About Numbers Counting Numbers, Whole Numbers, Integers, Rational and Irrational Numbers Vocabulary Define each term in your own words. 1.

More information