We have studied about quite a number of logic gates in this article and few other gates in a separate article. Now you might be wondering how these gates are used in actual applications. Well I will just describe a very simple decision making process in this article and we will study more complex applications such as the half adder and full adder in later articles.
The application discussed here is that of a door closing system of an automobile. A car needs to be so designed that the driver gets a visual indication if any of the doors of the car is open so that it helps to avoid accident and injury to the passengers. Assuming there are two doors (just for simplicity, it works for more doors as well) where this system is fitted, the circuit can be designed using a NAND gate as follows
You can see from the figure that when any of the switches is open due to the door position, the NAND gate energies the lamp inside the car, hence warning the driver.