On 20 Nov, 09:49, cnoe <azeez...@gmail.comwrote:
I'm guessing your first language isn't english.
I'm left struggling to understand what you mean.
Could you provide a sample input and its corresponding
output.
input string: "1100001"
output string: "1111110"
or whatever
Quote:
I need to program this.
The first step is to clearly define what you are trying to do
Quote:
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..........
those are actual bits? Or characters?
Quote:
for easy understanding lets take this
>
1 1 0 0 0 0 1 =X
why are there seven of them? Why not 8?
Quote:
assume there is an idle case like this
>
1 1 1 1 1 1 1 = Y
why is this an "idle case"? Assume we have no idea what
your problem domain is.
Quote:
now Y has 7 cases, each case has 2 chances
either 1 or 0
>
'Z' is particular case
a particular 1 or 0?
Quote:
first position is changed to 0
1 1 1 1 1 1 0
and matched with X
how can you compare a position (a single bit?) with
7 bits?
Quote:
not as a number[whether x is y, or not],
what are x and y?
Quote:
but from left to right checking 'individual' digits
nope you completly lost me here. Could you give an example?
Quote:
If one digit is not matching, then the case is failed
why can't you just load the bits into a byte and compare the bytes?
does "true" mean "matching"?
Quote:
then checking Y's 2nd digit with X's ,so on
what?
Quote:
if all the cases are failed
what?
Quote:
Now Y's second case * is
I thought a "case" was a bit (or a bit position)
Quote:
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
do you mean as in big-O?
Quote:
can I take Z count,
Z?
Quote:
*so that
>
If I change the 1 1 1 1 *1 1 1=Y
you change the value of Y?
Quote:
for Z count times,
what does "Z count" mean?
Quote:
I can get * * X.
>
Thanks.
no problem...
--
Nick Keighley