Replies: 1 comment 1 reply
-
|
The issue arises from how To resolve this:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#include
#include
#include
using namespace std;
int main() {
unsigned long long Bit1{ 0 };
Bit1 = (unsigned long long) (pow(2, 64) - 1);
println("(2^64)-1 = |{:64b}|\n", Bit1);
Bit1 = (unsigned long long) (pow(2, 63) - 1);
println("(2^63)-1 = |{:64b}|\n", Bit1);
Bit1 = (unsigned long long) (pow(2, 32) - 1);
println("(2^32)-1 = |{:64b}|\n", Bit1);
}
Result :
(2 ^ 64) - 1 = |10000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000|
(2 ^ 63) - 1 = |10000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000|
(2 ^ 32) - 1 = |11111111.11111111.11111111.11111111|
Beta Was this translation helpful? Give feedback.
All reactions