|
-
July 16th, 2010, 04:51 PM
#1
New Idea, i need help with
okay so this is what i need done:
A) A program that creates all of the 2097152 different possibilities of a KiloByte
B) Each unique Kilobyte Created as a 1KB File with file name ranging 1-2097152
Knowledge base, high school C and html which i am rusty on....
This is probably very easy for you guys but for me, its like mount Everest,
so please be as descriptive as possible im working on an idea i had in high school that i left unfinished, so help me on my quest for knowledge!
-
July 16th, 2010, 05:22 PM
#2
Re: New Idea, i need help with
sorry, what's your question?
-
July 16th, 2010, 06:16 PM
#3
Re: New Idea, i need help with
i need help with how i should go about writting this program that will generate all 2097152 diffrent possibilities for the outcome of 1 Kilobyte and index them as seperate 1kb files named 1-2097152 for later use
when i say all 2097152 possibilities i mean to say
1 bit is = 00000000 there are 2^8=256 possibilities of this 8 digit string
1 byte is = 8 bit 256*8 = 2048 possibilities for the byte
1 KB = 1024 bytes 256*8*1024 = 2097152 possibilities for the Kilobyte
so generating all 2097152 different variable outcomes for the KB and labeling a value 1-2097152
-
July 16th, 2010, 08:10 PM
#4
Re: New Idea, i need help with
 Originally Posted by Tyrael
i need help with how i should go about writting this program that will generate all 2097152 diffrent possibilities for the outcome of 1 Kilobyte and index them as seperate 1kb files named 1-2097152 for later use
How come you think that all possible 1 kB combinations amount to just 2 M? 
1 bit is = 00000000 there are 2^8=256 possibilities of this 8 digit string
That's right. So far so good.
1 byte is = 8 bit 256*8 = 2048 possibilities for the byte
Why that? Just one line above you stated correctly that a single byte has 256 possibilities.
1 KB = 1024 bytes 256*8*1024 = 2097152 possibilities for the Kilobyte
Definitely not!
1 kB is 8192 bits, giving you 2^8192 possible combinations. Expressed in the decimal system this number would have 2467 digits. I (and I suppose everyone else too) do not even have a name for that number. And this number has still to be multiplied by 1024 to get the storage space (in bytes) needed for all that files you want to create. (Not even counting the storage required for their directory entries and other "irrelevant" stuff that would already be huge by itself.) This is not only an "Everest" for you, but for all storage systems on earth altogether! (Well, that picture isn't that correct at all: The Everest has been mastered! )
I think you should inverst your efforts in projects that are a bit smaller for now...
-
July 17th, 2010, 09:36 AM
#5
Re: New Idea, i need help with
right so my before math was right and its 262144 and not the 2 million number,
262144 posibilities of one Kilybyte listen i am rusty and im trying to get back into it.
8 bits = 1 byte 1 byte has 256 possibilities,
kb = 1024 bytes so 256*1024=262144
my bad 262144 the other number i got was this * 8 to factor in 8 bits, but 256 is 2^8, 8 bits
see rusty and rushing to try and learn something....
anyways not the point
enough hacking and slashing at me and some help all ready cause this should be pretty simple
for you who are so great,
like i know this is easy and that i can do it, i just need good references to **** that will help me figure out how to write it, cause i need a formula to generate all 256 possibilities of the byte
and from there i can duplicate it and multiply them to get my other 262144 results
but how do i start on even the 256?
IS that simple enough?
a script to generate all 256 different byte's possible?
-
July 17th, 2010, 09:44 AM
#6
Re: New Idea, i need help with
 Originally Posted by Tyrael
i need help with how i should go about writting this program that will generate all 2097152 diffrent possibilities for the outcome of 1 Kilobyte and index them as seperate 1kb files named 1-2097152 for later use
One question: why do you need such a program?
Regards,
Paul McKenzie
-
July 17th, 2010, 01:16 PM
#7
Re: New Idea, i need help with
-
July 17th, 2010, 06:46 PM
#8
Re: New Idea, i need help with
Tyrael, you didn't understand what Eri523 tried to tell you.
First, you're calculating the number of possibilities the wrong way - the equation should be applied the same way as for a byte.
Think of it like this:1B has 8 bits, and each bit can have 2 possible values. Thus: 2*2*2*2*2*2*2*2 = 2^8.
1KB has 1024 B, which is 8192 bits, and each, again, can have 2 possible values. Thus: 2^8192 = 1.09 * 10^2466.
This is a number bigger than 1 followed by 2466 zeros!
This means that you would need that many 1KB files.
Translated to, say, gigabytes, its: 1.04 * 10^2460 GB!!!
No computer in the world has that much memory! Not even any modern supercomputer!
Even if every person in the world had a PC with 1 PB (1 petabyte = 1024 TB = 1024*1240 GB) of memory, and if you were allowed to use all those computers, even then it wouldn't be enough!
So, the solution to the problem you posted can only exist in theory...
Last edited by TheGreatCthulhu; July 17th, 2010 at 06:49 PM.
-
July 17th, 2010, 07:18 PM
#9
Re: New Idea, i need help with
Thanks for jumping in, TheGreatCthulhu. 
 Originally Posted by TheGreatCthulhu
Even if every person in the world had a PC with 1 PB (1 petabyte = 1024 TB = 1024*1240 GB) of memory, and if you were allowed to use all those computers, even then it wouldn't be enough!
Now that should finally be understood. If not...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|