What is the largest value you can represent using a 256-bit unsigned integer? unsigned means non-negative correct?
What is the largest value you can represent using a 256-bit unsigned integer? unsigned means non-negative correct?
1.1579208923731619542357098500869e+77
Next time, get your calculator out and figure it out for yourself,#
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I would if I knew how hence me having to ask. How did you do that?Originally Posted by Salem
A 256 bit data type There is currently no such thing. Most compilers support a 64 bit data type (long long or __int64). But a 256 bit data could have a range of approximately 1.1579208923731619542357098500869e+77 And yes, that is what unsigned means. Edit: 2 ^ 256. Not the XOR, the exponent.
Oh I get it now. But would it not be 2^256 - 1?Originally Posted by Tonto
>How did you do that?
Assuming the Windows calculator, enter 2, then choose the x^y button, then enter 256 and hit the = button.
My best code is written with the delete key.
Betcha-you-have-to-explain-how-to-get-from-basic-to-scientific-mode
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Or, if you want the exact value:
11579208923731619542357098500868790785326998466564 0564039457584007913129639935
Last edited by XSquared; 08-04-2006 at 01:32 PM.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
Wow. A little harsh don't ya think. We all have to start somewere. I more so was looking for help with the theory behind it.Originally Posted by Salem
Thanks for the help though,
Chad
yes it should be 2^256 - 1 as the max value or 2^256 combinations
There is not the slightest indication that [nuclear energy] will ever be obtainable. It would mean that the atom would have to be shattered at will.
-Albert Einstein, 1932