79382213

Date: 2025-01-23 18:40:22
Score: 1.5
Natty:
Report link

You can do so by using the ` operator, which inverts bits.

using your exact example, it would look like

uint32_t buffer=~(-1<<(index+1));

the code shifts -1 by the index you want, then inverts them, leaving a bitmask of however many bits you specified

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Snambo