Negative Numbers An alternative way to find the 2's complement Starting at the right 1. Copy bits until you reach the first 1. 2. Flip all the remaining.

Slides:



Advertisements
Similar presentations
ITEC 352 Lecture 7 Binary(2). Review Homework due on Friday Questions Binary Addition Subtraction Encoding.
Advertisements

1 IEEE Floating Point Revision Guide for Phase Test Week 5.
Chapter 1.7 Storing Fractions. Excess Notation, continued… In this notation, "m" indicates the total number of bits. For us (working with 8 bits), it.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
Booth’s Algorithm.
Lecture 3 Number Representation 2 This week – Recap Addition – Addition circuitry – Subtraction of integers in binary – Representing numbers with fractional.
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.
Number Systems Standard positional representation of numbers:
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
Representing Real Numbers Using Floating Point Notation Lecture 6 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
Computer Science 210 Computer Organization Floating Point Representation.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
The IEEE Format for storing float (single precision) data type Use the “enter” key to proceed through the show.
Scientific Notation. Essential Question  How do I use scientific notation to represent numbers?
Lecture 8 Floating point format
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
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.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Introduction to Numerical Analysis I
Computer Architecture
COMPSCI 210 Semester Tutorial 1
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Floating Point (a brief look) We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large numbers,
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.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
The Teacher CP4 Binary and all that… CP4 Revision.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
Fractions in Binary.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
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
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
Floating Point Numbers
SCIENTIFIC NOTATION Expressing a quantity as: a number between 1 and 10 multiplied by 10 to the appropriate power.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
Representation of Data (Part II) Computer Studies Notes: chapter 19 Ma King Man.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
Computer Organization 1 Data Representation Negative Integers.
FLOATING-POINT NUMBER REPRESENTATION
Floating Point Numbers
Lesson Objectives Aims You should know about: Binary numbers ‘n’ that.
Introduction to Numerical Analysis I
Nat 4/5 Computing Science Lesson 1: Binary
Department of Computer Science Georgia State University
Fundamentals of Computer Science
A brief comparison of integer and double representation
Introduction To Computer Science
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Scientific Notation.
Storing Integers and Fractions
Representation of real numbers
COMS 161 Introduction to Computing
Data Binary Arithmetic.
Numbers with fractions Could be done in pure binary
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

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 bits (14) (-14) (-14) (14)

Floating Point Numbers Positional Notation Redux ½ ¼ ⅛ Thus = ½ + ⅛ = 5⅜ And _

Floating Point Numbers Another Darn Notation Excess value notation E.g. with 3 bits we can represent 8 things, the excess value is half of that or 4. The idea is that the number that you see appears 4 greater than it really is!!??? Thus000(0) -> (3) -> (4) -> 0 111(7) -> 3

Floating Point Numbers So how is (5⅜ 10 ) actually stored. In a way similar to scientific notation. For example, we might store 5⅜ in scientific notation as follows: x 10 1 where the important parts are exponent (excess 4) [e below] fractional part (mantissa) [m] sign [s] Now in the computer we have s eee mmmm for 8 bits and > x 2 3 -> truncation error

Floating Point Numbers Decode the following 8 bit representation of a floating point number – sign bit -> negative 010 – exponent -> x 2 -2 or excess Now, = -( ) or = -( ) =

Floating Point Numbers Encode the following number as an 8 bit representation of a floating point number. 3 = now consider < 2 -1 and 2 -2 so subtr which leaves < 2 -4 so subtr which leaves Thus = = x 2 2 The exponent 2 is 110(6) in excess 4 notation The final form is