1 / 18

Representing Data

Representing Data. By Prof. Hintz, selected and modified by Dr. Gaj Electrical and Computer Engineering. Codes for Numbers. Egyptian ~4000 BC “Sum of Symbols” =1 =10 =100 = (34) 10. Positional Code for Numbers. Babylonians Positional system 2000 BC

Download Presentation

Representing Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Representing Data By Prof. Hintz, selected and modified by Dr. Gaj Electrical and Computer Engineering 331_2

  2. Codes for Numbers • Egyptian • ~4000 BC • “Sum of Symbols” =1 =10 =100 = (34)10 331_2

  3. Positional Code for Numbers • Babylonians • Positional system • 2000 BC • Radix 60 • = 1 = 10 331_2

  4. Babylonian Example 1 x 602 20 x 601 56 x 600 = (4,856)10 331_2

  5. Positional Code with Zero • Zero Represented by Space • Partial solution • What about trailing zeros? • Babylonians Introduced New Symbol • or • 4th to 1st Century BC • Zero Allows Representation of Fractions • Fractions started with zero 331_2

  6. Mixed System • Roman Numerals • Sum of all symbols • I = 1 V = 5 X = 10 L=50 C = 100 M = 1000 • Difficult to do arithmetic • e.g., 331_2

  7. Positional Code Decimal System • Hindu • 500 AD • Position of coefficient determines its value • Coefficient in position is multiplied by radix (10) raised to the power determined by its position, e.g., 331_2

  8. Migration of Positional Notation • ~750 AD • Zero spread from India to Arabic countries • ~1250 AD • Zero spread to Europe • Importance of Zero • Ease of arithmetic which leads to improved commerce 331_2

  9. Binary Number System • Binary • Positional number system • Two symbols, B = { 0, 1 } • Easily implemented using switches • Easy to implement in electronic circuitry • Algebra invented by Boole allows easy manipulation of symbols 331_2

  10. Conversion Considerations • Purpose of Binary Representation is to Put Numbers in a Form which can be Manipulated by Digital Logic • Register Size Limits Resolution • Not All Numbers in One Radix Can Be Accurately Represented in Another Radix 331_2

  11. Binary, Octal, Hexadecimal • It Is Easy to Convert Binary Numbers to Other, More Convenient Representations by Grouping Bits Together and Then Converting by Inspection • Octal { 0, 1, ... , 7 } • 3-bit groups • Hexadecimal { 0, ... , 9, A, ... , F } • 4-bit groups 331_2

  12. Binary to Octal Example 331_2

  13. Binary to Hex Example 331_2

  14. Classification of number systems (1) Number system Non-positional Positional Fixed-radix Mixed-radix Conventional Unconventional Binary Decimal Hexadecimal Signed-digit 331_2 Non-redundant Redundant

  15. Classification of number systems (2) Positional wi - weight of the digit xi Fixed-radix r - radix of the number system Conventional fixed-radix r integer, r > 0 xi {0, 1, …, r-1} 331_2

  16. Classification of number systems (3) Unconventional fixed-radix xi {-, …,  } Signed-digit >0  negative digits Non-redundant number of digits =  +  + 1  r Redundant number of digits =  +  + 1 > r 331_2

  17. Range of numbers Xmin Xmax Number system Decimal X = (xk-1xk-2 … x1x0.x-1 … x-l)10 0 10k - 10-l Binary X = (xk-1xk-2 … x1x0.x-1 … x-l)2 2k - 2-l 0 Conventional fixed-radix X = (xk-1xk-2 … x1x0.x-1 … x-l)r 0 rk - r-l Notation: unit in the least significant position unit in the last position ulp = r-l 331_2

  18. Number of digits Number of digits in the integer part necessary to cover the range 0..Xmax Number system Decimal Binary Conventional fixed-radix 331_2

More Related