Question

In: Computer Science

Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a =...

Given the following 32-bit binary sequences representing single precision IEEE

754 floating point numbers:

a = 0100 0000 1101 1000 0000 0000 0000 0000

b = 1011 1110 1110 0000 0000 0000 0000 0000

Perform the following arithmetic and show the results in both normalized binary format and IEEE 754 single-precision format. Show your steps.

a)     a + b

b)     a × b

Solutions

Expert Solution

a = 0 10000001 10110000000000000000000
sign bit is 0(+ve)
exp bits are 10000001
Converting 10000001 to decimal
   10000001
   => 1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+1x2^0
   => 1x128+0x64+0x32+0x16+0x8+0x4+0x2+1x1
   => 128+0+0+0+0+0+0+1
   => 129
in decimal it is 129
so, exponent/bias is 129-127 = 2
frac bits are 1011

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.1011 * 2^2

b = 1 01111101 11000000000000000000000
sign bit is 1(-ve)
exp bits are 01111101
Converting 01111101 to decimal
   01111101
   => 0x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+0x2^1+1x2^0
   => 0x128+1x64+1x32+1x16+1x8+1x4+0x2+1x1
   => 0+64+32+16+8+4+0+1
   => 125
in decimal it is 125
so, exponent/bias is 125-127 = -2
frac bits are 11

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.11 * 2^-2

a)
a + b
= 1.1011 * 2^2 - 1.11 * 2^-2
= 1.1011 * 2^2 - 0.000111 * 2^2
= 1.100101 * 2^2

single precision:
--------------------
sign bit is 0(+ve)
exponent bits are (127+2=129) => 10000001
   Divide 129 successively by 2 until the quotient is 0
      > 129/2 = 64, remainder is 1
      > 64/2 = 32, remainder is 0
      > 32/2 = 16, remainder is 0
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder is 0
      > 4/2 = 2, remainder is 0
      > 2/2 = 1, remainder is 0
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 10000001
   So, 129 of decimal is 10000001 in binary
frac/significant bits are 10010100000000000000000

so, a+b in single-precision format is 0 10000001 10010100000000000000000

b)
a x b
= 1.1011 * 2^2 x -1.11 * 2^-2
= 1.1011 x -1.11
= -10.111101
= -1.0111101 * 2^1

single precision:
--------------------
sign bit is 1(-ve)
exponent bits are (127+1=128) => 10000000
   Divide 128 successively by 2 until the quotient is 0
      > 128/2 = 64, remainder is 0
      > 64/2 = 32, remainder is 0
      > 32/2 = 16, remainder is 0
      > 16/2 = 8, remainder is 0
      > 8/2 = 4, remainder is 0
      > 4/2 = 2, remainder is 0
      > 2/2 = 1, remainder is 0
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 10000000
   So, 128 of decimal is 10000000 in binary
frac/significant bits are 01111010000000000000000

so, a x b in single-precision format is 1 10000000 01111010000000000000000

Related Solutions

Q1.Convert C46C000016 into a 32-bit single-precision IEEE floating-point binary number.
Q1.Convert C46C000016 into a 32-bit single-precision IEEE floating-point binary number.
Express the following two base 10 numbers in binary using the IEEE 754 single-precision floating point...
Express the following two base 10 numbers in binary using the IEEE 754 single-precision floating point format (i.e., 32 bits). Express your final answer in hexadecimal (e.g., 32’h????????). a) 68.3125 b) -19.675
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754...
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754 standard is
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.
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and...
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and the fraction. Convert -3.875 to an IEEE 754 double-precision floating-point number. Show the sign bit, the exponent, and the fraction Convert the IEEE 754 single-precision floating-point numbers 42E4800016 and 0080000016 to their corresponding decimal numbers.
Convert 1.67e14 to the 32-bit IEEE 754 Floating Point Standard, with the following layout: first bit...
Convert 1.67e14 to the 32-bit IEEE 754 Floating Point Standard, with the following layout: first bit is sign bit, next 8 bits is exponent field, and remaining 23 bits is mantissa field; result is to be in hexadecimal and not to be rounded up. answer choices 5717E27B 57172EB7 5717E2B7 C717E2B7 5771E2B7
1. Represent following floating-point numbers in IEEE single-precision (32-bit) format: a. -0.1875, b. 0.46875 2. What...
1. Represent following floating-point numbers in IEEE single-precision (32-bit) format: a. -0.1875, b. 0.46875 2. What is the decimal value of the following IEEE single-precision (32-bit) floating-point numbers (which are shown in hexadecimal)? a. 3F400000, b. BE000000
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.  
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000...
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000 0000 0000 0000 0000
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point...
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point representation.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT