state. A method illustrated above can deal with a data stream inversion (it is called
180° ambiguity). Sometimes it is enough (e.g. if BPSK is used or if other ambiguities are detected by other circuits, such as a
Viterbi decoder or a
frame synchronizer) and sometimes it isn't. Generally speaking, a
differential coding applies to
symbols (these are not necessary the same symbols as used in the modulator). To resolve
180° ambiguity only, bits are used as these symbols. When dealing with
90° ambiguity, pairs of bits are used, and triplets of bits are used to resolve
45° ambiguity (e.g. in
8PSK). A
differential encoder provides the () operation, a
differential decoder - the () operation. Both differential encoder and differential decoder are discrete
linear time-invariant systems. The former is recursive and
IIR, the latter is non-recursive and thus
FIR. They can be analyzed as
digital filters. A
differential encoder is similar to an analog
integrator. It has an
impulse response :h(k)=\begin{cases} 1, & \mbox{if } k \ge 0 \\ 0, & \mbox{if } k and a
transfer function :H(z)=\frac{1}{1-z^{-1}}. A
differential decoder is thus similar to an analog
differentiator, its impulse response being :h(k)=\begin{cases} 1, & \mbox{if } k=0 \\ -1, & \mbox{if } k=1 \\ 0, & \mbox {otherwise} \end{cases} and its transfer function :H(z)=1-z^{-1}. Note that in binary (modulo-2) arithmetic, addition and subtraction (and positive and negative numbers) are equivalent. ==Generalized differential coding==