asked 174k views
3 votes
What is the largest decimal value you can represent, using an 86-bit signed integer?

asked
User Malarres
by
7.5k points

1 Answer

4 votes
2^85 - 1 or 38,685,626,227,668,133,590,597,631 Since you're using a 86-bit signed integer, the smallest number you can represent is -2^85 and the largest number you can represent is 2^85 - 1. Now what is 2^85 - 1? 2^85 - 1 = 38,685,626,227,668,133,590,597,631 An easy way to estimate how large of a number you can represent is to take the common logarithm of 2 and multiply by (n-1) where n is the number of bits in the signed integer value. Doing that gives. 0.30103 * 85 = 25.587 which tells you that you can represent every integer up to 25 digits long and some of the smaller 26 digit numbers.
answered
User Chatpitau
by
8.0k points

No related questions found