# Line code

 related topics {system, computer, user} {math, number, function} {rate, high, increase}

In telecommunication, a line code (also called digital baseband modulation) is a code chosen for use within a communications system for baseband transmission purposes. Line coding is often used for digital data transport.

## Contents

### Line coding

Line coding consists of representing the digital signal to be transported by an amplitude- and time-discrete signal that is optimally tuned for the specific properties of the physical channel (and of the receiving equipment). The waveform pattern of voltage or current used to represent the 1s and 0s of a digital data on a transmission link is called line encoding. The common types of line encoding are unipolar, polar, bipolar and Manchester encoding.

For reliable clock recovery at the receiver, one usually imposes a maximum run length constraint on the generated channel sequence, i.e. the maximum number of consecutive ones or zeros is bounded to a reasonable number. A clock period is recovered by observing transitions in the received sequence, so that a maximum run length guarantees such clock recovery, while sequences without such a constraint could seriously hamper the detection quality.

After line coding, the signal is put through a "physical channel", either a "transmission medium" or "data storage medium". Sometimes the characteristics of two very different-seeming channels are similar enough that the same line code is used for them. The most common physical channels are:

• the line-coded signal can directly be put on a transmission line, in the form of variations of the voltage or current (often using differential signaling).
• the line-coded signal (the "base-band signal") undergoes further pulse shaping (to reduce its frequency bandwidth) and then modulated (to shift its frequency bandwidth) to create the "RF signal" that can be sent through free space.
• the line-coded signal can be used to turn on and off a light in Free Space Optics, most commonly infrared remote control.
• the line-coded signal can be printed on paper to create a bar code.
• the line-coded signal can be converted to a magnetized spots on a hard drive or tape drive.
• the line-coded signal can be converted to a pits on optical disc.

Unfortunately, most long-distance communication channels cannot transport a DC component. The DC component is also called the disparity, the bias, or the DC coefficient. The simplest possible line code, called unipolar because it has an unbounded DC component, gives too many errors on such systems.