Everything About ___
Live briefing

Everything about Unary coding

Entropy encoding

Unary coding, or the unary numeral system, is an entropy encoding that represents a natural number, n, with n ones followed by a zero or with n - 1 ones followed by a zero. A unary number's code length would thus be n + 1 with that first definition, or n with that second definition. Unary code when vertical behaves like mercury in a thermometer that gets taller or shorter as n gets bigger or smaller, and so is sometimes called thermometer code. An alternative representation uses n or n - 1 zeros followed by a one, effectively swapping the ones and zeros, without loss of generality. For example, the first ten unary codes are: Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Unary codingA 5-minute orientation
  2. Pick up a classic book: Invitation to Computer ScienceThe most-reprinted book on the subject
  3. Read the landmark paper: Unary Coding and Variation-Aware Optimal Mapping Scheme for Reliable ReRAM-Based Neuromorphic ComputingCited 30 times
  4. Go sideways: Bijective numerationA closely related topic
  5. Go sideways: Non-standard positional numeral systemsA closely related topic

📖 Definitions

No dictionary entry for this exact phrase.

🏆 Landmark papers (most cited)

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics