colors.white = 1 (decimal) = 0000000000000001(binary) colors.orange = 2 (decimal) = 0000000000000010(binary)So, if i need to turn both white and orange on ,i just input 1+2 to color.When i need to turn orange off,i let color minus 2.But,if i don't know the value of color first,a error may occur.For example,color is 1,and after minus it becomes -1.
Thus,I think i need to do some bit manipulation.
Example:
value = 0100100000000010 if i want to turn off orange,i change value into 0100100000000000so,my question is how to convert a decimal number into binary number?
And how i can insure a specific digit is 0 or 1 ?












