Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Truncated binary encoding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{More references|date=December 2009}} '''Truncated binary encoding''' is an [[entropy encoding]] typically used for uniform [[probability distribution]]s with a finite alphabet. It is parameterized by an alphabet with total size of number ''n''. It is a slightly more general form of [[Binary numeral system|binary encoding]] when ''n'' is not a [[power of two]]. If ''n'' is a power of two, then the coded value for 0 β€ ''x'' < ''n'' is the simple binary code for ''x'' of length log<sub>2</sub>(''n''). Otherwise let ''k'' = floor(log<sub>2</sub>(''n'')), such that 2<sup>''k''</sup> < ''n'' < 2<sup>''k''+1</sup>and let ''u'' = 2<sup>''k''+1</sup> β ''n''. Truncated binary encoding assigns the first ''u'' symbols codewords of length ''k'' and then assigns the remaining ''n'' β ''u'' symbols the last ''n'' β ''u'' codewords of length ''k'' + 1. Because all the codewords of length ''k'' + 1 consist of an unassigned codeword of length ''k'' with a "0" or "1" appended, the resulting code is a [[prefix code]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)