Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rep_lodsb
on Dec 13, 2022
|
parent
|
context
|
favorite
| on:
A neat XOR trick
If the old and new char are different, two bits will have changed state and comparing the old and new mask will have unreliable results.
e.g.
old mask = 011100 new mask = 001111, numerically less even though it has one more bit set
meindnoch
on Dec 13, 2022
[–]
Dangit! I concede…
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
e.g.
old mask = 011100 new mask = 001111, numerically less even though it has one more bit set