---
title: differential coding
slug: differential-coding
qid: Q5275338
snapshot: differential-coding-600985-4fbf3602d2d8518b
content_hash: 4fbf3602d2d8518bb5028c6e055afd4d3b8cd67d22401bd2d6bb9752115868ab
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1374163989
tags: [131300176, 23603337, 26220375]
---

# differential coding

> [!note] Provenance
> Snapshot `differential-coding-600985-4fbf3602d2d8518b` · content root `4fbf3602d2d8518b…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1374163989> · Licensed CC BY-SA 4.0

In digital communications, differential coding is a technique used to provide unambiguous signal reception when using some types of modulation. It makes transmissible data dependent on both the current and previous signal (or symbol) states. The common types of modulation that may be used with differential coding include phase-shift keying and quadrature amplitude modulation.

In digital communications, differential coding is a technique used to provide unambiguous signal reception when using some types of modulation. It makes transmissible data dependent on both the current and previous signal (or symbol) states. The common types of modulation that may be used with differential coding include phase-shift keying and quadrature amplitude modulation. Similarly for BPSK. To demodulate BPSK, one needs to make a local oscillator synchronous with the remote one. This is accomplished by a carrier recovery circuit. However, the integer part of the recovered carrier is ambiguous. There are n valid but not equivalent phase shifts between the two oscillators. For BPSK, n = 2; the symbols appear inverted or not. Differential encoding prevents inversion of the signal and symbols, respectively, from affecting the data. Assuming that x_i is a bit intended for transmission and y_{i-1} was the symbol just transmitted, then the symbol to be transmitted for x_i is where \oplus{} indicates binary or modulo-2 addition. On the decoding side, x_i is recovered as That is, x_i depends only on a difference between the symbols y_i and y_{i-1} and not on their values (inverted or not). There are several different line codes designed to be polarity insensitive - whether the data stream is inverted or not, the decoded data will always be correct. The line codes with this property include differential Manchester encoding, bipolar encoding, NRZI, biphase mark code, coded mark inversion, and MLT-3 encoding. 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== Using the relation y_{i-1} \oplus x_i = y_i is not the only way of carrying out differential encoding. More generally, it can be any function u = F(y, x) provided that an equation u_0 =F (y_0, x) has one and only one solution for any y_0 and u_0 . x_i=y_i \oplus y_{i-1} and x_{i+1}=y_{i+1} \oplus y_i . This approximately doubles the BER at signal-to-noise ratios for which errors rarely occur in consecutive symbols.
