Question

Assume we are using the simple model for floating-point representation as given in the book (the...

Assume we are using the simple model for floating-point representation as given in the book (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 16, a normalized mantissa of 8 bits, and a single sign bit for the number). Show how the computer would represent the numbers 96.5 and -0.75 using this floating-point format. [10]

Homework Answers

Answer #1

a)
Converting 96.5 to binary
   Convert decimal part first, then the fractional part
   > First convert 96 to binary
   Divide 96 successively by 2 until the quotient is 0
      > 96/2 = 48, remainder is 0
      > 48/2 = 24, remainder is 0
      > 24/2 = 12, remainder is 0
      > 12/2 = 6, remainder is 0
      > 6/2 = 3, remainder is 0
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1100000
   So, 96 of decimal is 1100000 in binary
   > Now, Convert 0.50000000 to binary
      > Multiply 0.50000000 with 2.  Since 1.00000000 is >= 1. then add 1 to result
      > This is equal to 1, so, stop calculating
   0.5 of decimal is .1 in binary
   so, 96.5 in binary is 1100000.1
96.5 in simple binary => 1100000.1
so, 96.5 in normal binary is 1100000.1 => 1.1000001 * 2^6

14-bit format:
--------------------
sign bit is 0(+ve)
exp bits are (16+6=22) => 10110
   Divide 22 successively by 2 until the quotient is 0
      > 22/2 = 11, remainder is 0
      > 11/2 = 5, remainder is 1
      > 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 10110
   So, 22 of decimal is 10110 in binary
frac bits are 10000010

so, 96.5 in 14-bit format is 0 10110 10000010

b)
Converting 0.75 to binary
   Convert decimal part first, then the fractional part
   > First convert 0 to binary
   Divide 0 successively by 2 until the quotient is 0
   Read remainders from the bottom to top as 
   So, 0 of decimal is  in binary
   > Now, Convert 0.75000000 to binary
      > 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.75 of decimal is .11 in binary
   so, 0.75 in binary is .11
-0.75 in simple binary => .11
so, -0.75 in normal binary is .11 => 1.1 * 2^-1

14-bit format:
----------------
sign bit is 1(-ve)
exp bits are (16-1=15) => 01111
   Divide 15 successively by 2 until the quotient is 0
      > 15/2 = 7, remainder is 1
      > 7/2 = 3, remainder is 1
      > 3/2 = 1, remainder is 1
      > 1/2 = 0, remainder is 1
   Read remainders from the bottom to top as 1111
   So, 15 of decimal is 1111 in binary
frac bits are 10000000

so, -0.75 in 14-bit format is 1 01111 10000000


Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Assume we are using the simple model for the floating-point representation given in this book (the...
Assume we are using the simple model for the floating-point representation given in this book (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 15, a zero-normalized mantissa of 8 bits, and a single sign bit). What is the real number represented by 01110010000101? Show how the computer would add this number with 238.5 using the floating-point addition algorithm. Verify your results by adding them in decimal, what is the relative error in the...
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. How many significant binary digits do numbers in this representation...
Matlab uses IEEE double precision numbers: 64-bit floating point representation 1 bit : sign 11 bits:...
Matlab uses IEEE double precision numbers: 64-bit floating point representation 1 bit : sign 11 bits: exponent 52 bits: mantissa. Calculate largest number (less than inf) that can be stored accurately Calculate smallest number (x>0) that can be stored accurately Calculate the machine epsilon Show all work step by step and repeat for 10 bit floating point (bit sign, 4 bits exponent and 5 bits mantissa)
Given a 12-bit IEEE floating point format with 5 exponent bits: Give the hexadecimal representation for...
Given a 12-bit IEEE floating point format with 5 exponent bits: Give the hexadecimal representation for the bit-pattern representing −∞−∞. Give the hexadecimal representation for the bit-patterns representing +0 and -1. Give the decimal value for the floating point number represented by the bit-pattern 0xcb0. Give the decimal value for largest finite positive number which can be represented? Give the decimal value for the non-zero negative floating point number having the smallest magnitude. What are the smallest and largest magnitudes...
Matlab uses IEEE double precision numbers: 64-bit floating point representation 1 bit : sign 11 bits:...
Matlab uses IEEE double precision numbers: 64-bit floating point representation 1 bit : sign 11 bits: exponent 52 bits: mantissa. Calculate largest number that can be stored accurately Calculate smallest number (x>0) that can be stored accurately Calculate the machine epsilon Show all work step by step and explain calculations Now calculate the largest number and smallest number for a 10 bit floating point (1 bit for the sign, 4 bits exponent and 5 bits mantissa)
.A floating-point number representation on a certain system has a sign bit, a 4-bit exponent and...
.A floating-point number representation on a certain system has a sign bit, a 4-bit exponent and a 5-bit significand. Please provide steps taken to get the answer a) What is the largest positive and the smallest positive number that can be stored on this system if the storage is normalized? (Assume no bits are implied, there is no biasing, exponents use two's complement notation, and exponents of all zeros and all ones are allowed.) b) What bias should be used...
Question 9.1 Half-precision Floating-point Format (50 marks) Do some research and find out how real (floating...
Question 9.1 Half-precision Floating-point Format Do some research and find out how real (floating point) numbers are represented in Binary. (a) (10 =6+4 marks) Devise your own 16-bit representation for floating point numbers. Draw a diagram of your representation and explain what the various bits are used for. Explain in detail: (i) How many bits are allocated to the mantissa and the exponent, respectively? (ii) What defines the range and the precision (or accuracy) of the numbers stored in floating...
urgent: Consider a 5-bit floating point representation based on the IEEE floating point format with one...
urgent: Consider a 5-bit floating point representation based on the IEEE floating point format with one sign bit, the next two bits of the exponent (exponent bias is 1), and the last two bits of the significand. Fill in the table below. For column M and Value, your answer must be expressed as a fraction of the form x/4. Bits M E Value 0 01 00 0 01 01 0 01 10 0 01 11 0 10 00 1 4/4...
1- please fill the blank a) in the long format floating point representation: pentium gives....... bits...
1- please fill the blank a) in the long format floating point representation: pentium gives....... bits for exponent and.......bits for mantissa. b) give an example of test-and-jump instruction in assembly:..........
Find the internal representation of the following decimal number in the Single Precision Floating Point format...
Find the internal representation of the following decimal number in the Single Precision Floating Point format of the value: -17.6 Non-terminating fractions should be carried out 6 places. You will show the different steps involved in this transformation by filling out the fields below. The value 17 in binary is ___ 2 (no leading or trailing zeroes). The value .6 in binary is ____ 2 (complete to 6 places) Normalized fraction: 1.____ 2 x 2Exponent. Exponent=_____. Biased Exponent in Binary:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT