Application of basic logic gates in fire and burglar alarms.