Presentation is loading. Please wait.

Presentation is loading. Please wait.

Overview Introduction Data representation Fixed Point Representation

Similar presentations


Presentation on theme: "Overview Introduction Data representation Fixed Point Representation"— Presentation transcript:

1 Overview Introduction Data representation Fixed Point Representation
Data Representation Lecture 4 Overview Introduction Data representation Fixed Point Representation Integer Representation Floating Point Representation Normalization CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

2 Introduction Data Number System Base (or radix) R number
Data Representation Lecture 4 Introduction Data Numeric data - numbers(integer, real) Non-numeric data - symbols, letters Number System Non-positional number system - Roman number system Positional number system - Each digit position has a value called a weight associated with it - Decimal, Octal, Hexadecimal, Binary Base (or radix) R number Uses R distinct symbols for each digit Example AR = an-1 an a1 a0 . a-1…a-m V(AR ) = Radix point(.) separates the integer portion and the fractional portion R = 10 Decimal number system R = Binary R = Octal, R = 16 Hexadecimal CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

3 Representation of Positional Numbers
Data Representation Lecture 4 Representation of Positional Numbers Decimal Binary Octal Hexadecimal A B C D E F CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

4 COMPLEMENT OF NUMBERS The (R-1)'s Complement The R's Complement
Data Representation Lecture 4 COMPLEMENT OF NUMBERS Two types of complements for base R number system: R's complement and (R-1)'s complement The (R-1)'s Complement Subtract each digit of a number from (R-1) Example - 9's complement of is 16410 - 1's complement of is 01012(bit by bit complement operation) The R's Complement Add 1 to the low-order digit of its (R-1)'s complement Example - 10's complement of is = 16510 - 2's complement of is = 01102 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

5 Fixed Point Representation
Data Representation Lecture 4 Fixed Point Representation Binary Fixed-Point Representation X = xnxn-1xn x1x0. x-1x x-m Sign Bit(xn): 0 for positive - 1 for negative Remaining Bits(xn-1xn x1x0. x-1x x-m) Numbers: Fixed Point Numbers and Floating Point Numbers CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

6 Fixed Point Representation
Data Representation Lecture 4 Fixed Point Representation Example: Represent +9 and -9 in 7 bit-binary number Only one way to represent ==> Three different ways to represent : In signed-magnitude: In signed-1's complement: In signed-2's complement: Fixed point numbers are represented either integer part only or fractional part only. Representation of both positive and negative numbers - Following 3 representations Signed magnitude representation Signed 1's complement representation Signed 2's complement representation CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT


Download ppt "Overview Introduction Data representation Fixed Point Representation"

Similar presentations


Ads by Google