Google something like 'bit mask operators' and you'll pull up tons of tutorials. Without going into too much detail, you will need ways to set the bit in a certain position and a way to check at a...