A bit flag example:
Flag name -> Attributes
^ -> To the power of.
0001 Cool -> 2 ^ 0 = 1 -> 0x01
0010 Nice -> 2 ^ 1 = 2 -> 0x02
0100 Funny -> 2 ^ 2 = 4 -> 0x04
1000 Handsome -> 2 ^ 3 = 8 -> 0x08
now assume you are funny, so those are set to true, the others to false, that would make your attributes value 0110
assume you are all of these, your value would be 1111
You could think of it as a list made up out of boolean digits.
This is why you have to get the correct decimal values.
For a number like 525 (binary: 1000001101), you need to set more than 1 value in your list, which means it won't work correctly, think about it.
Understand flags, don't just ask for values, without even knowing what binary is, bit flags are, and how hexadecimals work.
Hopefully, this helps some of you.