Content deleted Content added
Em3rgent0rdr (talk | contribs) unnecessarily confusing by squeezing too much into the first sentence, so split off code length to become second sentence, and make thermometer coding be its own sentence later with a bit of explanation. To hard to give example of 5 because have two definitions, so just introduced the table a little better. Move more technical stump on prefix-free code and a self-synchronizing code to be its own paragraph at end. |
Em3rgent0rdr (talk | contribs) try again to introduce the "Alternative". |
||
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
|