Wt D Manchester Nrz Nrzi Promo 6080cd13035b8

What’s the Difference Between NRZ, NRZI, and Manchester Encoding?

July 1, 2024
NRZ, NRZI, and Manchester are popular serial encoding mechanisms. Find out how they differ from each other.

This article is part of the Communication Series: What’s the Difference: Serial Communications 101

Members can download this article in PDF format.

What You'll Learn:

  • What's the difference between NRZ, Manchester (Phase Encoding or PE), NRZI, and RZ, coding.
  • What's the difference between unipolar and bipolar signaling.
  • How clocking is determined to extract data
  • Which encoding methods require larger bandwidth

 

Non-return-to-zero (NRZ), non-return-to-zero-inverted (NRZI), return-to-zero (RZ), and Manchester are popular serial encoding mechanisms (see figure). Each has different characteristics that make it useful in different applications. Those dealing with UARTs will find NRZ to be the most familiar.

There is also a unipolar and bipolar version for many of these encodings. Unipolar has a transition between a zero and positive. The actual measurement can be one of many types of attributes from like voltage, current, pressure, or optical. A bipolar system has a transition between a positive and negative. Any method can employ a bipolar encoding but logically they may be the same as shown with the NRZ example.

The figure shows signals synchronized with a clock at the bottom. The types and locations of the transitions are what make the encoding mechanisms different.

NRZ has a level the matches the logical signal where a 1 is a positive voltage or current. In this case the clock would latch the value being transmitted at the start of each clock cycle and it would be sampled at the receiving end in the middle of the clock cycle. NRZ is commonly used with serial ports. The receiver normally has a faster clock that is synchronized with a rising or falling edge of the data transmission. This allows the determination of the center of the clock cycle to be more accurately determined (Fig. 1).

RZ uses pulses at the start of the clock cycle to indicate a 1 value. In the bipolar version, sequential 1 values have a transition in the opposite directions. RZ will always have a transition when there are 1 values in the data. This approach provides self-clocking support because of the pulse transitions.

Manchester and NRZI encodings have transitions in the middle of the clock cycle, with the type depending on the encoding. Manchester, also known as phase encoding (PE), is an NRZ encoding that is exclusively-ORed with the clock. This provides at least one transition per bit. NRZI also uses a transition in the middle of the clock cycle, but this only occurs when there is a 1 value. Manchester makes clock recovery easier.

The challenge with Manchester and RZ is the frequency of the data transmission is twice that as NRZ and NRZI. The tradeoffs depend upon the mechanisms used to implement the communication. Sometimes bandwidth can be an issue.

These encoding schemes are just the starting point used for most data transmission systems. For example, universal asynchronous receiver-transmitters (UART) map an asynchronous per/byte sequence that includes a start bit and one or more stop bits. A parity bit can be included to assist in error detection. Higher level protocols often forego the parity bit and compute parity or a CRC over a data packet. This helps reduce the overhead for error detection.

Synchronous systems typically have an idle character that can be recognized in addition to a clock recovery/synchronization scheme. Encoding schemes like Manchester encoding make this easier to implement. The synchronous support often uses encoding schemes like 4B/5B and 8B/10B. The 4B/5B uses 5 bits to encode 16 (4-bit) symbols that are unique enough that clock recovery/synchronization is possible using encodings like NRZ.

There is a bandwidth penalty with these higher level encoding schemes. The larger the collection, the lower the overhead but they require tighter timing and more complex synchronization logic. The approach scales and 64B/66B is used with 10 Gbit Ethernet.

Read more from the Communication Series: What’s the Difference: Serial Communications 101

Originally posted on 2/13/2017.

 

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!