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
Elias omega coding
(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!
==Examples== Omega codes can be thought of as a number of "groups". A group is either a single 0 bit, which terminates the code, or two or more bits beginning with 1, which is followed by another group. The first few codes are shown below. Included is the so-called ''implied distribution'', describing the distribution of values for which this coding yields a minimum-size code; see [[Universal code (data compression)#Relationship to practical compression|Relationship of universal codes to practical compression]] for details. {| class="wikitable" !Value !! Code !! Implied probability |- | 1 || 0 || 1/2 |- | 2 || 10 0 || 1/8 |- | 3 || 11 0 || 1/8 |- | 4 || 10 100 0 || 1/64 |- | 5 || 10 101 0 || 1/64 |- | 6 || 10 110 0 || 1/64 |- | 7 || 10 111 0 || 1/64 |- | 8 || 11 1000 0 || 1/128 |- | 9 || 11 1001 0 || 1/128 |- | 10 || 11 1010 0 || 1/128 |- | 11 || 11 1011 0 || 1/128 |- | 12 || 11 1100 0 || 1/128 |- | 13 || 11 1101 0 || 1/128 |- | 14 || 11 1110 0 || 1/128 |- | 15 || 11 1111 0 || 1/128 |- | 16 || 10 100 10000 0 || 1/2048 |- | 17 || 10 100 10001 0 || 1/2048 |- |colspan="3"|... |- | 100 || 10 110 1100100 0 || 1/8192 |- | 1000 || 11 1001 1111101000 0 || 1/131,072 |- | 10,000 || 11 1101 10011100010000 0 || 1/2,097,152 |- | 100,000 || 10 100 10000 11000011010100000 0 || 1/268,435,456 |- | 1,000,000 || {{nowrap|10 100 10011 11110100001001000000 0}} || 1/2,147,483,648 |} The encoding for 1 [[googol]], 10<sup>100</sup>, is 11 1000 101001100 (15 bits of length header) followed by the 333-bit binary representation of 1 googol, which is 10010 01001001 10101101 00100101 10010100 11000011 01111100 11101011 00001011 00100111 10000100 11000100 11001110 00001011 11110011 10001010 11001110 01000000 10001110 00100001 00011010 01111100 10101010 10110010 01000011 00001000 10101000 00101110 10001111 00010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 and a trailing 0, for a total of 349 bits. A googol to the hundredth power (10<sup>10000</sup>) is a 33,220-bit binary number. Its omega encoding is 33,243 bits long: 11 1111 1000000111000100 (22 bits), followed by 33,220 bits of the value, and a trailing 0. Under [[Elias delta coding]], the same number is 33,250 bits long: 000000000000000 1000000111000100 (31 bits) followed by 33,219 bits of the value. The omega and delta coding are, respectively, 0.07% and 0.09% longer than the ordinary 33,220-bit binary representation of the number.
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)