Nyalakan bit N pertama dalam angka
unsigned int set_bits(unsigned int n, unsigned int m) {
unsigned int mask = (1 << m) - 1;
return n | mask;
}
Mero
unsigned int set_bits(unsigned int n, unsigned int m) {
unsigned int mask = (1 << m) - 1;
return n | mask;
}