5 15 2019 representing numbers outline
play

5/15/2019 Representing Numbers Outline How can I represent a Real - PowerPoint PPT Presentation

5/15/2019 Representing Numbers Outline How can I represent a Real number ? Digital CMOS design 2s complement Fixed Point : Boolean algebra The bits represents the successive powers of 2 Basic digital CMOS gates Combinational and


  1. 5/15/2019 Representing Numbers Outline How can I represent a Real number ? Digital CMOS design 2’s complement Fixed Point : Boolean algebra The bits represents the successive powers of 2 Basic digital CMOS gates Combinational and sequential circuits = 2 � + 2 �� + 2 �� = 4.375 0100 0110 Coding - Representation of numbers Coding - Representation of numbers −2 � 2 � 2 �� 2 �� Pirouz Bazargan Sabet Digital Dessign February 2010 Pirouz Bazargan Sabet Digital Dessign February 2010 Representing Numbers Representing Numbers How can I represent a Real number ? How can I represent a Real number ? Range Wide range Precision High precision Floating Point Pirouz Bazargan Sabet Digital Dessign February 2010 Pirouz Bazargan Sabet Digital Dessign February 2010 1

  2. 5/15/2019 Representing Numbers Representing Numbers � = −1 � × � × 2 � How can I represent a Real number ? Single precision : 8 Normalized scientific representation 1 23 � = −1 � × � × 10 � 2 � Exponent Sign Relative number between S : Sign (1 if negative) Fraction Mantissa -127 and 128 ∈ 1, 10 ∈ 1, 2 M : Mantissa ( ) ( ) in radix 10 Fixed point positive real number The code 0000 0000 1. ... means -127 E : Exponent (relative number) The 1 is not represented !! Natural Binary Code by Excess of 127 Pirouz Bazargan Sabet Digital Dessign February 2010 Pirouz Bazargan Sabet Digital Dessign February 2010 Representing Numbers Representing Numbers � = −1 � × � × 2 � � = −1 � × � × 2 � Single precision : Special cases Single Precision Double Precision 8 1 23 32 bits 64 bits S : Sign (1 if negative) 1 bit 1 bit Exponent ∈ 1, 2 Sign M : Mantissa ( ) 23 bits 52 bits Fraction The code 1111 1111 E : Exponent 8 bits 11 bits (128) means ±∞ or .000…000 means ±∞ an error other values mean error (NaN) Pirouz Bazargan Sabet Digital Dessign February 2010 Pirouz Bazargan Sabet Digital Dessign February 2010 2

  3. 5/15/2019 Representing Numbers � = −1 � × � × 2 � Single precision : Range and precision 8 1 23 Exponent Sign Fraction � ∈ −2 ��� , 2 ��� Precision = 2 ���#� Pirouz Bazargan Sabet Digital Dessign February 2010 Representing Numbers � = −1 � × � × 2 � Single precision : Special cases 8 1 23 Exponent Sign The code 0000 0000 (-127) Fraction Mantissa indicates denormalized 0.00 … 000 means 0 Mantissa Pirouz Bazargan Sabet Digital Dessign February 2010 3

Recommend


More recommend