where the tilde denotes receiving-end data.
Each digit in the encoded sequence is obtained by comparing the present input bit with the past encoded bit. A binary 1 is encoded if the present input bit and the past encoded bit are of opposite state, and a binary 0 is encoded if the states are the same. This is equivalent to the truth table of an XOR (exclusive-OR) gate or a modulo 2 adder. An example of an encoded sequence is shown in Table 3-4, where the beginning reference digit is a binary 1. At the receiver, the encoded signal is decoded by comparing the state of adja¬cent bits. If the present received encoded bit has the same state as the past encoded bit, a binary 0 is the decoded output. Similarly, a binary 1 is decoded for opposite states. As shown in the table, the polarity of the differentially encoded waveform may be inverted without affecting the decoded data. This is a great advantage when the waveform is passed through thousands of circuits in a communication system and the positive sense of the output is lost or changes occasionally as the network changes, such as sometimes occurs during switching between several data paths.