Fundamentals of Computer Science

Slides:



Advertisements
Similar presentations
1 IEEE Floating Point Revision Guide for Phase Test Week 5.
Advertisements

Floating Point Numbers. CMPE12cGabriel Hugh Elkaim 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or.
Floating Point Numbers. CMPE12cCyrus Bazeghi 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or 2 64.
Chapter 5 Floating Point Numbers. Real Numbers l Floating point representation is used whenever the number to be represented is outside the range of integer.
Representing Real Numbers Using Floating Point Notation Lecture 6 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Lecture 8 Floating point format
Binary Number Systems.
Binary Representation and Computer Arithmetic
The Binary Number System
Data Representation Number Systems.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Factional Values What is 0.75 in binary?. How could we represent fractions? In decimal: – As fractions : 1/5.
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Computer Architecture
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Binary Fractions. Fractions A radix separates the integer part from the fraction part of a number Columns to the right of the radix have negative.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
The Teacher CP4 Binary and all that… CP4 Revision.
Negative Numbers An alternative way to find the 2's complement Starting at the right 1. Copy bits until you reach the first Flip all the remaining.
CSC 221 Computer Organization and Assembly Language
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
The Teacher CP4 Binary and all that… CP4 Revision.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari
Floating Point in Binary 1.Place Value Chart:
Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
Floating Point Numbers
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.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
FLOATING-POINT NUMBER REPRESENTATION
Floating Point Numbers
Nat 4/5 Computing Science Lesson 1: Binary
Department of Computer Science Georgia State University
Binary Fractions.
Introduction To Computer Science
Dr. Clincy Professor of CS
Overview Introduction Data representation Fixed Point Representation
Overview Introduction Data representation Fixed Point Representation
Luddy Harrison CS433G Spring 2007
CSCI206 - Computer Organization & Programming
BCD = Binary Coded Decimal
Data Representation Data Types Complements Fixed Point Representation
EEL 3705 / 3705L Digital Logic Design
Dr. Clincy Professor of CS
Numbers representations
Storing Integers and Fractions
Representation of real numbers
COMS 161 Introduction to Computing
Floating Point Binary Part 1
Numbers with fractions Could be done in pure binary
1.6) Storing Integer: 1.7) storing fraction:
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

Fundamentals of Computer Science Lecture 7

Floating Point Representation Numbers used in scientific calculations are designed by a sign, by the magnitude of the number, and by the position of the radix point. The position of the radix point is required to represent fractions, integers, or mixed integer-fraction numbers. There are two ways of specifying the position of the radix point which are: Fixed-point representation (which we have studied up till now) Floating-point representation There are two ways for positioning the radix point. They are: Putting the radix point at the extreme left of the number. Putting the radix point at the extreme right of the number.

Floating Point Representation However, it should be noted that in both cases, the radix point is not actually present in the digital system; rather, its position is implied by the fact that the number is predefined as an integer or fraction. It is most popular to use floating-point notation for storing fractions in the main memory of the computer. In decimal system, the floating-point notation ; which is also called “scientific notation”; of any real number can be represented as : (N)10 = F × 10E Where, (N)10 : is the real number in decimal format F: is a fraction E: is an exponent

Floating Point Representation Example: The real number + 6132.789 can be expressed using floating point notation as: (+ 6132.789)10 = + .6132789 × 10+04 Similar to the decimal system, floating point notation can also be applied to the binary system as: (N)2 = F × 2E Example: The binary number + 1001.11 can be represented with a 8-bit fraction and 6-bit exponent as: (+ 1001.11)2 = + . 100111 × 2+04

Common Formats for Floating Point Binary Numbers Representation There are 4 different formats for representing floating-point binary numbers. They are: signed-magnitude method 2’s complement method Excess method IEEE standard method

Floating-Point Numbers using signed-magnitude notation

Floating-Point Numbers using signed-magnitude notation sum of 7-terms geometric series

Floating-point numbers using signed-magnitude notation

Floating-point numbers using signed-magnitude notation

Floating-point numbers using signed-magnitude notation

Float-point numbers using signed-2’s complement In this method, only the exponent part is expressed using 2’s complement notation. There is only one sign bit exists for the mantissa.

Float-point numbers using signed-2’s complement

Float-point numbers using excess method In this method, only the exponent part is expressed using excess notation. There is only one sign bit exists for the mantissa.

Float-point numbers using excess method