How many bits required for 2 ^ 43112609−1

If your a member of codenstuff then this is the main place to be. Get together..talk..chat and ponder. Have fun. Chill out. Play games.
5 posts Page 1 of 1
Contributors
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

I wonder how many bits are required for the number Image (2^43112609 − 1)?
I tried to search google for something but i didn't find a way to calculate it so i ask you. Ofcourse there is a price for it
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

There are 8 bits in a byte. A byte can be as large as 255.
The actual space that a number takes in memory depends on the math processor that is being used.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Could you give me an example? I have created a 128 bit integer by combining a ULong (low) and a Long(high). How many bits would i need for this type of structure?
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

You could create your own way to calculate thats not using the operators(like -,+)
But I'm not really into calculating
http://vagex.com/?ref=25000
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Your own way could be to use a list of many smaller data types that accurately represent the large number. There are some articles that describe how to work with big numbers.
5 posts Page 1 of 1
Return to “Codenstuff boardroom”