I probably won't have time to rewrite my whole program to take out the strings, but if I do, could you please point me towards a tutorial or something? I don't really understand what you mean by 'binary arithmetic.' I mean I understand what they mean separately, but I am unsure as to what you really mean.
Store your detected 'holes' as a binary number.
1111 (15 decimal) means all 4 holes are open
1110 (14 decimal)means only the first 3 holes are open
1001 (9 decimal) means only the first and last holes are open
0000 (0) means no holes are open
To get that number, start with an int, say, holeCount = 0
Add your first 'hole' value (either 1 or 0), multiply holeCount by 2 and add your second 'hole' value.
Multiply by 2 again and add your third 'hole' and multiply by 2 again and add your fourth hole.
You will end up with a number between 0 and 15 in holeCount
You can then use switch case (where you switch on holeCount) to determine your output.