9 9 votes In the standard $\text{IEEE}$ $754$ single precision floating point representation, there is $1$ bit for sign, $23$ bits for fraction and $8$ bits for exponent. What is the precision in terms of the number of decimal digits? $5$ $6$ $7$ $8$ Digital Logic number-representation ieee-representation isro2014 + – ajit 11.2k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 25 25 votes Option C Explanation IEEE-754 Format $(-1)^{S} 1.M^{E-127}$ $S \to \text{sign}$ $M \to \text{Mantissa}$ $E \to \text{Exponent}$ Precision is represented by ' 1.M ' where M is 23 bits and in total 24 bits are used for representing a precised number . With 24 bits we can represent $2^{24}$ numbers $(0 - 2^{24} -1).$ What is that value in decimal ? Largest number that can be represented in any base $x$ is $x^{\text{no. of digits}} -1$ (starting from 0) . So, $\text{base X}^{\text{no. of digits}} = \text{baseY}^{\text{no. of digits}}$ binary is base 2 and decimal is base 10 So, $2^{24} = 10^x$ . We need to find $x$ taking log on both sides, $\log_{2}2^{^{24}}$ = $\log_{2}10^{^{x}}$ $24=x \log_{2}10$ $x=7.22$ so we need minimum 7 digits in decimal pC answered Jul 2, 2016 • selected Jul 2, 2016 by Arjun pC comment Share Follow See all 4 Comments 4 4 Comments reply anchitjindal07 commented Apr 5, 2017 reply Follow flag Sir will it not require 8 decimal digits, because answer is 7.22. So we cant represent 24 bits in 7 digits completely, hence we need 8 digits.. Please correct me where I am wrong 1 1 replyShare Aakanchha commented Mar 20, 2018 reply Follow flag I have the same query as above why 7 and not 8? 1 1 replyShare ankitgupta.1729 commented Mar 20, 2018 i edited by ankitgupta.1729 Mar 20, 2018 reply Follow flag @anchit and Aakanchha , 7 is correct... To represent a "n" digit decimal number , let's say we need minimum "x" number of bits..then maximum decimal number with "n" decimal digits = 10n - 1 and maximum decimal number with "x" binary bits = 2x - 1...So, 10n -1 <= 2x - 1 implies 10n <= 2x ...Now , we verify this formula , let's say we have a decimal no 99(maximum 2 digit decimal number)..Since to represent 99 , we need 7 binary bits..Now , according to formula , since 99 has 2 decimal digits... So , 102 <= 2x ..So , x >= 2*lg10 ...So, x >= 2*3.32 ...So, x >= 6.67..so x = 7 ..So it proves that we need minimum 7 bits to represent 99...We can verify it by other examples also..Now , In this question , we have 24 binary bits ..So, x = 24..and we have to find number of decimal digits ..So , 10n <= 224..So , n*lg 10 <= 24 ...n*3.32 <= 24.... n <= 24/3.32 ..So, n <= 7.22..So ,maximum possible value of n = 7... So , 8 is not possible here.. 1 1 replyShare utpal podder commented Feb 14, 2019 reply Follow flag sir,why here we consider 24 bit for precision calculation....as we know the precision is determined by the mantissa part so here the calculation for the inequality should be 2^23 -1<=10^x-1..... please correct me if i had done anything wrong here... 0 0 replyShare Please log in or register to add a comment.
8 8 votes Precision is the number of digits we can represent accurately. $1.2 \times 10^8$ - precision is just 2 and rest we have 8 zeroes which might not be accurate. So, in IEEE 754 floating point representation we have 23 precision bits and we also have one implied bit before '.' making it 24 precision bits. With 24 bits we can represent $\lfloor 24 \log 2 \rfloor = 7$ decimal digits. Arjun answered Aug 20, 2015 Arjun comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Sourabh Kumar commented Jun 16, 2016 reply Follow flag @arjun sir :from where this formula come from.please comment! 0 0 replyShare Mangilal Saraswat commented Jun 23, 2016 reply Follow flag baseXno. of digits = baseYno. of digits 6 6 replyShare Tejaswee_Bommaluleni commented Jun 22, 2025 reply Follow flag @Arjun Sir, @Mangilal Saraswat The maximum value that can be represented 24 precision bits = 2^24-1 . So, the no.of decimal digits = log(2^24) = 24 log(2).Is this correct understanding? 1 1 replyShare Please log in or register to add a comment.
6 6 votes In IEEE 754 single precision format, the precision is 24 bits or 7 decimal digits. ($24 *log_{10}(2) ≈ 7.22$) In IEEE 754 double precision format, the precision is 53 bits or 15 decimal digits. ($53 *log_{10}(2) ≈ 15.95$) Notice that in bits, the precision is $|Mantissa| + 1$ JashanArora answered Dec 8, 2019 JashanArora comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Mantissa bits are precision bits. there are 23 M bits 2^23 = 8388608 this is 7 digits in decimal . hence the precision in decimal is of 7 digits 061_Arshdeep_Singh answered Mar 26 061_Arshdeep_Singh comment Share Follow 0 reply Please log in or register to add a comment.