You are on page 1of 2

What is a logic gate? A logic gate is a hardware device. It controls the flow of electricity through a computer system.

With the use of logic gates, the computer can carry out complex logical decisions. Logic gates can be found in electronic devices, such as digital wrist watches, computer systems and printers. The 3 basic logic gates are: AND gate; OR gate; NOT gate. Each logic gate has 3 characteristics you must know: Truth Table: The purpose of a truth table is to list all the inputs i. The symbol. ii. iii. The Truth Table The Boolean Expression

and show all the possible outputs. Boolean expression: An expression that results in a value of either TRUE (1) or FALSE (0).

The AND gate A B The AND gate has 2 inputs and 1 output. C o Both inputs must have logic 1 signals to them in order for the output to be a logic 1. With either input at logic 0, the output will be logic 0 o Boolean Expression: C=A.B Hint: think of a light
bulb and switch

TRUTH TABLE INPUTS OUTPUT A B C 0 0 0 0 1 0 1 0 0 1 1 1

The OR gate A B
TRUTH TABLE INPUTS OUTPUT A B C 0 0 0 0 1 1 1 0 1 1 1 1

The OR gate has 2 inputs and 1 output o The OR gate allows the output to be true (logic 1) if any one or more inputs are true. o Boolean Expression: C=A+B Hint: think of an
alarm system

The NOT gate A C The NOT gate has 1 input and 1 output o Whatever logical state is applied to the input, the opposite state will appear at the output. o Boolean Expression: C=A

TRUTH TABLE INPUTS OUTPUT A C 0 1 1 0

1. Draw the truth table for the following gates: (a) (b) P Q X Z

(c) S T
[6 marks]

2. An alarm system is installed in a room. The alarm bell does not ring when both the window and the door are closed. Window Alarm Bell Door a. Which logic gate can be placed in the box for the alarm system? b. By letting logic 1 to mean' Opened' and 'On', draw a truth table to describe all the four possible situations of the alarm system. 3. An inkjet printer has a paper sensor P that can detect if there is paper loaded in the printer. This sensor gives an ON signal when there is paper. Another sensor I is used to detect if there is ink. The sensor I gives a signal OFF when there is no ink left. a. Complete this sentence: The printer prints when b. Draw a circuit using one logic gate showing how the inputs from sensors P and I are used to output a signal S to the printer to start printing. c. Draw a truth table that shows all the possible inputs and their corresponding outputs of the printer logic circuit. d. A red lamp is used to signal that the printer is 'out of paper'. Draw a logic circuit to show how the red lamp can be switched on when there is no paper. e. A yellow lamp is used to indicate that the printer has no ink. Draw a logic circuit to show how the yellow lamp can be switched on when there is no ink. 4. Draw the logic gate symbols in the corresponding box.
[2 marks] [2 marks]

[3 marks]

[3 marks]

[3 marks]

[2 marks]

[2 marks]

Two input AND gate

Two input OR gate

NOT gate

[6 marks] [29 marks]

You might also like