Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Floating Point (Multiplication)

Presentasi serupa


Presentasi berjudul: "Floating Point (Multiplication)"— Transcript presentasi:

1 Floating Point (Multiplication)
Disusun Oleh: Tri Fena Rohawati ( )

2 Definisi Floating point adalah sebuah format bilangan yang dapat digunakan untuk merepresentasikan sebuah nilai yang sangat besar atau sangat kecil.

3 Representation of Floating Point Numbers in Single Precission
IEEE 754 standard Value = N = (-1)S X 2 E-127 X (1.M) S E M

4 Representation (cont..)
Di mana : S = sign bit (0->positif, 1->negatif) E = Exponent M = Mantissa

5 Floating point Conversion Example
Bilangan desimal akan dikonversikan dalam bentuk IEEE bit format…. (0.75)10 0 = 0 (converted into biner) .75 = Calculation Integer Fraction .75 * .5 * Jadi, 0.75 = 11 (0.75)10 = 0.11 0.11=1.1 * 2-1 (normalized a binary number)

6 Floating point Conversion Example (cont…)
1.1 * 2-1 (normalized a binary number) hidden The mantissa is positive so the sign S is given by: The biased exponent E is given by E = e + 127 E = = = Fractional part of mantissa M: M = (in 23 bits) The IEEE 754 single precision representation is given by: S = 0 S E M 1 bits bits bits

7 Simplified Floating Point Multiplication Flowchart

8 Floating Point Multiplication Example
Multiply the following two numbers represented in the IEEE 754 single precision format: X = represented as: and Y = represented as: (1) Value of one or both operands = 0? No, continue with step 2 (2) Compute the sign: S = Xs XOR Ys = 1 XOR 0 = 1 (3) Multiply the mantissas: The product of the 24 bit mantissas is 48 bits with two bits to the left of the binary point: (01) … Truncate to 24 bits: hidden ® (1) (4) Compute exponent of result: Xe + Ye = = (5) Result mantissa needs normalization? No (6) Overflow? No. Underflow? No Result

9 IEEE 754 Single precision Multiplication
Rounding terjadi dalam floating point multiplication saat mantissa berubah dari 48bit jadi 24 bit. Overflow Overflow terjadi ketika jumlah exponents lebih dari 127 Saat ini exponent mulai dari 128 ( E=225 ) dan mantissa di set = 0 Overflow terjadi saat hasil tidak memiliki tanda sesuai dengan tanda operand ( hasil negatif akan didapatkan saat menambah2 angka positif ) Digunakan two’s complement untuk adding or subtracting numbers A carry occurs when the result of an addition or subtraction, considering the operands and result as unsigned numbers, does not fit in the result.

10 IEEE 754 Single precision Multiplication
Underflow Underflow terjadi saat penjumlahan dari exponent lebih dari (-)126, angka negatif yang di definisikan dalam bias adalah (-)127 Angka yang bukan nol adalah 2 – 149, untuk mempertahankan ketepatan tiap 1 bit dalam mantissa. Saat ini, exponent di set (-)127 (E=0) -If M = 0, the number is exactly zero. -If M is not zero, then a denormalized number is indicated which has an exponent of -127 and a hidden bit of 0.

11 IEEE 754 Single precision Multiplication
Underflow Arithmetic underflow (or "floating point underflow", "floating underflow", "underflow") adalah kondisi dimana hasil dari floating point operation lebih kecil dalam (mendekati nol, angka positif/negatif) Contoh : For example, an eight-bit two's complement exponent can represent multipliers of to A result less than would cause underflow.


Download ppt "Floating Point (Multiplication)"

Presentasi serupa


Iklan oleh Google