Pages

Saturday, January 18, 2020

Hacks for bit operations


On the Bit Twiddling Hacks page there is as great as old and esoteric collection of operations at the bit level to carry out all kinds of functions with numerical values ​​conveniently.
The tricks consist of moving bits, using operations such as AND, NOT, OR and XOR, arithmetic calculations and even making type changes (signed, unsigned integers or floating point numbers) depending on what is needed. The notation used is that of the C language.
via

No comments:

Post a Comment