Creating a logic function of a burglar alarm system for a bank
Oh, take a step back a little from it first and look at the different parts of it.

What stimulus, ignoring the extra conditions, would make the alarm sound?  Simple:


someone tampers with the vault -OR-
someone opens the bank door.


Now, when would those stimuli cause the alarm to sound?  Again, simple - when the alarm is armed.  When is it considered armed?


when it has been switched on at the police station -AND NOT-
when the guard's switch has been activated.


So, if it is armed -AND- triggered, then sound the alarm.

So you have three truth tables.  Firstly the trigger:

A = vault, B = door, Q = alarm.

\begin{array}{c c|c}
A&amp;B&amp;Q\\
\hline
0&amp;0&amp;0\\
0&amp;1&amp;1\\
1&amp;0&amp;1\\
1&amp;1&amp;1\\
\end{array}
Then you have the armed table:

A = police station, B = guard's switch
\begin{array}{c c|c}
A&amp;B&amp;Q\\
\hline
0&amp;0&amp;0\\
0&amp;1&amp;0\\
1&amp;0&amp;1\\
1&amp;1&amp;0\\
\end{array}
And then you combine them together into the alarm sounding table:

A = triggered, B = armed
\begin{array}{c c|c}
A&amp;B&amp;Q\\
\hline
0&amp;0&amp;0\\
0&amp;1&amp;0\\
1&amp;0&amp;0\\
1&amp;1&amp;1\\
\end{array}

You could then combine them into one huge logic table if you wanted.

In boolean it could be expressed as:

\$(Vault + Door) · Station · ¬Guard\$