Working with bit fields – optimize your code
Bitwise logical operations and packing data into bitfields is a very elementary programming technique - in fact, every microprocessor uses it internally to achieve "higher" goals like addition, subtraction, multiplication, division, and more. Nevertheless, many people who write amazing software in "high" languages are not really comfortable when it comes to bit manipulations, even if these can, as we have often seen in the Nextion Sunday Blog's demo projects, make your code more compact, using less memory and running quicker. Since I get more and more reader's feedback in that sense, I decided to make a compact writeup, giving you the required knowledge at hands, not only to decipher but also to create amazing things.