Fixed point binary numbers. Objectives  Draw a distinction between integers and numbers with a fractional part in a computer context.  Describe how.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION Y. Colette Lemard February
Advertisements

Floating Point Numbers
Faculty of Computer Science © 2006 CMPUT 229 Representing Information Numbers, Numbers, and Numbers.
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
Floating Point Numbers
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Mathematics with Binary. Question  Below is a binary string  Which is the least significant bit (LSB)?  Which is the most significant bit (MSB)? 0.
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
Binary numbers. 1 Humans count using decimal numbers (base 10) We use 10 units: 0, 1, 2, 3, 4, 5, 6, 7, 8 and (5.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Number Systems Computer Science 210 Computer Organization.
WHEN MULTIPLYING LIKE BASES, YOU ADD THE EXPONENTS FOR EXAMPLE: NOW YOU TRY:
NEGATIVE BINARY NUMBER – Digital Circuit 1 Choopan Rattanapoka.
© GCSE Computing Candidates should be able to:  convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa  add two 8-bit.
Convert Decimal to Floating point number [IEEE 754]
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Binary Boot Camp = ________ decimal ??? = = 45.
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition and subtraction.
Rational numbers. Whole numbers Whole numbers Rational numbers Whole numbers Natural numbers Integers / ¾ 18% A rational number.
I CAN COMPARE AND ORDER RATIONAL NUMBERS BY USING A NUMBER LINE. 1.5 RATIONAL NUMBERS.
BR 8/99 Binary Numbers Again Recall than N binary digits (N bits) can represent unsigned integers from 0 to 2 N bits = 0 to 15 8 bits = 0 to 255.
Finding the fraction of a whole number WALT : find calculate a fraction of a whole number Example : To find of
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
Floating Point Arithmetic
Floating-Point Representation We can store integers and characters easily in binary, but what about fractions? ¼ =.25 = 2.5 * *
Computer Organization and Design Information Encoding II Montek Singh Wed, Aug 29, 2012 Lecture 3.
Lecture 2 Binary Arithmetic Topics Terminology Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement August 26, 2003 CSCE 211.
Computers and Numbers. Types of Numbers Computers store two different types of numbers: Whole Numbers AKA Integers (mathematics) AKA Fixed Point Numbers.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Computer Systems Nat 4/5 Computing Science Lesson 1: Binary.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2002 Topic1: Numbers, Numbers, and Numbers José Nelson Amaral.
Chapter 4-1: Measures of Angles as Rotations. Review… Angle: The union of two rays which are its sides with the same vertex or endpoint. Angle: The rotation.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Binary & Normalization What is Normalization? We discussed this the other day (special review session slides, near the end) Can someone tell us.
Learning Objectives 3.3.1f - Describe the nature and uses of floating point form 3.3.1h - Convert a real number to floating point form Learn how to normalise.
Conversions 1)Binary to Denary Method 1 Work out the position values of the binary bits and add those values together So above would be
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
Starter Using two’s Complement form convert the following from Denary to Binary using 8 bits. Answer on mini whiteboard Using two’s.
973cs111_add_posneg.ppt Integers Whole numbers Do NOT contain decimal points (as in money) 43,689 is an integer 43, is NOT an integer (it is floating.
Binary Numbers. Decimal vs Binary = 1001 = 101 = 10 1 = on = 0 = off = On and off.
Computer Science 210 Computer Organization
Addition and Subtraction
Negative numbers: Week 10 Lesson 1
Recap Add these numbers together in binary
Digital Systems and Number Systems
Binary numbers: Week 7 Lesson 1
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Computer Science 210 Computer Organization
Number Systems Lab session 1 Xuan Guo.
Lesson objectives Understand how computers represent and manipulate numbers [unsigned integers, signed integers (sign and magnitude, Two’s complement)
Computer Science 210 Computer Organization
Topic 3: Data Signed Binary.
Computer Science 210 Computer Organization
Dividing Decimals.
Topic 1: Data Representation
CS 101 – Sept. 4 Number representation Integer Unsigned √ Signed √
Starter Using the fingers on only one hand, what is the highest number you can count to? Rules: You must start at 1 You must count sequentially (i.e.
Part 1 Q1 to Q5 of National 5 Prelim
Binary  Name: Class: .
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.
Section 6 Primitive Data Types
Presentation transcript:

Fixed point binary numbers

Objectives  Draw a distinction between integers and numbers with a fractional part in a computer context.  Describe how an unsigned denary number with a fractional part is represented in fixed-point form in binary.

Numbers  A whole number is called an integer  Integers are great because they can easily be converted to binary  But… it’s generally accepted at some stage fractional numbers will occur  For example  7 divide by 3 will equal  This becomes more of a challenge

Negative numbers!!  Once again we use the magic numbers but this time we are going to add a decimal place and some fractions.  The other side of the decimal place we have to use fractions and half each time Lets have a go at converting  First step is to do the whole number conversion  Then do the fraction side /21/41/81/ NOTE You will only ever be asked to convert up to 4 decimal place

Fraction Conversion  So it’s fairly standard thing to know that  ½ = 0.5  ¼ = 0.25  But a little more difficult after that Binary fractionFractionDecimal Fraction 0.11/ / / / /

Fixed point binary numbers  There are other ways of representing fractional numbers but you don’t need to know about these yet!  The advantage of fixed point is that it is exactly the same as integer arithmetic, making processing faster  The disadvantage is that it has limited range

Time to try Convert the following to fixed point binary  2.75       Convert the following, assuming 4 bits after the point:     