# Binary Cyclic Decoder

Decode systematic cyclic code to recover binary vector data

## Library

Block sublibrary of Error Detection and Correction

## Description

The Binary Cyclic Decoder block recovers a message vector from a codeword vector of a binary systematic cyclic code. For proper decoding, the parameter values in this block should match those in the corresponding Binary Cyclic Encoder block.

If the cyclic code has message length K and codeword length N, then N must have the form 2M-1 for some integer M greater than or equal to 3.

This block accepts a column vector input signal containing N elements. The output signal is a column vector containing K elements.

You can determine the systematic cyclic coding scheme in one of two ways:

• To create an [N,K] code, enter N and K as the first and second dialog parameters, respectively. The block computes an appropriate generator polynomial, namely, `cyclpoly(N,K,'min')`.

• To create a code with codeword length N and a particular degree-(N-K) binary generator polynomial, enter N as the first parameter and a polynomial string or a binary vector as the second parameter. The vector represents the generator polynomial by listing its coefficients in order of ascending exponents. You can create cyclic generator polynomials using the Communications System Toolbox™ `cyclpoly` function.

For information about the data types each block port supports, see the Supported Data Type table on this page.

## Dialog Box

Codeword length N

The codeword length N, which is also the input vector length.

Message length K, or generator polynomial

Either the message length, which is also the input vector length, a polynomial string, or a binary vector that represents the generator polynomial for the code.

## Supported Data Type

PortSupported Data Types
In
• Double-precision floating point

• Single-precision floating point

• Boolean

• 8-, 16-, and 32-bit signed integers

• 8-, 16-, and 32-bit unsigned integers

• Fixed-point

Out
• Double-precision floating point

• Single-precision floating point

• Boolean

• 8-, 16-, and 32-bit signed integers

• 8-, 16-, and 32-bit unsigned integers

• Fixed-point

## Pair Block

Binary Cyclic Encoder

`cyclpoly` (Communications Toolbox)