Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Representing and Manipulating Information

Similar presentations


Presentation on theme: "Chapter 2 Representing and Manipulating Information"— Presentation transcript:

1 Chapter 2 Representing and Manipulating Information

2 Figure 2.11: Unsigned number examples for w=4. unsigned-values.ppt
23 = 8 22 = 4 21 = 2 20 = 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [0001] [0101] [1011] [1111] Figure 2.11: Unsigned number examples for w=4. unsigned-values.ppt

3 Figure 2.12: two's-complement number examples for w=4.
– 23 = –8 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 1 2 3 4 5 6 7 8 [0001] [0101] [1011] [1111] Figure 2.12: two's-complement number examples for w=4. twocomp-values.ppt

4 – 23 = –8 23 = 8 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [1011] +16 [1111] +16 Figure 2.15: Comparing unsigned and two's-complement representations for w=4. unsigned-twocomp-values.ppt

5 2w–1 2w +2w–1 –2w–1 Unsigned Two’s complement
2w–1 2w +2w–1 –2w–1 Unsigned Two’s complement Figure 2.16: Conversion from two's complement to unsigned. t2u.ppt

6 2w 2w–1 +2w–1 –2w–1 Unsigned Two’s complement
–2w–1 Figure 2.17: Conversion from unsigned to two's complement. u2t.ppt

7 Figure 2.19: Examples of sign extension from w=3 to w=4.
– 23 = –8 – 22 = –4 22 = 4 21 = 2 20 = 1 –8 –7 –6 –5 –4 –3 –2 –1 1 2 3 4 5 6 7 8 [101] [1101] [111] [1111] Figure 2.19: Examples of sign extension from w=3 to w=4. extend-values.ppt

8 2w+1 2w x + y x +u y Overflow Normal
Figure 2.21: Relation between integer addition and unsigned addition. uadd-ovf.ppt Normal

9 +2w +2w –1 +2w –1 –2w –1 –2w –1 –2w x + y Case 4 x +t y Case 3 Case 2
Positive overflow Case 4 x +t y +2w –1 +2w –1 Case 3 Normal Case 2 –2w –1 –2w –1 Case 1 Negative overflow –2w Figure 2.23: Relation between integer and two's-complement addition. tadd-ovf.ppt

10 2m 2m–1 4 • • • 2 1 bm bm–1 • • • b2 b1 b0 . b–1 b–2 b–3 • • • b–n+1
1/2 1/4 • • • 1/8 Figure 2.30: Fractional binary representation. fractional-binary.ppt 1/2n–1 1/2n

11 Figure 2.31: Standard floating-point formats. fp-formats.ppt
Single precision 31 30 23 22 s exp frac Double precision 63 62 52 51 32 s exp frac (51:32) 31 frac (31:0) Figure 2.31: Standard floating-point formats. fp-formats.ppt

12 1. Normalized s  0 &  255 f 2. Denormalized s f 3a. Infinity s 1 1 1 1 1 1 1 1 3b. NaN s 1 1 1 1 1 1 1 1  0 Figure 2.32: Categories of single-precision, floating-point values. fp-cases.ppt

13 Figure 2.33A: Representable values for six-bit floating-point format.
fp-values.ppt

14 – –10 –5 +5 +10 + Denormalized Normalized Infinity –1 –0.8 –0.6 –0.4 –0.2 +0.2 +0.4 +0.6 +0.8 +1 Denormalized Normalized Infinity +0 –0 Figure 2.33B: Representable values for six-bit floating-point format. fp-values.ppt


Download ppt "Chapter 2 Representing and Manipulating Information"

Similar presentations


Ads by Google