|
|
|
|
|
by larsu
5717 days ago
|
|
Bit Hack #6. Turn off the rightmost 1-bit. Now it finally gets more interesting!!! Bit hacks #1 - #5 were kind of boring to be honest. Does anybody know a practical use case for that? I have personally never encountered a situation were I needed to manipulate the right most 1-bit. Otherwise it's a nice introduction to bit hacking. |
|
That's the context I learned this trick in. It's used in the Embarcadero (ex-Borland) compilers (Delphi, C++, etc.).