Question

In: Computer Science

Assume that you have a 12-bit floating point number system, similar to the IEEE floating point...

Assume that you have a 12-bit floating point number system, similar to the IEEE floating point standard, with the format shown below and a bias of 7. The value of a floating point number in this system is represented as   

FP = (-1)^S X 1.F X 2^(E-bias)

for the floating point numbers A = 8.75 and B = -5.375. The binary representation of A is given as

A = 0101 0000 1100

Show the hexidecimal representation of B.

Solutions

Expert Solution

0xCAC

Explanation:
-------------
-5.375
Converting 5.375 to binary
   Convert decimal part first, then the fractional part
   > First convert 5 to binary
   Divide 5 successively by 2 until the quotient is 0
      > 5/2 = 2, remainder is 1
      > 2/2 = 1, remainder is 0
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 101
   So, 5 of decimal is 101 in binary
   > Now, Convert 0.37500000 to binary
      > Multiply 0.37500000 with 2.  Since 0.75000000 is < 1. then add 0 to result
      > Multiply 0.75000000 with 2.  Since 1.50000000 is >= 1. then add 1 to result
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.375 of decimal is .011 in binary
   so, 5.375 in binary is 00000101.011
-5.375 in simple binary => 101.011
so, -5.375 in normal binary is 101.011 => 1.01011 * 2^2

12-bit format:
--------------------
sign bit is 1(-ve)
exponent bits are (7+2=9) => 1001
   Divide 9 successively by 2 until the quotient is 0
      > 9/2 = 4, remainder is 1
      > 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 1001
   So, 9 of decimal is 1001 in binary
frac/significant bits are 0101100

so, -5.375 in 12-bit format is 1 1001 0101100
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
Converting 110010101100 to hexadecimal
1100 => C
1010 => A
1100 => C
So, in hexadecimal 110010101100 is 0xCAC

in hexadecimal it is 0xCAC



Related Solutions

Consider the following 32-bit floating point representation based on the IEEE floating point standard: There is...
Consider the following 32-bit floating point representation based on the IEEE floating point standard: There is a sign bit in the most significant bit. The next eight bits are the exponent, and the exponent bias is 28-1-1 = 127. The last 23 bits are the fraction bits. The representation encodes number of the form V = (-1)S x M x 2E, where S is the sign, M is the significand, and E is the biased exponent. The rules for the...
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
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.
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
In this question, you are provided with an IEEE-754 floating-point number in the form of 8...
In this question, you are provided with an IEEE-754 floating-point number in the form of 8 hexadecimal digits. You are asked to decode this value into its decimal representation. You MUST report your answer as a real number. Do NOT use scientific notation. Do NOT round or truncate your answer. Do NOT add any spaces or commas to your answer. If the converted number is positive, do NOT add the plus sign. Convert, i.e., decode, 0x48801002 from the 32-bit single-precision...
Concern the following 16-bit floating point representation: The first bit is the sign of the number...
Concern the following 16-bit floating point representation: The first bit is the sign of the number (0 = +, 1 = -), the next nine bits are the mantissa, the next bit is the sign of the exponent, and the last five bits are the magnitude of the exponent. All numbers are normalized, i.e. the first bit of the mantissa is one, except for zero which is all zeros. 1. What's the smallest difference between two consecutive or adjacent numbers?...
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
2. a) Represent the decimal value 47.375 as a single precision IEEE floating point number. Give...
2. a) Represent the decimal value 47.375 as a single precision IEEE floating point number. Give your answer in hexadecimal and show your work. b) Represent the decimal value 47.375 as a double precision IEEE floating point number. Give your answer in hexadecimal and show your work.
IEEE 754 format of 32-bit floating-point is as follows. 1 8 (bits) 23 (bits) What’s stored...
IEEE 754 format of 32-bit floating-point is as follows. 1 8 (bits) 23 (bits) What’s stored in each region? What’s the bias value and how to get it? For decimal fraction: – 0.625, please represent it as given format (Note: you must show the specific procedure/stepsin order to get full credits. If you only present final result directly, you will only get half of the credits even if it is correct.).  
Write a program that converts a given floating point binary number with a 24-bit normalized mantissa...
Write a program that converts a given floating point binary number with a 24-bit normalized mantissa and an 8-bit exponent to its decimal (i.e. base 10) equivalent. For the mantissa, use the representation that has a hidden bit, and for the exponent use a bias of 127 instead of a sign bit. Of course, you need to take care of negative numbers in the mantissa also. Use your program to answer the following questions: (a) Mantissa: 11110010 11000101 01101010, exponent:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT