1 / 14

Chapter 2 Representing and Manipulating Information

Chapter 2 Representing and Manipulating Information. Bryant & O’Hallaron. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 2 3 = 8. 2 2 = 4. 2 1 = 2. 2 0 = 1. [0001]. [0101]. [1011]. [1111]. – 2 3 = –8. 2 2 = 4. 2 1 = 2. 2 0 = 1. – 8. – 7. – 6.

cushing
Download Presentation

Chapter 2 Representing and Manipulating Information

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. Chapter 2Representing and Manipulating Information Bryant & O’Hallaron

  2. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 = 8 22 = 4 21 = 2 20 = 1 [0001] [0101] [1011] [1111]

  3. – 23 = –8 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 [0001] [0101] [1011] [1111]

  4. – 23 = –8 23 = 8 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [1011] +16 [1111] +16

  5. 2w +2w–1 2w–1 0 0 –2w–1 Unsigned Two’s complement

  6. 2w +2w–1 2w–1 Unsigned Two’s complement 0 0 –2w–1

  7. – 23 = –8 – 22 = –4 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 [101] [1101] [111] [1111]

  8. x + y 2w+1 Overflow x +uy 2w Normal 0

  9. x + y +2w Positive overflow Case 4 x +ty +2w –1 +2w –1 Case 3 0 Normal 0 Case 2 –2w –1 –2w –1 Case 1 Negative overflow –2w

  10. 2m 2m–1 4 • • • 2 1 bm bm–1 • • • b2 b1 b0 . b–1 b–2 b–3 • • • b–n+1 b–n 1/2 • • • 1/4 1/8 1/2n–1 1/2n

  11. s exp frac s exp frac (51:32) Single precision 31 30 23 22 0 Double precision 63 62 52 51 32 0 31 0 frac (31:0)

  12. 1. Normalized s  0 &  255 f 2. Denormalized s 0 0 0 0 0 0 0 0 f 3a. Infinity s 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3b. NaN s 1 1 1 1 1 1 1 1  0

  13. – –10 –5 0 +5 +10 + Denormalized Normalized Infinity –0 +0 –1 –0.8 –0.6 –0.4 –0.2 0 +0.2 +0.4 +0.6 +0.8 +1 Denormalized Normalized Infinity

More Related