# MASON CS 365 - Floating Point Arithmetic (6 pages)

Previewing pages 1, 2 of 6 page document
View Full Document

# Floating Point Arithmetic

Previewing pages 1, 2 of actual document.

View Full Document
View Full Document

## Floating Point Arithmetic

21 views

Lecture Notes

Pages:
6
School:
George Mason University
Course:
Cs 365 - Computer Systems Architecture
##### Computer Systems Architecture Documents
• 2 pages

• 2 pages

• 27 pages

• 12 pages

• 4 pages

• 19 pages

• 25 pages

• 10 pages

• 9 pages

• 2 pages

• 13 pages

• 15 pages

• 18 pages

Unformatted text preview:

Floating Point Arithmetic CS 365 Lecture 8 Prof Yih Huang CS365 1 Scientific Notation decimal point exponent Sign magnitude 6 02 x 10 23 Mantissa Sign magnitude CS365 radix base 2 1 Floating Point Numbers We need a way to represent numbers with fractions e g 3 1416 very small numbers e g 000000001 very large numbers e g 3 15576 109 Representation sign exponent significand 1 sign significand 2exponent more bits for significand gives more accuracy more bits for exponent increases range CS365 3 Issues Arithmetic Representation Normal form Range and Precision Rounding Exceptions e g divide by zero overflow underflow Errors CS365 4 2 IEEE 754 Standards single precision 8 bit exponent 23 bit significand double precision 11 bit exponent 52 bit significand CS365 5 IEEE 754 Single Precision S E Exponent 1 8 bits M Magnitude 23 bits Exponent biased 127 binary integer Real exponent e E 127 Mantissa Signed magnitude normalized significant with a hidden 1 Value 1 S 1 M 2 E 127 CS365 6 3 Discussions Leading 1 bit of significand is implicit Exponent is biased bias of 127 all 0s is smallest exponent all 1s is largest Magnitude of numbers that can be represented 2 126 to 2127 2 2 23 Or in decimal numbers 1 8 10 38 to 3 4 1038 CS365 7 Exercise Give the single precision representation of 1 0 Give the single precision representation of 0 875 Give the single precision representation of 0 1 CS365 8 4 Exercise Calculate the value of 01000010001100000000000000000000 CS365 9 Floating Point Arithmetic 1 12 0 0000012 Step 1 alignment of decimal point Step 2 add significands Step 3 normalization CS365 10 5 Sign Exponent Significand Sign Exponent Significand Small ALU Exponent difference 0 1 0 Control 0 1 Shift right Big ALU 0 1 0 Increment or decrement 1 1 Floating Point Adder Shift left or right Rounding hardware Sign CS365 Exponent Significand 11 6

View Full Document

## Access the best Study Guides, Lecture Notes and Practice Exams

Unlocking...
Sign Up

Join to view Floating Point Arithmetic and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?