-  [WT]  [PS]  [Home] [Manage]

[Return]
Posting mode: Reply
  1.   (reply to 17798)
  2.   Help
  3. (for post and file deletion)
/sci/ - Science, Technology, Engineering, and Mathematics

Join us in IRC!

•This is not /b/ or /halp/. Tech support has its own board.
•If you are not contributing directly to a thread, sage your post.
•Keep the flaming at a minimum.
•Tripcodes⁄Namefags are not only tolerated here, they are encouraged.
•We are here to discuss sci-tech, not pseudoscience. Do not post off-topic.

•♥ Integris


  • Supported file types are: GIF, JPG, PNG, WEBM
  • Maximum file size allowed is 5120 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 742 unique user posts. View catalog

  • Blotter updated: 2018-08-24 Show/Hide Show All

We are in the process of fixing long-standing bugs with the thread reader. This will probably cause more bugs for a short period of time. Buckle up.

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.

WebM is now available sitewide! Please check this thread for more info.

Huge numbers. Really huge Anonymous 21/09/19(Sun)09:24 No. 17798 ID: b04a98
17798

File 163203627322.png - (213.73KB , 1100x800 , Pellefant-och-Pip.png )

How many *bits* does it take to correctly represent a 200-million digit number?


>>
Anonymous 21/09/19(Sun)09:46 No. 17799 ID: 98ddba

Quite a bit.


>>
Anonymous 21/09/19(Sun)12:19 No. 17800 ID: 20e072

>>17799
>Quite a bit.
Chortle-chortle!

But seriously, is there a theoretical way to calculate it? Because it seems like a binary number will always require more digits than the decimal number it represents.

Of course you could like "cheat" and use half-bytes to represent every decimal number. For instance "10" would be written

0001 0000

Don't know if it's possible to use clever bit operations that way. Hmm... Allow me to think out loudly.

If you move the 1's one step to the left, you are doubling the number. So let's assume that we double the number 19 in a binary way:

00010011 = 16 + 3 + 1 = 19

00100110 = 32 + 4 + 2 = 38

Is it possible to do the same thing with half-bytes and get the same result?

0001 1100 = 1 & 4 + 2 = 1 & 6 = 16

0011 1000 = 2 + 1 & 8 = 3 & 4 = 34

No, it doesn't work.


>>
Anonymous 21/09/19(Sun)14:06 No. 17801 ID: 64685f

>it seems like a binary number will always require more digits than the decimal number it represents.
It will.
Each digit in a binary number has two states
Each digit in a decimal number has ten states

The closest we have is hexadecimal (16 states) which is a conversion of 4 bits = 1 byte = 16 states. But hex isn't really a numbering system, just shorthand.


>>
Anonymous 21/09/19(Sun)19:31 No. 17802 ID: c717bf

>>17801
I see.


>>
Anonymous 21/09/20(Mon)15:51 No. 17806 ID: be6f8f

The number of bits to represent an n-digit decimal number is the smallest integer that's >= n/log10(2). log10(2) is approximately 0.30103.


>>
Anonymous 21/09/20(Mon)21:17 No. 17807 ID: 10428b

>>17806
I see.

So how many logs for a 200-million digit number? Will it break my calculator to calculate this?


>>
Anonymous 21/09/20(Mon)23:33 No. 17808 ID: be6f8f

>>17807
A scientific calculator should handle it just fine. To represent 10^200,000,000 you'd need 664,385,619 bits, or about 79.2 MiB.


>>
Anonymous 21/09/21(Tue)10:23 No. 17809 ID: e5e11c

>>17808
>A scientific calculator should handle it just fine. To represent 10^200,000,000 you'd need 664,385,619 bits, or about 79.2 MiB.
Oh wow! You just made an insane huge number manageable for me. I thought I would need like 1 TB of RAM to handle it! XD


>>
Anonymous 21/09/21(Tue)18:08 No. 17813 ID: be6f8f

>>17809
I can also tell you how long the number that you could store in 1 TiB is.

1 TiB
1024^4 bytes
1,099,511,627,776 bytes
8,796,093,022,208 bits
about 2.6 trillion decimal digits


>>
Anonymous 21/09/22(Wed)00:58 No. 17814 ID: 8bcc12

>>17813
>I can also tell you how long the number that you could store in 1 TiB is.

>1 TiB
>1024^4 bytes
>1,099,511,627,776 bytes
>8,796,093,022,208 bits
>about 2.6 trillion decimal digits

Is there any limits to your powers? XD


>>
Anonymous 21/09/29(Wed)23:31 No. 17818 ID: 8e3312

>>17808
>>A scientific calculator should handle it just fine. To represent 10^200,000,000 you'd need 664,385,619 bits, or about 79.2 MiB.

A 664,385,619-bit number is too much. But according to my calculations it's 83,048,202 bytes. Would it be possible to string together a bunch of bytes to create a "virtual" 664,385,619-bit variable? Because a 32-bit variable is just 4 bytes.


>>
Anonymous 21/09/30(Thu)01:12 No. 17819 ID: 126958

>>17818
Note that when I said that a scientific calculator should be able to handle it, I was referring to the calculation of 200M divided by 0.30103. Obviously most calculators don't have over 70 megs of memory.

>Would it be possible to string together a bunch of bytes to create a "virtual" 664,385,619-bit variable?
Of course. The technique is called "arbitrary precision arithmetic". There are programming libraries that implement efficient algorithms to operate on such large values. For example: https://gmplib.org/
664 million bits is pretty big, but it fits comfortably in a PC's memory nowadays. I don't think there's any application for such a huge number, though. Even in cryptography the largest numbers commonly used are only 4096-bit, and there are no primes longer that 83 million bits.
https://www.mersenne.org/primes/


>>
Anonymous 21/09/30(Thu)21:20 No. 17823 ID: ae5046
17823

File 163302965397.png - (753.10KB , 1683x2432 , 1491634557010.png )

>>17819
Thanks a lot! :-)


>>
Anonymous 21/10/01(Fri)05:04 No. 17824 ID: 126958

>>17819
Oops. LOL. No KNOWN primes longer than 83 million bits.


>>
Anonymous 21/10/09(Sat)22:47 No. 17834 ID: d2a5e8

A little off-topic, but if you guys like extremely huge (finite) numbers, check out this youtube playlist:
https://www.youtube.com/playlist?list=PLUZ0A4xAf7nkaYHtnqVDbHnrXzVAOxYYC


>>
Anonymous 21/10/10(Sun)18:05 No. 17836 ID: 220f76

>>17834
Thanks! :-)



[Return] [Entire Thread] [Last 50 posts]



Delete post []
Password  
Report post
Reason