0

I had a doubt regarding Single Precision Floating point numbers. It is about the bias number which can be derived from exponent part of this representation of numbers.

On searching up on google, most answers say that the bias number should just be 127 (32 bit numbers, I think), whereas in one answer on stackExchange, it says it varies depending on the number of exponent bits. If there are 11 bits then we must subtract $2^{11-1}-1$ (bias number if I'm not mistaken) from the exponent part of the number to get 2's exponent which will be used in the final expression of the number.

But I came across another question on this topic which used excess 16 bit technique. It had 5 bits in the exponent and it was in 16-bit format. In this case while writing the number in single precision format we had to add 16, instead of $2^{5-1}-1 = 15$ bits (or the bias number would have been 16 in this case). I'm guessing it is because it is called 16-bit technique, but otherwise if it wasn't mentioned should we should have added 15 bits to the exponent part while writing it in single precision format?

I'm attaching the excess-16 question & solution for your reference along this question: https://i.stack.imgur.com/nWiYL.jpg

  • "Excess $16$ bit technique" sounds very strange. You should edit the question to link to the place where you saw this so that people can interpret it for you. On the other hand, "single precision" typically refers to a number with a specific number of bits in a specific computer architecture. There's no such thing as a generic "single precision" number, but if you are working with numbers designed according to the IEEE 754 standard, then single-precision means the number has $32$ bits total and a bias of $127.$ – David K Jan 04 '23 at 14:06
  • Almost all computers nowadays seem to use IEEE 754 floating-point numbers, but this was not always so. If you study certain topics you may want to be aware of what the possible representations for floating-point numbers could be, rather than just what is usually used. – David K Jan 04 '23 at 14:09
  • @DavidK yeah, I'm finding the excess-16 technique a bit confusing too. I have attached the question & solution for your reference along the question. Have a look into it – crimsonKnight Jan 04 '23 at 14:36
  • 1
    It's just "excess-16 technique" without the word "bit". The confusion may be that the number $16$ comes up twice in the specification of this format, once because it is the total number of bits in the number and once because it is the excess in the exponent. Those two uses of the same number $16$ are completely coincidental. And you need some kind of specification of what the excess is; if you know the number is an IEEE-754 type you can assume $2^{k-1} - 1$ (it's implied by IEEE-754) but if it's some other floating-point type then that's not a good assumption. – David K Jan 04 '23 at 15:51

0 Answers0