Manchester code
Encyclopedia
In telecommunication
and data storage
, Manchester code (also known as Phase Encoding, or PE) is a line code
in which the encoding of each data bit
has at least one transition and occupies the same time. It therefore has no DC component, and is self-clocking
, which means that it may be inductively or capacitively coupled, and that a clock signal
can be recovered from the encoded data.
Manchester code is widely used (e.g., in Ethernet
; see also RFID or Near Field Communication
). There are more complex codes, such as 8B/10B encoding
, that use less bandwidth to achieve the same data rate but may be less tolerant of frequency errors and jitter
in the transmitter and receiver reference clocks.
.
The DC
component of the encoded signal is not dependent on the data and therefore carries no information, allowing the signal to be conveyed conveniently by media (e.g., Ethernet) which usually do not convey a DC component.
Summary:
Manchester code always has a transition at the middle of each bit period and may (depending on the information to be transmitted) have a transition at the start of the period also. The direction of the mid-bit transition indicates the data. Transitions at the period boundaries do not carry information. They exist only to place the signal in the correct state to allow the mid-bit transition. The existence of guaranteed transitions allows the signal to be self-clocking, and also allows the receiver to align correctly; the receiver can identify if it is misaligned by half a bit period, as there will no longer always be a transition during each bit period. The price of these benefits is a doubling of the bandwidth requirement compared to simpler NRZ
coding schemes (or see also NRZI).
In the Thomas convention, the result is that the first half of a bit period matches the information bit and the second half is its complement.
of a square wave carrier
whose frequency is the data rate. Such a signal is easy to generate.
The first of these was first published by G. E. Thomas in 1949 and is followed by numerous authors (e.g., Tanenbaum
). It specifies that for a 0 bit the signal levels will be Low-High (assuming an amplitude physical encoding of the data) - with a low level in the first half of the bit period, and a high level in the second half. For a 1 bit the signal levels will be High-Low.
The second convention is also followed by numerous authors (e.g., Stallings
) as well as by IEEE 802.4 (token bus) and lower speed versions of IEEE 802.3
(Ethernet) standards. It states that a logic 0 is represented by a High-Low signal sequence and a logic 1 is represented by a Low-High signal sequence.
If a Manchester encoded signal is inverted in communication, it is transformed from one convention to the other. This ambiguity can be overcome by using differential Manchester encoding
.
Telecommunication
Telecommunication is the transmission of information over significant distances to communicate. In earlier times, telecommunications involved the use of visual signals, such as beacons, smoke signals, semaphore telegraphs, signal flags, and optical heliographs, or audio messages via coded...
and data storage
Data storage
Data storage can refer to:* Computer data storage; memory, components, devices and media that retain digital computer data used for computing for some interval of time....
, Manchester code (also known as Phase Encoding, or PE) is a line code
Line code
In telecommunication, a line code is a code chosen for use within a communications system for baseband transmission purposes...
in which the encoding of each data bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...
has at least one transition and occupies the same time. It therefore has no DC component, and is self-clocking
Self-clocking signal
In telecommunications and electronics, a self-clocking signal is one that can be decoded without the need for a separate clock signal or other source of synchronization...
, which means that it may be inductively or capacitively coupled, and that a clock signal
Clock signal
In electronics and especially synchronous digital circuits, a clock signal is a particular type of signal that oscillates between a high and a low state and is utilized like a metronome to coordinate actions of circuits...
can be recovered from the encoded data.
Manchester code is widely used (e.g., in Ethernet
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....
; see also RFID or Near Field Communication
Near Field Communication
Near field communication, or NFC, allows for simplified transactions, data exchange, and wireless connections between two devices in proximity to each other, usually by no more than a few centimeters. It is expected to become a widely used system for making payments by smartphone in the United States...
). There are more complex codes, such as 8B/10B encoding
8B/10B encoding
In telecommunications, 8b/10b is a line code that maps 8-bit symbols to 10-bit symbols to achieve DC-balance and bounded disparity, and yet provide enough state changes to allow reasonable clock recovery. This means that the difference between the count of 1s and 0s in a string of at least 20 bits...
, that use less bandwidth to achieve the same data rate but may be less tolerant of frequency errors and jitter
Jitter
Jitter is the undesired deviation from true periodicity of an assumed periodic signal in electronics and telecommunications, often in relation to a reference clock source. Jitter may be observed in characteristics such as the frequency of successive pulses, the signal amplitude, or phase of...
in the transmitter and receiver reference clocks.
Features
Manchester code ensures frequent line voltage transitions, directly proportional to the clock rate; this helps clock recoveryClock recovery
Some digital data streams, especially high-speed serial data streams are sent without an accompanying clock signal. The receiver generates a clock from an approximate frequency reference, and then phase-aligns to the transitions in the data stream with a phase-locked loop...
.
The DC
Direct current
Direct current is the unidirectional flow of electric charge. Direct current is produced by such sources as batteries, thermocouples, solar cells, and commutator-type electric machines of the dynamo type. Direct current may flow in a conductor such as a wire, but can also flow through...
component of the encoded signal is not dependent on the data and therefore carries no information, allowing the signal to be conveyed conveniently by media (e.g., Ethernet) which usually do not convey a DC component.
Description
Extracting the original data from the received encoded bit (from Manchester as per 802.3):Summary:
- Each bit is transmitted in a fixed time (the "period").
- A 0 is expressed by a low-to-high transition, a 1 by high-to-low transition (according to G.E. Thomas' convention -- in the IEEE 802.3 convention, the reverse is true).
- The transitions which signify 0 or 1 occur at the midpoint of a period.
- Transitions at the start of a period are overhead and don't signify data.
Manchester code always has a transition at the middle of each bit period and may (depending on the information to be transmitted) have a transition at the start of the period also. The direction of the mid-bit transition indicates the data. Transitions at the period boundaries do not carry information. They exist only to place the signal in the correct state to allow the mid-bit transition. The existence of guaranteed transitions allows the signal to be self-clocking, and also allows the receiver to align correctly; the receiver can identify if it is misaligned by half a bit period, as there will no longer always be a transition during each bit period. The price of these benefits is a doubling of the bandwidth requirement compared to simpler NRZ
Non-return-to-zero
In telecommunication, a non-return-to-zero line code is a binary code in which 1's are represented by one significant condition and 0's are represented by some other significant condition , with no other neutral or rest condition. The pulses have more energy than a RZ code...
coding schemes (or see also NRZI).
In the Thomas convention, the result is that the first half of a bit period matches the information bit and the second half is its complement.
Manchester encoding as phase-shift keying
Manchester encoding is a special case of binary phase-shift keying (BPSK), where the data controls the phasePhase (waves)
Phase in waves is the fraction of a wave cycle which has elapsed relative to an arbitrary point.-Formula:The phase of an oscillation or wave refers to a sinusoidal function such as the following:...
of a square wave carrier
Carrier wave
In telecommunications, a carrier wave or carrier is a waveform that is modulated with an input signal for the purpose of conveying information. This carrier wave is usually a much higher frequency than the input signal...
whose frequency is the data rate. Such a signal is easy to generate.
Conventions for representation of data
There are two opposing conventions for the representations of data.The first of these was first published by G. E. Thomas in 1949 and is followed by numerous authors (e.g., Tanenbaum
Andrew S. Tanenbaum
Andrew Stuart "Andy" Tanenbaum is a professor of computer science at the Vrije Universiteit, Amsterdam in the Netherlands. He is best known as the author of MINIX, a free Unix-like operating system for teaching purposes, and for his computer science textbooks, regarded as standard texts in the...
). It specifies that for a 0 bit the signal levels will be Low-High (assuming an amplitude physical encoding of the data) - with a low level in the first half of the bit period, and a high level in the second half. For a 1 bit the signal levels will be High-Low.
The second convention is also followed by numerous authors (e.g., Stallings
William Stallings
Dr. William Stallings is an American author. He has authored textbooks on computer science topics such as operating systems, computer networks, computer organization, and cryptography. He also maintains an advertisement-free website titled Computer Science Student Resource.Stallings received his...
) as well as by IEEE 802.4 (token bus) and lower speed versions of IEEE 802.3
IEEE 802.3
IEEE 802.3 is a working group and a collection of IEEE standards produced by the working group defining the physical layer and data link layer's media access control of wired Ethernet. This is generally a local area network technology with some wide area network applications...
(Ethernet) standards. It states that a logic 0 is represented by a High-Low signal sequence and a logic 1 is represented by a Low-High signal sequence.
If a Manchester encoded signal is inverted in communication, it is transformed from one convention to the other. This ambiguity can be overcome by using differential Manchester encoding
Differential Manchester encoding
Differential Manchester encoding, also called biphase mark code or FM1, is a line code in which data and clock signals are combined to form a single 2-level self-synchronizing data stream. It is a differential encoding, using the presence or absence of transitions to indicate logical value...
.
See also
- Coded mark inversionCoded mark inversionIn telecommunication, coded mark inversion is a non-return-to-zero line code. It encodes zero bits as a half bit time of zero followed by a half bit time of one, and while one bits are encoded as a full bit time of a constant level...
- Differential Manchester encodingDifferential Manchester encodingDifferential Manchester encoding, also called biphase mark code or FM1, is a line code in which data and clock signals are combined to form a single 2-level self-synchronizing data stream. It is a differential encoding, using the presence or absence of transitions to indicate logical value...
- Self-clocking signalSelf-clocking signalIn telecommunications and electronics, a self-clocking signal is one that can be decoded without the need for a separate clock signal or other source of synchronization...
- Binary Offset Carrier modulation