computer arithmetic real

Post on 27-Feb-2018

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

 

1. p.7Fixed-point +

2. p.12Consist of 3 field ( from left -> right)sign bit = 1bitbiased exponent = 8bitstrailing significant = 23bitsvalue = (-1)^s * 1.f * 2^(e-127)

3.a) -2.25b) +575.75c) -50.5d) +14.75e) -193.0625f) +98.5g) -0 (Special pattern; p.17)h) 0 / +0 (Special pattern; p.17)

4.a) c0 60 00 00b) 3f 80 00 00c) bd 80 00 00d) 40 16 00 00e) c1 e1 00 00f) c1 0c 00 00g) +0 (Special pattern; s=0, e=0..., f=0... p.17)h) -0 (Special pattern; s=1, e=0..., f=0... p.17)

5.- Exponent overflow : exponent too large to be represented.- Resolve : Some system carry to +ve or -ve infinities.

  Some system will inform the user that some errors have occured.

6.- Exponent underflow : exponent too small to be represented.

  (biased exponent < 0)- Resolve : Some try to resolve with subnormal number

  some round to +0 to -0  Some system will inform the user that some errors have occured.

7.NaN is for undefined n unpresentable values in floating-oint calculations.E.g: 0/0, or square root of -1, infinity/infinity ... = NaN

8.-infinity < normal finite number < +infinity

9.a) -18.375b) +35.625c) 40 8f 44 00 00 00 00 00d) c0 47 e0 00 00 00 00 00

10.Floating-point unit : dedicated logic unit /circuitry designed to work on

floating point number.- Main features : better/faster performance and operation; 10x - 100x

 

- Algo , Logari, Trigonometric

11.FPU: floating-point operations- without it , it can be emulated with1) in cpu as microcode or microprogram2) provided by the operation system3) with fpu software library (widely available)

top related