Chapter 1: Data Representation Dr Mohamed Menacer Taibah University 2007-2008.

Slides:



Advertisements
Similar presentations
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Advertisements

Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Floating-point Numbers.
2-1 Chapter 2 - Data Representation Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
Chapter 2: Data Representation
Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 2: Data Representation.
L03 – Encoding Information 1 Comp411 – Spring /17/2007 Representing Information “Bit Juggling” - Representing information using bits - Number representations.
Booth’s Algorithm.
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.
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
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…
Lecture 8 Floating point format
Binary Representation and Computer Arithmetic
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Computer Architecture I: Digital Design Dr. Robert D. Kent Lecture 1 – Part B Data, Representation & Numeracy.
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.
Information Representation (Level ISA3) Floating point numbers.
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Computing Systems Basic arithmetic for computers.
Computer Architecture
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer.
Lecture Overview Introduction Positional Numbering System
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Data Representation in Computer Systems
9.4 FLOATING-POINT REPRESENTATION
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
1 Information Representation in Computer Lecture Nine.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
IT11004: Data Representation and Organization Floating Point Representation.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
CSE 340 Simulation Modeling | MUSHFIQUR ROUF CSE340:
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
Computer Organization and Design Information Encoding Montek Singh Mon, Jan 12, 2011 Lecture 2.
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.
Chapter 9 Computer Arithmetic
CSCI206 - Computer Organization & Programming
Department of Computer Science Georgia State University
Computer Science 210 Computer Organization
1. Number Systems.
Computer Architecture & Operations I
Digital Systems and Binary Numbers
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
Digital Systems and Binary Numbers
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
CSCI206 - Computer Organization & Programming
Representing Information
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Arithmetic Logical Unit
Numbering Systems and Arithmetic operations on Hex, binary, and octal
COMS 361 Computer Organization
Number Systems.
Number Systems created by: S.Shahrukh haider
Storing Integers and Fractions
Representing Information
COMS 161 Introduction to Computing
CS 286 Computer Architecture & Organization
IT11004: Data Representation and Organization
Numbers with fractions Could be done in pure binary
Presentation transcript:

Chapter 1: Data Representation Dr Mohamed Menacer Taibah University

Bits are just bits (0,1) conventions define relationship between bits and numbers conventions define relationship between bits and numbers Binary integers (base 2) decimal: 0, …, 2 n -1 decimal: 0, …, 2 n -1 Of course it gets more complicated: bit strings are finite, but bit strings are finite, but for some fractions and real numbers, finitely many bits is not enough, so overflow & approximation errors: e.g., represent 1/3 as binary! negative integers negative integers How do we represent negative integers? which bit patterns will represent which integers? which bit patterns will represent which integers? Numbers n bits

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

IBM's 8-bit extension of the 4-bit Binary Coded Decimal encoding of digits 0-9 ( ), for character encoding.

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Floating Point We need a way to represent numbers with fractions, e.g., numbers with fractions, e.g., very small numbers (in absolute value), e.g., very small numbers (in absolute value), e.g., very large numbers (in absolute value), e.g., – * very large numbers (in absolute value), e.g., – * 10 46Representation: scientific: sign, exponent, significand form: scientific: sign, exponent, significand form: (–1) sign *  significand *  2 exponent. E.g., – * more bits for significand gives more accuracy more bits for significand gives more accuracy more bits for exponent increases range more bits for exponent increases range binary point

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Scales, Units, and Conventions Term K (kilo-) M (mega-) G (giga-) T (tera-) = = 1,048, = 1,073,741, = 1,099,511,627,776 Normal UsageAs a power of 2 Term Usage m (milli-)  (micro-) n (nano-) p (pico-) Units: Bit (b), Byte (B), Nibble, Word (w), Double Word, Long Word Second (s), Hertz (Hz) Powers of 2 are used to describe memory sizes. Note the differences between usages. You should commit the powers of 2 and 10 to memory.