# Hybrid ternary code

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Hybrid_ternary_code
> Markdown URL: https://mediated.wiki/source/Hybrid_ternary_code.md
> Source: https://en.wikipedia.org/wiki/Hybrid_ternary_code
> Source revision: 1255494509
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Type of ternary line code in telecommunications}}
{{refimprove|date=August 2014}}
In telecommunications, the '''hybrid (H-) ternary line code''' is a [line code](/source/line_code) that operates on a hybrid principle combining the binary [non-return-to-zero-level](/source/NRZL) (NRZL) and the polar [return-to-zero](/source/return-to-zero) (RZ) codes.

The H-ternary code has three levels for signal representation; these are positive (+), zero (0), and negative (−). These three levels are represented by three states. The state of the [line code](/source/line_code) could be in any one of these three states. A transition takes place to the next state as a result of a binary input 1 or 0 and the encoder's present output state. The encoding procedure is as follows.<ref>{{cite book|doi=10.1109/ICII.2001.983628|volume=2|pages=503–507|publisher=[IEEE Xplore](/source/IEEE_Xplore)|author1=Glass, A. |author2=Ali, B. |author3=Bastaki, E. |date=2001 |title=2001 International Conferences on Info-Tech and Info-Net. Proceedings (Cat. No.01EX479) |chapter=Design and modeling of H-ternary line encoder for digital data transmission |isbn=0-7803-7010-4|s2cid=62247348 }}</ref>
{|class=wikitable style="text-align:center;"
! Input bit !! Prior output !! Output level
|-
!rowspan=3| 0
| + ||rowspan=2| −
|-
| 0
|-
| − ||rowspan=2| 0
|-
!rowspan=3| 1
| +
|-
| 0 ||rowspan=2| +
|-
| −
|-
|}

# In general, the encoder outputs + level for a binary 1 input and a − level for a binary 0 input.
# However, if this would result in the same output level as the previous bit time, a 0 level is output instead.
# Initially, the encoder output present state is assumed at 0 level when the first bit arrives at the encoder input.

The new line-coding scheme violates the encoding rule of NRZ-L when a sequence of 1s or 0s arrives and hence, it overcomes some of their deficiencies. During the violation period for a run of 1s or 0s, it operates on the same encoding rule of the polar RZ but with pulse occupancy of full period.

NRZ-L and polar RZ codes have deficiencies compared to the proposed H-ternary encoding scheme. NRZ-L code lacks sufficient timing information when the binary signal remains at one level in of either 1 or 0. This has direct influence on synchronising the receiver clock with that of the transmitter and, as a result, has impact on the detection of the received digital signal.

The H-ternary code has also timing superiority compared to similar ternary codes.  Other ternary line code such as [alternate mark inversion](/source/alternate_mark_inversion) (AMI) also lacks the timing information when a run of zeros needs to be transmitted. This drawback is partly overcome by its modified version the high density bipolar with three zeros substitution ([HDB3](/source/HDB3)).

On the other hand, the new code has a smaller [bandwidth](/source/Bandwidth_(signal_processing)) in comparison with the polar RZ code. The latter has its frequency spectral components concentrated at twice the original binary data rate because the polar RZ code has a pulse duty cycle of 50 percent.

==See also==
Other [line code](/source/line_code)s that have three states:

* [Bipolar encoding](/source/Bipolar_encoding)
* [MLT-3 encoding](/source/MLT-3_encoding)
* [Manchester encoding](/source/Manchester_encoding)
* [B3ZS](/source/B3ZS)
* [4B3T](/source/4B3T)

==References==
{{reflist}}

{{Bit-encoding}}

{{DEFAULTSORT:Hybrid Ternary Code}}
Category:Line codes

---
Adapted from the Wikipedia article [Hybrid ternary code](https://en.wikipedia.org/wiki/Hybrid_ternary_code) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Hybrid_ternary_code?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
