Say you have VAR7 for the status tracking, (you can use RAM, too), and you define which bit is for which purpose: I suppose you start from number1 instead of 0 for example,
bit1 email1 already send
bit2 email2 already send
bit3 email3 already send
bit4 email4 already send
...
bit9 front door opened
bit10 side door opened
bit11 back door opened
...
bit30 ceiling fan is on
Each bit has a value, when they stored in VAR or RAM. The VAR or RAM value is all those bits added together. Say bit11 is the one you want to track, start your windows computer, in accossories, you go to "view" tab change the calculator to "programmer" mode. Then it will allow you to set in Dec or HEx or Bin mode. Select Bin mode. You noticed the keyboard will only allow input 0 or 1 in this mode. Enter 10000000000, "1" followed by 10 zeros. Then change the display from Bin to Dec, you will see bit 11 is 1024. Please note this is to start counting first flag is 1, not zero. If you start counting from zero, then you will get 2048 instead of 1024. You have to make sure your are consistent.
To set bit 11, you can simple do this:
ORB VAR7 1024 VAR7
This will turn bit 11 in VAR7 to 1, if that was 0 before;
To check bit11 status, you can also do
ANDB VAR7 1024 RAM1
to check zero bit by BZ or BNZ, or check RAM1 value is zero or not.
To unset bit11, you can use
XORB VAR7 1024 VAR7
Please not, if the bit was 1 before, this will set the bit to 0. But if the bit was 0 before, XORB will set that bit to 1.