According to ICD GPS 200C, to decode the bits of a word you need to have the bits 29 and 30 of the previous word, this means that to get the bits 29 and 30 of the previous word you should know the bits 29 and 30 of the word before and so on. Now my question is that how do I start decoding? If I start receiving the bits, I don't know about the bits of the previous word because I didn't receive them, so how do I decode this first word I receive ?
You need to take in the first word of the subframe and ignore every thing in it except D29 and D30 which you carry forward to the next word.
It will probably be necessary to comprehend the higher level framing protocol that defines frames and subframes. No doubt at some part of the protocol framing boundary the previous D29 and D30 are assumed to be '0' or '1' for the first word of the frame.