This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Differential Encoder

Encode binary signal using differential coding


Source Coding


The Differential Encoder block encodes the binary input signal within a channel. The output is the logical difference between the current input element and the previous output element. More specifically, the input and output are related by

d(i0) = m(i0) XOR Initial condition parameter value

d(ik) = d(ik-1) XOR m(ik)


  • m is the input message.

  • d is the differentially encoded output.

  • ik is the kth element.

  • XOR is the logical exclusive-or operator.

This block accepts a scalar or column vector input signal and treats columns as channels.


Initial conditions

The logical exclusive-or of this value with the initial input value forms the initial output value.

Supported Data Type

PortSupported Data Types
  • Double-precision floating point

  • Single-precision floating point

  • Boolean

  • Integer

  • Fixed-point

  • Double-precision floating point

  • Single-precision floating point

  • Boolean

  • Integer

  • Fixed-Point


[1] Couch, Leon W., II, Digital and Analog Communication Systems, Sixth edition, Upper Saddle River, N. J., Prentice Hall, 2001.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

See Also


Introduced before R2006a