Data Representation Covering… Binary addition / subtraction

Slides:



Advertisements
Similar presentations
Base 10 Denary Decimal
Advertisements

Number Systems Discussion D4.1 Appendix C. Number Systems Counting in Binary Positional Notation Hexadecimal Numbers Negative Numbers.
Lecture 3 Number Representation 2 This week – Recap Addition – Addition circuitry – Subtraction of integers in binary – Representing numbers with fractional.
Floating Point Numbers
Floating Point Numbers
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…
Binary Numbers 1.Binary and Denary RecapBinary.
CS1104-2aNumber Systems Supplementary Notes 1 Lecture 2: Number Systems Supplementary Notes  Complements Complements  Floating-point Numbers Floating-point.
Simple Data Type Representation and conversion of numbers
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.
IT253: Computer Organization
Conversion of Number System Conversion Among Bases The possibilities: Hexadecimal DecimalOctal Binary
The Teacher CP4 Binary and all that… CP4 Revision.
Positional Number Systems
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
The Teacher CP4 Binary and all that… CP4 Revision.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
Floating Point Arithmetic
Number System sneha.
Fractions in Binary.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Hexadecimal Data Representation. Objectives  Know how the Hexadecimal counting system works  Be able to convert between denary, binary & hexadecimal.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
Number Bases and Representation. Denary Number System (Base 10) Our number system uses 10 digits (0-9) As you move from right to left each number is worth.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Floating Point in Binary 1.Place Value Chart:
Number Systems Denary Base 10 Binary Base 2 Hexadecimal Base 16
Binary Arithmetic.
Floating Point Binary A2 Computing OCR Module 2509.
CS 160 Lecture 4 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
CS2100 Number Systems Supplementary Notes 1 NUMBER SYSTEMS SUPPLEMENTARY NOTES  Complements  Floating-point Numbers.
Computer Studies Today Chapter 19 1 Chapter 19. Computer Studies Today Chapter 19 2 »Information stored in a computer is in two states: –ON –OFF.
Hexadecimal (base 16) BY MAT D. What is hexadecimal  Hexadecimal is a number system like binary or denary that has 16 characters, the numbers 0-9 and.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
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.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Software Design and Development Storing Data Computing Science.
Starter Using two’s Complement form convert the following from Denary to Binary using 8 bits. Answer on mini whiteboard Using two’s.
FLOATING-POINT NUMBER REPRESENTATION
Floating Point Numbers
Floating Point Numbers
Nat 4/5 Computing Science Lesson 1: Binary
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
Octal to Decimal Decimal Octal Binary Hexadecimal.
Introduction To Computer Science
Recap Add these numbers together in binary
ECE 103 Engineering Programming Chapter 3 Numbers
Number Representations
Number Systems Base 2, 10, 16.
Binary  Name: Class: .
Storing Integers and Fractions
Representation of real numbers
Normalised Floating Point Numbers
GCSE COMPUTER SCIENCE Topic 3 - Data 3.4 Hexadecimal Conversion.
Data Binary Arithmetic.
Numbers with fractions Could be done in pure binary
39 32 Exponent Sign 31 Mantissa 30 Operations are perfomred with an implied binary point between bits 31 and 30. When the implied most significant.
Number Representations
1.6) Storing Integer: 1.7) storing fraction:
Lecture 37 – Practice Exercises 9
Lecture 37 – Practice Exercises 9
Chapter 1 Introduction.
Presentation transcript:

Data Representation Covering… Binary addition / subtraction 2’s complement Floating Point Binary Normalisation of Floating Point Binary

Question 1 Question… Convert the 10001100 8-bit binary numbers to its denary equivalent. Answer… 140

Question 2 Question… Convert 67 denary to its 8 bit binary equivalent… Answer… 01000011

Question 3 Convert the 8-bit two’s complement binary 10000010 to its denary equivalents. Answer… -126

Question 4 Question… Convert -120 denary to its 2’s complement 8-bit binary equivalent Answer… 10001000

Question 5 Question… Convert 175 denary to its hexadecimal equivalent Answer… af

Question 6 Question… Convert BB hexadecimal to its denary equivalent Answer… 187

Question 7 Question… Convert 9B hexadecimal to its 8-bit binary equivalent Answer… 10011011

Question 8 Question… Convert the 8 –bit binary 10101010 to its hexadecimal equivalent Answer… aa

Question 9 Question… Represent 5.125 as a binary fraction Answer… 0101.0010

Question 10 Question… 1101000.011 What is the decimal equivalent? Answer… 104.375

Question 11 Question… What is 01101011 + 00100100 Answer… 10001111

Question 12 (2 marks) Question… What is 76 – 24 in 2’s complement 8-bit binary (show working for 1 mark and right answer for 1 mark) Answer… 76-24=52 01001100 11101000 00110100

Question 13 (2 marks) Question… What is -86 + 96 in 2’s complement 8-bit binary (show working for 1 mark and right answer for 1 mark) Answer… -86+96=10 10101010 01100000 00001010

Question 14 (3 marks) Question… The following floating binary numbers have a 10 bit 2’s complement mantissa and 6 bit 2’s complement exponent. What is the decimal value? a) 01001.01000 000100 4 b) .00101000000 111110 -2 c) 1100.11000 000011 3 Answer… a) 9.25 b) 0.15625 c) -3.25

Question 15 Question… What is the trade off when changing the size of the mantissa and exponent in terms of accuracy and range. Answer… A larger mantissa means higher accuracy and lower range whereas higher exponent means higher range but lower accuracy

Question 16 Question… Represent the value −0.3125 in floating point form using 10-bit two’s complement mantissa and 6-bit two’s complement exponent in normalised form. Answer… 1011000000 111111