Content deleted Content added
Em3rgent0rdr (talk | contribs) →Canonical unary codes: lots of clarification needed in this section. |
Em3rgent0rdr (talk | contribs) shorten wording on thermometer code. |
||
Line 1:
{{Short description|Entropy encoding}}
'''Unary coding''',<ref group="nb" name="NB1"/> or the [[unary numeral system]], is an [[entropy encoding]] that represents a [[natural number]], ''n'', with ''n'' ones followed by a zero (if the term ''natural number'' is understood as ''non-negative integer'') or with ''n'' − 1 ones followed by a zero (if the term ''natural number'' is understood as ''strictly positive integer''). A unary number's code length would thus be ''n'' + 1 with that first definition, or ''n'' with that second definition.
{| class="wikitable"
! Unary code !! Alternative
|