Question

In: Advanced Math

Check if (A x B) x C = A x (B x C) using half-precision format....

Check if (A x B) x C = A x (B x C) using half-precision format.

Let

  • A = 3.41796875x10 -3 = 1.1100000000 x 2 -9
  • B = 4.150390625 x10-3 = 1.0001000000 x 2-8
  • C = 1.05625x102 = 1.1010011010 x26

Calculate (A x B) x C by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in the text).

Assume 1 guard, 1 round bit, and 1 sticky bit, and round to the nearest even.

First, we calculate AxB = 1.M x 2N  

M =_______ (10-bit binary)

N = _________(a negative (decimal) integer)

The product of A and B is an underflow. That is, the result of A*B cannot be represented in the normal 16-bit half precision format.

However, it could be represented as a denorm number. What is the encoding of the this denorm number? (a 4-digit hexadecimal number with uppercase letter digit.)

Solutions

Expert Solution

Solution:--

To prove the (A x B) x C = A x (B x C)

First see
(AxB) x C =

  • A = 3.41796875x10 -3 = 1.1100000000 x 2 -9
  • B = 4.150390625 x10-3 = 1.0001000000 x 2-8
  • C = 1.05625x102 = 1.1010011010 x26

AxB=  1.1100000000 x 1.0001000000 x 2-17

AxB= 1.1101110000 x 2-17

Here M = 1101110000

N = -17 =11101110 (representing Negative number using 2's complement )

(AxB) x C= 1.1101110000 x1.1010011010 x 2-11

(AxB) x C=11.0000100011 x 2-11

Here P = 0000100100 (rounded to even)

Q=-11= 11110101 (representing Negative number using 2's complement )

Final ans 1= 11.000100011 x 2-11

Now check for

Ax(BxC)

BxC= 1.0001000000 x1.1010011010 x 2-2

BxC=1.1100000010 x 2-2

Here M=1100000010

N= -2 =11111110

Ax(BxC) = 1.1100000000 x1.1100000010 x 2-11

Ax(BxC) = 11.0000100011 x 2-11

P = 0000100100 (rounded to even)

Q=-11= 11110101 (representing Negative number using 2's complement )

Final ans 2 = 11.000100011 x 2-11

So final ans 1 = final ans 2

Hence proved


Related Solutions

a newer version of IEEE 754 defines a half precision floating point format that is only...
a newer version of IEEE 754 defines a half precision floating point format that is only 16 bits wide. the left most bit is still the sign bit. the exponent is 5 bits wide and has a bias of 15, and the fraction is 10 bits long. A hidden 1 is assumed similar to single and double precision formats. what is the bit pattern to represent -0.5 using this format?
A) Convert 1101.11011101 x 223 to IEEE Standard 754 for single precision floating-point binary format. B)...
A) Convert 1101.11011101 x 223 to IEEE Standard 754 for single precision floating-point binary format. B) Convert the IEEE Standard 754 number 11001010100011010101000000000000 to its decimal equivalent.  
If A, B, and C events are independent, check if B and A \ C events...
If A, B, and C events are independent, check if B and A \ C events are independent or not.
A half page report for a paper using the format of the font 12 and single...
A half page report for a paper using the format of the font 12 and single space about endosymbiosis. It'd be great if the report is written in a way that i've learned something new about the subject ' endosymbiosis '. 3 hrs left for submission somebody help ...
What is C if X = (A + B – C) / C and X =...
What is C if X = (A + B – C) / C and X = 0.1454, A = 204, and B = 11,214? Round answer to nearest whole number. What is D if D = A – B – C and A = 0, B = -8,673, and C = 4,186? Round answer to nearest whole number. What is M if R = F + ((B × (M – F))) and R = 0.2353, B = 1.8, and F...
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
Convert 1101.11011101 x 223 to IEEE Standard 754 for single-precision floating-point binary format. Convert the IEEE...
Convert 1101.11011101 x 223 to IEEE Standard 754 for single-precision floating-point binary format. Convert the IEEE Standard 754 number 11001010100011010101000000000000 to its decimal equivalent.
For the differential equation dy/dx=ye^x check all that apply A. PDE B. ODE C. homogeneous D....
For the differential equation dy/dx=ye^x check all that apply A. PDE B. ODE C. homogeneous D. linear E. constant coefficients F. autonomous G. system this is a differential equation problem. i was thinking it was A,C,F but thats not correct. any suggestions would help.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT