I use a byte to store some flag like 10101010, and I would like to know how to verify that a specific bit is at 1 or 0.
10101010
1
0
You can use an AND operator. The example you have: 10101010 and you want to check the third bit you can do: (10101010 AND 00100000) and if you get 00100000 you know that you have the flag at the third position to 1.