Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about adjusted binary #5

Open
aa876433 opened this issue Sep 1, 2021 · 2 comments
Open

question about adjusted binary #5

aa876433 opened this issue Sep 1, 2021 · 2 comments

Comments

@aa876433
Copy link

aa876433 commented Sep 1, 2021

How adjusted binary actually works. I can't understand why can actually represent any code from 0 to 253 with just 8 bits - only the 4 codes from 254 to 257 take 9 bits.

Thanks.

@dbry
Copy link
Owner

dbry commented Sep 2, 2021

Hi. I found the name "adjusted binary" somewhere, but I've also seen it called "phased-in" codes or "truncated binary" codes. They're exactly the same thing for encoding codes when there are not a power of two values to encode (i.e. 258). Here are a couple links that should help you understand it:

Truncated Binary Encoding
Phased-in codes

@aa876433
Copy link
Author

aa876433 commented Sep 2, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants