Answers for "keep last n bits"

C
0

keep last n bits

unsigned  mask;
mask = (1 << n) - 1;
unsigned lastNbits = value & mask;
Posted by: Guest on September-02-2020

Code answers related to "C"

Browse Popular Code Answers by Language