awesome-bits
awesome-bits copied to clipboard
:computer: A curated list of awesome bitwise operations and tricks
Fast color conversion from R5G5B5 to R8G8B8 pixel format using shifts R8 = (R5 > 2) G8 = (R5 > 2) B8 = (R5 > 2) This looks to assign...
https://discourse.processing.org/t/fast-approximate-square-root/12074/9
a ^= b; b ^= a; a ^= b; this technique should be discouraged, at least notes should be added. as it is by no means better than the `temp`...
Hey @keonkim, It looks like this repository would really benefit from having some LaTeX typesetting. I'd be happy to set up a natural-looking typesetting script if you would like; the...
I'll put a testing code in c for each of the tricks.
> Shifting by a negative value is undefined behaviour in C. Also you should make sure that the second operand is never higher than or equal to the bit-width of...
See [this page](http://blog.frama-c.com/index.php?post/2013/05/02/nearbyintf1) for a correct implementation of `round`.
**Title:** Implemented Bitwise Fast Enumeration of submasks **Description:** I've implemented a fast enumeration method for all submasks by taking advantage of bit properties. **Example:** n = 13 (1101) s $\in$...