RE: Bit masking and shifts 09-02-2015, 08:43 PM
#16
(09-02-2015, 04:38 PM)dotcppfile Wrote: And you can use the popular set of macros for c++(getmask, field, etc..) which make things even easier; there's probably a million way to do this...
True, and bitfields are available to C++ as well, but this thread seemed to be geared specifically to C by what was written in the first post.
i.e.
Quote:One of the hardest concepts to grasp with C (or most GPPLs) is the concepts of masking and shifting (and likewise rotating with and without carry).




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)