Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use a negative-two base, and encode {-2, -1, 0, 1}. See https://en.wikipedia.org/wiki/Negative_base

Or you could use the regular positive-two base and encode {-2, -1, 0, 1} the normal way with two's complement.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: