logoalt Hacker News

pjmlpyesterday at 8:58 PM1 replyview on HN

I miss them for doing bit juggling like file headers or networking packets.

However I do concede writing a few helper methods isn't that much of a burden.


Replies

pronyesterday at 9:20 PM

I think all the unsigned arithmetic you need is already offered. Unsigned shift right is an operator; the primitive wrappers offer compareUnsigned, divideUnsigned, and remainderUnsigned, as well as conversion methods; unsigned exponentiation is offered in Math (because signed types in Java wrap, there's no need for special unsigned addition/subtraction).