Computer Science A 14: 3/4. Computing with numbers - Precision - Representation - Computing with numbers - Example.

Slides:



Advertisements
Similar presentations
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Advertisements

Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things.
Major Numeric Data Types Unsigned Integers Signed Integer Alphanumeric Data – ASCII & UNICODE Floating Point Numbers.
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
Major Numeric Data Types Unsigned Integers Signed Integers Alphanumeric Data – ASCII & UNICODE Floating Point Numbers.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Floating Point Numbers
Simple Data Type Representation and conversion of numbers
Ch. 2 Floating Point Numbers
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Numeric precision in SAS. Two aspects of numeric data in SAS The first is how numeric data are stored (how a number is represented in the computer). –
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
Computer Science 111 Fundamentals of Programming I Number Systems.
IT253: Computer Organization
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 22, 2004 Lecture Number: 24.
Introduction to Numerical Analysis I
COMPSCI 210 Semester Tutorial 1
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.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
New Mexico Computer Science for All Author: Ed Angel Title: Bits and Bytes.
CSC 221 Computer Organization and Assembly Language
16. Binary Numbers Programming in C++ Computer Science Dept Va Tech August, 1999 © Barnette ND, McQuain WD, Keenan MA 1 Binary Number System Base.
Floating Point Arithmetic
Lecture 12: Integer Arithmetic and Floating Point CS 2011 Fall 2014, Dr. Rozier.
Floating Point Numbers. It's all just 1s and 0s Computers are fundamentally driven by logic and thus bits of data Manipulation of bits can be done incredibly.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
IEEE Arithmetic UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
CS1Q Computer Systems Lecture 2 Simon Gay. Lecture 2CS1Q Computer Systems - Simon Gay2 Binary Numbers We’ll look at some details of the representation.
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Integer Exponents. Look for a pattern in the table to extend what you know about exponents to include negative exponents. ÷ –1 10 –
Floating Point Binary A2 Computing OCR Module 2509.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Module 2.2 Errors 03/08/2011. Sources of errors Data errors Modeling Implementation errors Absolute and relative errors Round off errors Overflow and.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
CSCI206 - Computer Organization & Programming
Floating Points & IEEE 754.
Floating Point Numbers
Introduction to Numerical Analysis I
Nat 4/5 Computing Science Lesson 1: Binary
Floating Point Representations
Department of Computer Science Georgia State University
Lecturer: Santokh Singh
Dr. Clincy Professor of CS
Number Systems and Binary Arithmetic
Lecture 9: Floating Point
Adding, Subtracting, and Multiplying Decimals 3-1/3-2
Numbers in a Computer Unsigned integers Signed magnitude
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
Chapter 6 Floating Point
Luddy Harrison CS433G Spring 2007
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Fundamentals of Programming I Number Systems
Dr. Clincy Professor of CS
Dr. Clincy Professor of CS
Storing Integers and Fractions
COMS 161 Introduction to Computing
Floating point numbers
Presentation transcript:

Computer Science A 14: 3/4

Computing with numbers - Precision - Representation - Computing with numbers - Example

Floating point numbers Number with an integer part and decimals And very large numbers with out all digits And very small numbers near zero Ide: represent numbers as sign and two numbers sign * decimal part * 10 exponent

Unique representation 1*10 0 = 10*10 -1 =.. Numbers must be normalized to be on the form sign*0,decimals*10 exponent Where decimal part must not start with zero Or decimal part and exponent is zero and the number is zero

Float Float: 4bytes = 32 bit Exponent 8 bits: Decimal part: 23 bits (+1) + sign Precision: 2 24 =2 10 *2 10 *2 4 ≈ about 7 digits Interval: ≈ 10 ? +eeeeeee e

Dobbelt præcision double: 64 bit or 8 bytes 11 bit exponent (up to ) 52 bit decimal part (about 15 digits)

Cmputing with numbers Floating point numbers are nor precise. With repeated computation rounding errors may accumulate Do not compare with equality (==) but check that the difference is less than a small value. Do not subtract two almost equal values. Redesign instead the algorithm. Avoid repeated adding of numbers

Rounding errors If you need higher precision you need more space You need a sense of bit patterns, powers of two and knowledge of the internal representation If you need to calculate with floating point numbers be aware of the traps