449,102 Members | 1,047 Online
Need help? Post your question and get tips & solutions from a community of 449,102 IT Pros & Developers. It's quick & easy.

# file stream 1's 0's ?

 P: n/a I need to program this. I'm not asking any code, but an idea from you would be helpful. Thanks. I open a binary file stream, which has millions or trillions of 1's & 0's some thing like this 1100100011101110111.......... for easy understanding lets take this 1 1 0 0 0 0 1 =X assume there is an idle case like this 1 1 1 1 1 1 1 = Y now Y has 7 cases, each case has 2 chances either 1 or 0 'Z' is particular case first position is changed to 0 1 1 1 1 1 1 0 and matched with X not as a number[whether x is y, or not], but from left to right checking 'individual' digits If one digit is not matching, then the case is failed if true, then checking Y's 2nd digit with X's ,so on if all the cases are failed Now Y's second case is 1 1 1 1 1 0 1 1 1 1 1 1 0 0 and again repeating the same procedure if x & y has trillions of 1's and 0's what is the complexity of the program can I take Z count, so that If I change the 1 1 1 1 1 1 1=Y for Z count times, I can get X. Thanks. Nov 20 '08 #1
5 Replies

 P: n/a On 20 Nov, 09:49, cnoe

 P: n/a On Nov 20, 3:18*pm, Nick Keighley wrote: On 20 Nov, 09:49, cnoe

 P: n/a cnoe wrote: 1 1 1 1 1 1 1 1 1 1 1 1 1 [create an idle case with 12 1's] s/idle/ideal/ ?? Bye, Jojo Nov 20 '08 #4

 P: n/a On 20 Nov, 10:24, cnoe wrote: On 20 Nov, 09:49, cnoe

 P: n/a cnoe wrote: I need to program this. I'm not asking any code, but an idea from you would be helpful. Thanks. I open a binary file stream, which has millions or trillions of 1's & 0's some thing like this 1100100011101110111.......... Are you talking about bits or bytes? What do you think "binary file stream" means in C? -- pete Nov 20 '08 #6

### This discussion thread is closed

Replies have been disabled for this discussion.