How to shorten bitmask? : The underscore part [SOLVED]

The manual isn’t specific how to deal with the _ underscores in a bitmask. Do I need to take them into account when shortening?

Can I ignore them and shorten 0b00000000_00000000_00000001_01101100 to 0b101101100, or do I have to use:

0b1_01101100

or

0b00000001_01101100

Thanks in advance!

i think you can omit them, im not 100% sure though

You can ignore underscores in numbers, they are just visual. And you can truncate leading zeros like in decimal numbers too.

Both of these are good, I recommend using the underscores.

  • 0b1_01101100
  • 0b101101100
2 Likes

Clear, thank you! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.