Computer Data Formats Microprocessor Course Electrical Engineering Department University of Indonesia.

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

ICS312 Set 2 Representation of Numbers and Characters.
Lecture - 2 Number systems and computer data formats
Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 2: Data Representation.
Datorteknik FloatingPoint bild 1 Floating point Number system corresponding to the decimal notation 1,837 * 10 significand exponent a great number of corresponding.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
Data Representation Computer Organization &
Booth’s Algorithm.
Data Representation COE 205
Microprocessor Systems Design I
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Overflow Signed binary is in fixed range -2 n-1  2 n-1 If the answer for addition/subtraction more than the.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
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 Representation and Computer Arithmetic
Fundamental of Assembly Language Programming (for Microprocessor)
Computers Organization & Assembly Language
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Fundamental of Computer Architecture By Panyayot Chaikan November 01, 2003.
Binary Arithmetic & Data representation
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Number Systems Spring Semester 2013Programming and Data Structure1.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
Cis303a_chapt03-2a.ppt Range Overflow Fixed length of bits to hold numeric data Can hold a maximum positive number (unsigned) X X X X X X X X X X X X X.
ICS312 Set 1 Representation of Numbers and Characters.
S. Rawat I.I.T. Kanpur. Floating-point representation IEEE numbers are stored using a kind of scientific notation. ± mantissa * 2 exponent We can represent.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
CEC 220 Digital Circuit Design Binary Codes
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
DIGITAL SYSTEMS Number systems & Arithmetic Rudolf Tracht and A.J. Han Vinck.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
Positional Number Systems In a general radix-r positional system, with fixed word width k, a number is represented by a string of k digits.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Lecture No. 4 Computer Logic Design. Negative Number Representation 3 Options –Sign-magnitude –One’s Complement –Two’s Complement  used in computers.
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Chapter 9 Computer Arithmetic
William Stallings Computer Organization and Architecture 8th Edition
CSCI206 - Computer Organization & Programming
Floating Point Numbers
Lec 3: Data Representation
Data Representation Binary Numbers Binary Addition
Microprocessor Systems Design I
Floating Point Number system corresponding to the decimal notation
Microprocessor Systems Design I
William Stallings Computer Organization and Architecture 7th Edition
CS1010 Programming Methodology
ECEG-3202 Computer Architecture and Organization
ECE 331 – Digital System Design
Computer Architecture CST 250
Numbers with fractions Could be done in pure binary
Computer Organization and Assembly Language
Presentation transcript:

Computer Data Formats Microprocessor Course Electrical Engineering Department University of Indonesia

2 ASCII Data American Standard Code for Information Interchange (ASCII) data represent alphanumeric characters in the memory of a computer system (Table 1.7)Table 1.7 The standard ASCII code is a 7-bit code with the eighth and MSB used to hold parity in some systems ASCII are most often stored in memory using a special directive to the assembler program called define byte(s) or DBDB

3 BCD Data Binary-Coded Decimal (BCD) information is stored in either packed or unpacked forms Packed BCD data are stored as two digits per byte Unpacked BCD data are strored as one digit per byte The range of a BCD digit extends from to or 0-9 decimal Table 1.9 shows some decimal numbers converted to both packed ad unpacked BCDTable 1.9packed ad unpacked BCD

4 Byte-Sized Data Byte-size data are stored as unsigned and signed integers Negative signed numbers are stored in the 2’s complement form –Whenever a number is 2’s complement, its sign changes from negative to positive or positive to negative –See example 1-22, , 1-23 Define bit (DB) directive is used to store 8-bit data in memoryDB

5 Word-sized Data A word (16-bits) is formed with two bytes of data The LSB is always stored in the lowest- numbered memory location, the MSB in the highest (i.e., little endian format) -- used with Intel family of microprocessor An alternate method (i.e., big endian format) is used with the motorolla family of micro- processors

6 Word-sized Data Fig 1.11(a) & (b) shows the weight of each bit position in a word of dataFig 1.11(a) & (b) Example 1.25 shows several signed and unsigned word-sized data stored in memory using the assembler programExample 1.25 Note that define word(s) directive or DW causes the assembler to store words in the memory

7 Doubleword-sized Data Doubleword-sized data requires four bytes of memory (32-bit number) Doubleword-sized data appear as a product after a multiplication and also as a dividend before a division Fig shows the form used to store doublewords in the memory and the binary weights of each bit positionFig To define doubleword-sized data, use assembler directive define doubleword or DDDD

8 Real Numbers A real number (floating-point number) contains two parts: a mantissa, significand, or fraction and an exponent Fig and example 1-27 depicts both the 4-byte (single precision) and 8-byte (double precision) forms of real numbersFig. 1-13example 1-27 The exponent is stored as a biased exponent –an exponent of 2 3 is represented as a biased exponent of or 130 (82H) in the single- precision form or as 1026 (402H) in the double- precision form

9

10

11

12

13

14

15

16