Sie sind auf Seite 1von 102

LOGIC CIRCUITS and SWITCHING THEORY

Learning Objectives:
At the end of this topic you will be able to; 1.9.1 Introduction. Recognize high/low, 1/0, as two state logic levels; 1.9.2 Truth Tables. Draw symbols and construct truth tables for AND, OR, NOT, NOR, and NAND gates; Produce a truth table for a system of up to five gates; Devise a system of gates from a truth table; Design simple systems using logic gates to solve a given problem; Use Boolean notation as a shorthand method of expressing a truth table; 1.9.3 Use of data sheets. Use data sheets to; o Select a logic IC for given applications; o Identify pin connections of logic gates; 1.9.4 NAND gate implementation. Show how other gates can be made up from NAND gates; Implement a given logic circuit using NAND gates; Remove double inversions; 1.9.5 Pull up/down resistors. Recognise the use of pull up/down resistors to provide the correct logic levels at a gate input.

Unit E1 : Discovering Electronics Combinational Logic Systems 1.9.1 Introduction

In this topic we will be concentrating on the basics of digital logic circuits which will then be extended in Module E2. We should start by ensuring that you understand the difference between a digital signal and an analogue signal. An analogue signal This is a signal Voltage (V) that can have Max any value between the zero and maximum of the power Min supply. Changes 0 V between values can occur slowly or rapidly depending on the system involved. A digital signal This is a signal Voltage (V) that can only have two finite values, usually at Max zero and maximum of the power supply. Changes between Min 0V these two values occur instantaneously.

time (s)

time (s)

LOGIC CIRCUITS and SWITCHING THEORY For this part of the course we will concentrate on digital systems. Recap of work covered in Sub-systems (topic 1.2) When an input or output signal is at the minimum power supply voltage (usually 0V) this is referred to as a LOW signal or LOGIC 0 signal. When an input or output signal is at the maximum power supply voltage this is referred to as a HIGH signal or LOGIC 1 signal. Remember then that a digital signal is a two state system with input and output signals being either referred to as high/low, 0/1, on/off depending on the application. We will now look at the basic building block of all digital systems, the logic gate, and their associated truth tables. Note Logic gates are available with up to 8 inputs per gate which may be useful for project work later on in the course, but for this introductory section and for the purposes of the examination questions we will only consider 2 input logic gates.

Unit E1 : Discovering Electronics 1.9.2 Truth Tables Here is a summary of the three logic gates you have already studied

GATE

SYMBOL

TRUTH TABLE

FUNCTION

NOT (INVERTER)

Input A 0 1

Output Q 1 0

Signal out of gate is the opposite of the signal in i.e. it inverts the input signal The output Q is only at a logic 1 when input A AND input B are at a logic 1

Inputs A B
A

Output Q 0 0 0 1 Output Q 0 1 1 1

AND

0 0 1 1

0 1 0 1

Inputs A B OR
A B Q

0 0 1 1

0 1 0 1

The output Q is at a logic 1 when input A OR input B OR both are at a logic 1

LOGIC CIRCUITS and SWITCHING THEORY We will now look at two additional logic gates: The NAND gate The symbol for a 2 input NAND gate is:
A B Q

The truth table for the 2 input NAND gate is shown below. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 1 1 0

If you compare this truth table with that for the AND gate, you will find that the output Q is the exact opposite of the AND.

Unit E1 : Discovering Electronics The NOR gate The symbol for a 2 input NOR gate is:
A B

The truth table for the 2 input NOR gate is shown below. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 0

If you compare this truth table with that for the OR gate, you will find that the output Q is the exact opposite of the OR. Now let us see what you can remember !

LOGIC CIRCUITS and SWITCHING THEORY Exercise 1 1. Look at the following logic symbols labelled A E.

i. ii. iii. iv. v.

Which is the correct symbol for an AND gate. Which is the correct symbol for a NOT gate. Which is the correct symbol for a NOR gate. Which is the correct symbol for a NAND gate? Which is the correct symbol for an OR gate.

2.

Complete the following truth tables. i. AND gate. Inputs A 0 0 1 1 B 0 1 0 1 Output Q

Unit E1 : Discovering Electronics ii. NOR gate. Inputs A 0 0 1 1 iii. NAND gate. Inputs A 0 0 1 1 iv. OR gate. Inputs A 0 0 1 1 B 0 1 0 1 Output Q B 0 1 0 1 Output Q B 0 1 0 1 Output Q

LOGIC CIRCUITS and SWITCHING THEORY Practical Logic Gates Logic gates are usually supplied in plastic d.i.l. (dual in line) packages containing multiple copies of one type of logic gate. The following diagram shows a picture of this type of package.

Pin 1 identification

Pin 1

There are two common types available, TTL or 74xx series and CMOS or 4xxx series. It is likely that you will come across both types in your practical work, so whats the difference between them? The key differences are outlined in the table below: Parameter Supply Voltage Logic 0 range Logic 1 range Frequency of operation (Max) Power consumption TTL (74xx family) 5V 0.25V only 0 to 0.8V 2.0 to 5.0V 50 MHz 10mW / gate CMOS (4xxx family) 3V to 18V Below 30% of supply voltage Above 70% of supply voltage 4 MHz 0.1mW / gate

This information will be important in practical work, as you will need to know which type of logic gate you are using. You will also need to be careful how you connect each logic gate into your circuit.
9

Unit E1 : Discovering Electronics To be able to identify which leads are connected to which gate you need to look at a data sheet for the actual logic gate you are using. Here are two data sheets from the TTL (74xx) family.

It is important that you check the connections every time you use a logic gate as connecting these incorrectly can result in the whole logic chip being destroyed. You will not be required to know the difference between TTL and CMOS devices in the examination. This is required for any practical tests that you carry out, and will be particularly important for your project work. You will however need to be able to identify the output pin of a logic gate given its symbol. For example if you are given the pinout of the 7432 device shown above you can be asked to identify the pin numbers of the outputs of the logic gates. In this case the relevant pin numbers are; 3, 6, 8 & 11. Alternatively you might be asked to identify the power supply connections, in which case the answer would be Pin 14 for the positive supply and Pin 7 for the negative of the supply.

10

LOGIC CIRCUITS and SWITCHING THEORY Exercise 2 The pin out diagrams for a logic IC is shown below.

a) b) c)

How many logic gates are contained in this IC? .................. How many inputs does each gate have? .......................

Give the number of the pin connected to the output of gate G?

d) e)

Which two pins should be connected to the power Supply? ............... What is the name given to the type of logic gate contained in this IC?

Choose from the following list:


NOT NAND

AND

OR

NOR

Answer:

11

Unit E1 : Discovering Electronics Analysis of simple logic circuits In the examination you will have to recognise truth tables for these basic gates individually for some of the easier questions in the examination. However, it is much more likely later on in the paper that these gates will be linked together in simple combinations and you will be asked to complete a truth table for a larger system. We will now consider a couple of examples of these systems. 1. Study the following logic system carefully and then complete the truth table that follows:

Inputs A
0 0 1 1

B
0 1 0 1

Outputs C Q

In this problem, the output of the NOT gate has been labelled C. The first stage is to complete the output column for C which is the NOT of A as shown below. Inputs A
0 0 1 1

B
0 1 0 1

Outputs C Q
1 1 0 0

12

LOGIC CIRCUITS and SWITCHING THEORY Now we need to complete the final column Q which is the output of the AND gate with B and C as the inputs. Inputs A
0 0 1 1

B
0 1 0 1

Outputs C Q
1 1 0 0 0 1 0 0

Do not fall into the trap of writing the answer to the Q column in the order you would normally do for the truth table for an AND gate. Because the inputs to the AND gate are B and C rather than A and B, the logic 1 in the Q column appears in the row where B and C are both 1 rather than when A and B equals 1.

13

Unit E1 : Discovering Electronics 2. Study the following logic system carefully and then complete the truth table that follows:

A
0 0 0 0 1 1 1 1

Inputs B
0 0 1 1 0 0 1 1

C
0 1 0 1 0 1 0 1

Outputs G

You can see that the truth table for a 3 input logic system contains 8 possible input combinations. Notice the way the logic state of each input changes as you move down the table. First complete the output column for the NOT gate (Column F) {Remember the input is B.} Then complete the output column for the AND gate (Column G) {Remember the inputs are F and C.} Finally complete the final output from the NOR gate (Column Q) {Remember the inputs are A and G} A solution to this problem will be found at the end of this chapter.

Heres a couple for you to try:


14

LOGIC CIRCUITS and SWITCHING THEORY Exercise 3 1. Study the following logic system carefully and then complete the truth table that follows:

Inputs A
0 0 1 1

B
0 1 0 1

Outputs K Q

2.

Study the following logic system carefully and then complete the truth table that follows:

A
0 0 0 0 1 1 1 1

Inputs B
0 0 1 1 0 0 1 1

C
0 1 0 1 0 1 0 1

Outputs G

15

Unit E1 : Discovering Electronics 3. Study the following logic system carefully and then complete the truth table that follows:

A
0 0 0 0 1 1 1 1

Inputs B
0 0 1 1 0 0 1 1

C
0 1 0 1 0 1 0 1

Outputs F

16

LOGIC CIRCUITS and SWITCHING THEORY Transferring a truth table into a Logic Diagram In the previous section we looked at how a system of logic gates could be used to complete a truth table to illustrate the conditions needed for the output to operate. We will now consider how we can reverse this process and construct a logic circuit diagram from a truth table. This is best done by looking at a couple of examples. Note In the following examples the outputs have been chosen so that they are not the output of one of the five logic gates considered previously. Examples: 1. The following truth table represents a particular logic function. Use the information in the table to draw a corresponding logic gate system that will produce this function. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 0 0 1 0

We first have to identify all the combinations of the inputs that cause the output to come on. In this case it only occurs once, when input A is on and input B is not on. The description of what is required to cause the output to operate gives a very good clue as to the logic gates required in this example. In this case two logic gates are required, a NOT gate and an AND gate. The NOT gate is used to invert the B input, as shown below.

17

Unit E1 : Discovering Electronics The output of this NOT gate is then connected to the AND gate with input A to provide the full solution, as follows:

Quick Rule In any 2-input logic system, for every row of the truth table for which the output is logic 1, this output can be written in terms of the following input conditions: A, NOT A, B, NOT B depending whether there is a 0 or a 1 in that cell. The 2 inputs are linked with an AND gate. Going back to our example we identify the output row where Q is a logic 1 and note that A = 1 and B = 0. Because B is 0 we write it down as NOT B as shown: Inputs A 0 1 1 1 B 0 0 0 1 Output Q 0 0 1 0

Output Q = A AND NOT B

This gives the same answer as the longer method.

18

LOGIC CIRCUITS and SWITCHING THEORY 2. The following truth table represents a particular logic function. Use the information in the table to draw a corresponding logic gate system that will produce this function. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 1

We first have to identify all the combinations of the inputs that cause the output to be logic 1. In this case it occurs in 2 rows of the truth table. We then label these output as explained above in the Quick Rule. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 1

Output = NOT A AND NOT B

Output = A AND B

The output required for the first line of the truth table is therefore:

and the output required for the last line of the truth table is:

19

Unit E1 : Discovering Electronics So far we have two separate logic systems providing the output Q. We need to link the two systems together so that either system can produce the output. This is achieved by using an OR gate as shown below:

We have some duplicated input terminals here now so the circuit diagram can be simplified by linking these together as shown below.

20

LOGIC CIRCUITS and SWITCHING THEORY Truth tables with multiple outputs Quite often a logic system will have more than one output. For example a set of traffic lights might have 3 outputs. For this type of system we can follow a simple set of rules. For each output column of the truth table ask yourself the following questions in the order listed below 1. Is the output column pattern the same as one of the input column patterns? If the answer is yes then Q = The Input (e.g. Q = B) 2. Is the output column pattern the inverse of the input column pattern? If the answer is yes then Q = NOT The Input (e.g. Q = NOT C) 3. Is the output column pattern the same as a logic gate output? If the answer is yes then Q = logic gate expression (e.g. Q = A OR B) 4. Is the output column pattern the inverse of one of the other output patterns already identified? If the answer is yes then Q = NOT Other Output (e.g. Q3 = NOT Q1) 5. Use the Quick rule by labelling rows of the outputs which are logic 1 and link with an OR gate e.g. Q = [NOT A AND NOT B] OR [A AND B]

21

Unit E1 : Discovering Electronics Example The following truth table shows the outputs required for three LEDs LEDs used to represent the operation of a set of traffic lights. Determine the combination of logic gates required to produce the output pattern shown. Inputs A 0 0 1 1 B 0 1 0 1 Red 1 1 0 0 Outputs Yellow Green 0 0 1 0 0 1 1 0

Here we have three separate outputs to be produced by just two inputs, to solve this we just treat each individual output as a separate problem. If you examine the input A column and Red output column carefully what do you notice? They are reproduced below with these columns highlighted. Inputs Outputs A B Red Yellow Green 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 Comparing the two highlighted columns we can see that the Red output is the exact opposite of the A input column. This means that if we simply invert the input A signal, this will produce the Red output. i.e. Red = NOT A

22

LOGIC CIRCUITS and SWITCHING THEORY Now for the Yellow output, again check the truth table carefully. The solution is that the Yellow output follows the B input exactly, and therefore to produce the Yellow output no logic gates are required. It is simply a case of connecting the Yellow output to the B input. i.e. Yellow = B

Here is the solution for the Yellow output:

Finally we have to consider the Green output. A check of the truth table shows there is no simple relationship to the inputs as was the case with the Red and Yellow outputs. Neither does the output correspond to the output of a logic gate. We have no choice therefore other than to use the Quick rule to solve this part of the problem. You should be able to produce the system as shown below. Inputs A 0 0 1 1 B 0 1 0 1 Red 1 1 0 0 Outputs Yellow Green 0 0 1 0 0 1 1 0

Green = A AND NOT B

This gives;

23

Unit E1 : Discovering Electronics If we connect all three sections together the final system design will look like this:

Note: If we were very observant we could have noticed that the Green output can be obtained from a NOR gate connected to the Red and Yellow outputs. Inputs A 0 0 1 1 i.e. B 0 1 0 1 Red 1 1 0 0 Outputs Yellow Green 0 0 1 0 0 1 1 0

Green = Red NOR Yellow

The final system would then become:

It is left to you to check that both solutions produce the correct output pattern. Do not worry if you cannot understand how the second solution was obtained as you would receive full marks for the first solution.
24

LOGIC CIRCUITS and SWITCHING THEORY Now its time for you to have a go. Exercise 4 1. The following truth table represents a particular logic function. Use the information in the table to draw a corresponding logic gate system that will produce this function. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 0 0 1 0

...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ......................................................................................................................................
25

Unit E1 : Discovering Electronics 2. The following truth table represents a particular logic function. Use the information in the table to draw a corresponding logic gate system that will produce this function. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 0 1 1 0

...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ......................................................................................................................................
26

LOGIC CIRCUITS and SWITCHING THEORY 3. An electronic system has two input sensors A and B, and three outputs P, Q and R. The truth table showing how the input sensors control the outputs is shown below. Inputs A 0 0 1 1 B 0 1 0 1 P 1 1 0 0 Outputs Q 0 0 0 1 R 1 0 0 0

(a) Study the P output. It is the inverse of one of the inputs. Write down an expression to describe this output. P = ................................................................................... (b) Study the Q output. There is one type of logic gate that will provide this. What is the name of this gate? ............................................................. (c) Study the R output. There is one type of logic gate that will provide this. What is the name of this gate? ............................................................. (d) You have a selection of AND, OR, NOT, NAND and NOR gates available. Draw a labelled diagram to show how the logic system can be made.

27

Unit E1 : Discovering Electronics 4. The following truth table shows the outputs required for three LEDs used to represent the operation of a set of traffic lights. Determine the combination of logic gates required to produce the outputs required. Inputs A 0 0 1 1 B 0 1 0 1 Red 0 0 1 1 Outputs Yellow Green 1 0 0 1 1 0 0 0

...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ...................................................................................................................................... ......................................................................................................................................
28

LOGIC CIRCUITS and SWITCHING THEORY Boolean Notation (Higher Level Topic) There is also a shorthand way of writing down the function of logic gates, using a special type of algebra called Boolean Algebra. This is used extensively for advanced work in digital electronics. We shall briefly consider how to express the output of a truth table and logic gates in Boolean notation. We will start by looking at the five basic gates we have introduced previously. There are 3 basic things to remember 1. A dot . between two input labels is read as AND 2. A plus +between two input labels is read as OR 3. A bar _ over the top of an input label is read as NOT

Gate
A

Symbol
Q

Boolean Notation

NOT AND OR NAND NOR


A B A B A B A B

QA

(read as Q = NOT A ) (read as Q = A AND B) (read as Q = A OR B) (read as Q = A NAND B) (read as Q = A NOR B)

Q A.B
Q A B

Q A.B
Q A B

In addition to the five Boolean notations shown above, each line of a truth table for which the output is a 1 can also be written in Boolean notation
29

Unit E1 : Discovering Electronics Consider the solution to example 2 on page 19 Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 1

Output = NOT A AND NOT B

Output = A AND B

Using Boolean notation the outputs can be labelled as follows Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 1

Output = A AND B

Output = A AND B

Remember that these expressions need to be linked together with an OR gate to produce the output Q, so the full Boolean expression for Q can be written as

Q A.B A.B

Q A AND B OR A AND B

30

LOGIC CIRCUITS and SWITCHING THEORY Exercise 5 1. The Boolean equations labelled A E, below are to be used to answer the following questions. A) B) C) D) E) i. ii.

Q A.B

Q A B
Q A B

QA Q A.B

Which expression is correct for an AND gate. Which expression is correct for a NOT gate.

iii. Which expression is correct for a NOR gate. iv. v. 2. Which expression is correct for a NAND gate. Which expression is correct for an OR gate.

Write down the Boolean expressions for outputs X, Y and Z:

A 0 0 1 1

B 0 1 0 1

X 1 0 1 0

Y 0 0 0 1

Z 0 1 0 0

X = Y = Z =

31

Unit E1 : Discovering Electronics Logic System Design In the previous two sections we have considered the function of a number of logic gates that are available for us to use in electronic system design. We have derived a truth table from a logic circuit, and we have constructed a logic circuit from a truth table. In this section we will be completing the design process by converting a design brief of a problem into a truth table. Once this has been achieved then we can use the techniques used in the last section to complete the logic circuit design. Design Problems 1. A logic system has two input sensors A and B and two outputs. Output 1 is high when sensor A is high and sensor B is high. Output 2 is high either when sensor A is low and sensor B is high or when sensor A is high and sensor B is high. a) b) Solution: a) O/p 1 is high only when A = 1 and B = 1. Identify this cell in the o/p 1 column at the truth table and place a 1 in it. Place zeros in the three other cells in the o/p 1 column. O/p 2, is high when A = 0 and B = 1 or when A = 1 and B = 1. Identify these two cells in the o/p 2 column of the truth table. Place a 1 in these two cells and zeros in the other two. Inputs A 0 0 1 1
32

Complete the truth table to satisfy these conditions Draw the circuit diagram for the logic system.

B 0 1 0 1

Outputs O/p 1 O/p 2

LOGIC CIRCUITS and SWITCHING THEORY b) You should have obtained the following truth table. Inputs A 0 0 1 1 B 0 1 0 1 Outputs O/p 1 O/p 2 0 0 0 1 0 0 1 1

Examine the o/p 1 pattern. You should realise that it is the same pattern as for an AND gate. Examine the o/p 2 pattern. You should realise that it is the same as input B. The circuit diagram can then be drawn.

33

Unit E1 : Discovering Electronics 2. A system is required that will monitor a cars cooling system. When the water level in the radiator is below a certain level a LED will light up. When the engine temperature is above a pre-determined value and the water level is too low a buzzer should sound in addition to the LED lighting up. The positioning and signals out of the sensors used are shown below. Sensor A (moisture) state logic level Wet 0 Dry 1 Sensor B (temperature) state logic level Cool 0 Hot 1
Radiator

A Moisture Sensor

a) Complete the following truth table for the system.

B Temperature Sensor

Inputs A 0 0 1 1 b) B 0 1 0 1

Outputs LED buzzer 0 0 1

Study the LED output and compare it with the inputs. What do you notice?

34

LOGIC CIRCUITS and SWITCHING THEORY c) Study the buzzer output. There is one type of gate that will provide this output pattern. What type of logic gate is required? Complete the following diagram showing how the system can be made up.

d)

3.

Before take off, the pilot and co-pilot of an aircraft carry out preflight safety checks. When all checks have been completed they each move a switch from the up to the down position.
When both switches are up, a red indicator on the instrument panel is on. This changes to yellow when at least one of them operate their switch. When both have operated their switches, a green indicator comes on. The engines can only be started when the green indicator is on.

Assume that the switches provide logic level 0 in the up position and logic level 1 in their down position. The LED indicators operate on logic level 1. a) Complete the following truth table for the system. The yellow , Y column has been completed for you.

35

Unit E1 : Discovering Electronics Inputs A 0 0 1 1 b. B 0 1 0 1 R Outputs Y 0 1 1 1

G 0

Study the Y output. There is one type of gate which will provide the required output. What type of gate is it?

c.

Study the G output. There is one type of gate which will provide the required output. What type of gate is it?

d.

Study the R output. Write down an expression to describe it. i. The first solution is to recognise the output pattern as that, of a NOR gate. i.e. R = A NOR B

ii.

The second solution is to recognise the output pattern as the inverse of Output Y i.e. R = NOT Y

Either of these is equally valid.


36

LOGIC CIRCUITS and SWITCHING THEORY The complete system therefore is:

4.

Two sensors A and B are used to monitor a chemical process. Output Q1 is a heater, output Q2 is a motor and output Q3 is a bell. The heater is on either when sensor A is low and sensor B is high or when both sensors are low. The motor is on when either A is low and B is high or when both sensors are high. The bell comes on when both sensors are high. a) Complete the following truth table for the system. Inputs A 0 0 1 1 b) B 0 1 0 1 Outputs Q1 Q2 (heater) (motor) 0 1 1 1

Q3 (bell) 0

Write down an expression to describe Q1 and Q2 by comparing them with the inputs. Q1 = Q2 =
37

Unit E1 : Discovering Electronics c) Which type of gate will provide the Q3 output?

38

LOGIC CIRCUITS and SWITCHING THEORY d) Draw the circuit for the system

Now its time for you to have a go. Exercise 6 1. A logic system has two input sensors A and B and three outputs.
Output 1 is high when sensor A is low. Output 2 is high when sensor A is low and sensor B is low Output 3 is high when sensor A is high and sensor B is low.

a)

Complete the truth table to satisfy these conditions Inputs A 0 0 1 1 B 0 1 0 1 Truth Table Outputs O/p 1 O/p 2

O/p 3

39

Unit E1 : Discovering Electronics b) i) Examine the O/p 1 pattern. This can be generated from one of the input signals. Write down the logic function required to generate this output. ii) Examine the O/p 2 pattern. This can be generated from one of the standard logic gates. Write down the logic function required to generate this output. iii) Examine the O/p 3 pattern. This cannot be generated from the inputs using one of the standard logic gates. Write down the logic function required to generate this output. c) Draw the circuit diagram for the logic system.

40

LOGIC CIRCUITS and SWITCHING THEORY 2. A system is required that will monitor a cars cooling system. When the water level in the radiator is below a certain level a LED will light up. When the engine temperature is above a pre-determined value and the water level is too low a buzzer should sound in addition to the LED lighting up. The positioning and signals out of the sensors used are shown below. Sensor A (moisture) state logic level Wet 1 Dry 0 Sensor B (temperature) state logic level Cool 1 Hot 0
Radiator

A Moisture Sensor

a) Complete the following truth table for the system.

B Temperature Sensor

Inputs A 0 0 1 1 b) B 0 1 0 1

Outputs LED buzzer

Study the LED output and compare it with the inputs. What do you notice?
41

Unit E1 : Discovering Electronics c) Study the buzzer output. There is one type of gate that will provide this output pattern. What type of logic gate is required? Complete the following diagram showing how the system can be made up.

d)

3.

Before leaving port, the loading bay controller and captain of a Car Ferry carry out pre-departure safety checks. When all checks have been completed they each move a switch from the down to the up position.
When both switches are down, a red indicator on the instrument panel is on. When any one of the switches, is in the up position, the indicator light changes to yellow. When both switches are in the up position, a green indicator comes on. The engines of the Car Ferry can only be started when the green indicator is on.

Assume that the switches provide logic level 0 in the up position and logic level 1 in their down position. The LED indicators operate on logic level 1.

42

LOGIC CIRCUITS and SWITCHING THEORY a) Complete the following truth table for the system. Inputs A 0 0 1 1 b. B 0 1 0 1 R Outputs Y

Study the R output. There is one type of gate which will provide the required output. What type of gate is it?

c.

Study the Y output. Write down an expression to describe it. Y =

d.

Study the G output. There is one type of gate which will provide the required output. What type of gate is it?

e.

Complete the following diagram showing how the system can be made up.

43

Unit E1 : Discovering Electronics 4. Two sensors A and B are used to control the paint mixing process at a local DIY store. Three output valves control the flow of cyan, magenta, and yellow pigment. Valve V1 is the cyan, Valve V2 is the magenta, and Valve V3 is the yellow. Mixing occurs according to the following sequence. A logic 1 operates the valve.
Valve 1 operates when input A is high and input B is high. Valve 2 operates when input A is low and input B is low or when input A is high and input B is low. Valve 3 operates when input A is low and input B is high or when input A is low and input B is low.

a)

Complete the following truth table for the system. Inputs A 0 0 1 1 B 0 1 0 1 V1 (cyan) Outputs V2 V3 (magenta) (yellow)

b) c)

Which type of gate will provide the V1 output? Write down an expression to describe V2 and V3 by comparing them with the inputs. V2 = V3 =

44

LOGIC CIRCUITS and SWITCHING THEORY d) Draw the circuit for the system

45

Unit E1 : Discovering Electronics 1.9.3 Use of data sheets When you complete your project, you will need to examine data sheets for different logic gates, because as you have seen there are a lot of different logic gates available, and the connections for these vary between different types so you always have to check carefully that you know where the power supply, inputs and outputs are connected to. Here are some of the more common 74xx Series TTL logic gates you might end up using in your project.

46

LOGIC CIRCUITS and SWITCHING THEORY The following pin outs are from an alternative family of logic gates called the CMOS 4xxx series.

You could be asked to use these diagrams to answer a series of questions about the logic gates in each particular package. Here are some typical questions based on the symbols on page 45/46.

47

Unit E1 : Discovering Electronics Exercise 7 1. 2. 3. 4. 5. 6. 7. 8. How many logic gates are contained in the 7408 package? What type of logic gate is in the 7402 i.c. package? What type of logic gate is contained in the 4011 package?

How many inputs do the logic gates in the 4072 package have ? What are the output pins of the 7408 package? Which package contains NOT gates?

How many logic gates are there in the 4002 package? Which 2 packages have some pins that are not connected to anything ?

9. 10.

What pin number is the positive supply for a 4081 package ? What pin number(s) are the inputs of the logic gate, whose output is connected to pin 13 of the 4072 package?

11. 12.

What type of logic gate is contained in the 7408 package?

Which 74xx family package has an output pin connected to pin 1?

48

LOGIC CIRCUITS and SWITCHING THEORY 1.9.4 NAND gate implementation (Higher Level Topic)

In section 1.9.2 we found out how to construct logic systems from a truth table. This often resulted in logic systems that required a number of different types of logic gate (e.g. NOT, AND and OR) in order to fulfil the function required. In some of the designs we have looked at we ended up with just one of three different types of logic gate needed in the final design. As we have seen from the last section only one type of logic gate is built inside each package, and there could be as many as six of these logic gates in the package of which we are only going to use one. This is very wasteful not only in terms of unused devices but also in the space needed on circuit boards to accommodate three different logic gate packages. The inverted gates, NAND and NOR are special because the function of all other gates can be made from various combinations of NAND or NOR gates. In this syllabus only NAND gate alternatives of the other logic functions will be discussed. You may find some reference to NOR gate logic in some text books but these will not be asked for in the examination. By using just one type of logic gate we may be able to reduce the number of types of logic gate required to make any particular design. This has a number of advantages: i. There will be less confusion about which type of gate goes where in the circuit as they are all the same. ii. There will be no need to keep stocks of all the different types of logic gate, therefore saving money. iii. Larger quantities of a single type of gate can be purchased, which makes cost lower.
49

Unit E1 : Discovering Electronics We will now look at an example to show you how making this change can improve the situation. Consider the two logic circuits below, which perform the same logic function. System 1 : Mixture of gates.

A Q B C

System 2 : NAND gates only


A

Q B

When system 2 is compared to system 1, you may think that we have made the circuit more complicated as we have more logic gates in system 2, however, in system 1 three different types of gates are required NOT, OR and AND. To construct system 1 using these gates would require 3 different logic i.cs, and many of the logic gates on these i.cs would not be used. Using system 2, however, whilst there are four logic gates required these are all of the same type, and only one logic i.c. would be required where all gates in the i.c. are used.

50

LOGIC CIRCUITS and SWITCHING THEORY This would provide a considerable cost saving compared to the design in system 1. In industry if such systems are to be mass produced such savings can be considerable, and it is up to the engineers making the systems to use this technique as much as possible to enable more profit to be made. Now that we know why NAND gate logic is used lets find out how to carry out this procedure. We need to understand the combination of NAND gates required to replace each of our standard gates. NAND gate equivalent circuits for the four other gates

1.

The NOT gate This is the simplest of the standard gates to form from NAND gates.

is the same as

Complete the truth table below for the NAND equivalent circuit. Input A 0 1 Output Q

Note The NAND equivalent of a NOT gate is sometimes referred to as a NAND Inverter. You will need to remember this for later on.

51

Unit E1 : Discovering Electronics 2. The AND gate This is the inverse of a NAND gate, and is simply a NAND gate followed by an inverter (NOT Gate).
A B Q A B X Q

Complete the truth table below for the NAND equivalent circuit. Inputs A 0 0 1 1 3. The OR gate The OR gate is a little more complicated, and requires three NAND gates as shown below.
A A B Q is the same as B Y A X A Q

B 0 1 0 1

Output Q

Complete the truth table below for the NAND equivalent circuit. Inputs A 0 0 1 1
52
Intermediate Outputs

B 0 1 0 1

Output Q

LOGIC CIRCUITS and SWITCHING THEORY 4. The NOR gate The NOR gate is the inverse of the OR gate, so just one more gate is needed as shown below.

A A B Q is the same as B

X Z Q

Complete the truth table below for the NAND equivalent circuit. Inputs A 0 0 1 1 B 0 1 0 1 X
Intermediate Outputs

Output Q

53

Unit E1 : Discovering Electronics Converting Logic Diagrams to NAND gates The process for converting logic system diagrams into NAND gate format is quite straight forward if you work logic ally through the circuit. Each gate is replaced in turn by its NAND equivalent, and connected up in the same way. We will look at an example to show how this is done. Example 1: Convert the following logic system into NAND gates only.

A Q B C

In this case we need to replace a NOT gate, OR gate and an AND gate. Stage 1: Redraw the NAND equivalent circuits of the gates shown above, where possible retain the position of these gates so that you can identify the connections afterwards.

A Q B

Drawing a box around each gate and its corresponding NAND equivalent will allow you to check that you have replaced every gate in the circuit.

54

LOGIC CIRCUITS and SWITCHING THEORY Stage 2: It is then just a matter of connecting the equivalent circuits together.

A Q B C

This circuit is now the equivalent circuit to that using in NOT, OR and AND gate given earlier, however there is one further simplification we can make. Stage 3 : Consider the circuit again as shown below.
A 1 2 A Q

If you look carefully at the two NAND gates labelled 1 & 2, we can see that these are both configured to be inverters or NOT gates. If we consider what happens to signal A as it passes through these two gates we have the following: A logic 1 at A, becomes a 0 after gate 1 and then a 1 again after gate 2 A logic 0 at A, becomes a 1 after gate 1 and then a 0 again after gate 2 Therefore gates 1 and 2, serve no useful purpose in this circuit, and are known as redundant gates and can be removed. We call this double inversion and it occurs commonly when creating NAND gate circuits from other logic systems. Remember a double inversion only occurs when 2 NAND Inverters are directly connected to one another.
55

Unit E1 : Discovering Electronics In an examination you are usually asked to cross out any redundant gates, so if this was an examination you would end up with the following circuit.

A Q B C

Occasionally, you will be asked to redraw the circuit, with redundant gates removed in which case the final circuit would be as follows:
A Q B

As has been the case with other examples we have taken our time with this one to illustrate each stage of the simplification process. Most of these steps can be carried out in just a couple of steps but there are a couple of things that will help to ensure that you dont make mistakes that in an examination could cost you a lot of marks. i. ii. iii. iv. identify each of the gates from the original circuit and their NAND equivalent. connect each equivalent NAND gate circuit as per the original diagram. identify and cross out and redundant gates caused by double inversions. do not try to remove double inversions in your head, as you can easily forget which ones you have done and leave some out.

56

LOGIC CIRCUITS and SWITCHING THEORY Example 2 : Convert the following logic diagram into NAND gates only.
A

First of all we will replace all of these gates with their NAND equivalent and connect them together.
A

Finally we check for any redundant gates, and identify these.


A

Note the way in which different pairs of redundant gates are marked.
57

Unit E1 : Discovering Electronics Now here are a couple for you to try. Exercise 8 1. (a) Redraw the following logic circuit using 2 input NAND gates only.
A B Q C

(b)

Identify any redundant gates.

58

LOGIC CIRCUITS and SWITCHING THEORY 2. (a) Redraw the following logic circuit using 2 input NAND gates only.
A Q B

(b)

Identify any redundant gates.

59

Unit E1 : Discovering Electronics 1.9.5 Pull Up / Pull Down Resistors (Higher Level Topic)

Up until now we have shown the input connections to a logic gate either as a wire with a label, or connected to a logic input:
A B Q

These diagrams are called schematic circuit diagram which help us to concentrate on what is happening to the logic signals within the logic circuit without worrying to much how the inputs are wired up. If we want to build a logic circuit we have to provide the logic gate with a suitable input sub-system to provide the correct logic levels. The input to a logic gate can come from a number of different sources but for the purposes of this unit we are going to concentrate on mechanical switches. Whichever type of switch we use, they have to be used along with a series resistor as part of a voltage divider circuit. We have to be careful which way around the resistor and switch are connected in the voltage divider circuit to produce either a Logic 0 signal or a Logic 1 signal when the switch is pressed.

60

LOGIC CIRCUITS and SWITCHING THEORY Two input sub-system circuits using a push to make switch are shown below.

Circuit A

Signal at point X is at Logic 0 when switch is pressed

Circuit B

Signal at point Y is at Logic 1 when switch is pressed

The resistor used in Circuit A is called a pull up resistor and the resistor used in Circuit B is called a pull down resistor. This is because of their behavior in the circuit, either pulling up the voltage at the input to Logic 1 or pulling down the voltage to Logic 0 when the switch is not pressed. In Circuit A, before the switch is pressed, there is no connection to the 0V line, and the input to the logic gate is pulled-up to 5V, giving a Logic 1 input to the logic system. When the switch is operated, the input to the logic system is connected to the 0V line through the switch and the logic level falls to Logic 0. In Circuit B, before the switch is pressed, there is no connection to the 5V line, and the input to the logic gate is pulled-down to 0V, giving a Logic 0 input to the logic system. When the switch is operated, current flows through the resistor, causing the voltage across it to rise to 5V, changing the Logic level into the logic system to Logic 1. Now try these
61

Unit E1 : Discovering Electronics Exercise 9 1. Study the circuits below and complete the statements that follow:

a) b) c) d)

In circuit C with the switch open the input to the logic system is at logic In circuit C with the switch closed the input to the logic system is at logic In circuit D with the switch open the input to the logic system is at logic In circuit D with the switch closed the input to the logic system is at logic

2.

Study the circuit below and complete the statements that follow:

a) b) c)
62

Resistor R1 is a pull resistor and R2 is a pull resistor. When switch SW2 is pressed input B is at logic ....... When both switches are pressed output Q is at logic .......

LOGIC CIRCUITS and SWITCHING THEORY Non examinable information about inputs to logic gates You might have asked yourself why cant we simply connect input switches to a logic system as follows

This is because with the switches open the inputs A and B are not connected to either 0V (logic 0) or 5V (logic 1). This will cause the logic system to behave in an unpredictable way. Different families of logic circuits react to these incorrectly connected inputs in different ways. TTL or 74xx series devices have a property whereby any unconnected input will assume a Logic 1. CMOS or 4xxx devices on the other hand behave very differently and any unconnected input will drift rapidly between logic 0 and logic 1, making it impossible for you to tell what logic level the input is actually at. By using pull up and pull down resistors on all inputs, removes this possibility and should ensure that the logic circuit will behave as designed.

63

Unit E1 : Discovering Electronics Solutions to Exercises Exercise 1 1.

i. ii.

The correct symbol for an AND gate is D. The correct symbol for a NOT gate is A.

iii. The correct symbol for a NOR gate is E. iv. v. 2. The correct symbol for a NAND gate is B. The correct symbol for an OR gate is C. i. AND gate. Inputs A 0 0 1 1 ii. NOR gate. Inputs A 0 0 1 1 B 0 1 0 1 Output Q 1 0 0 0 B 0 1 0 1 Output Q 0 0 0 1

64

LOGIC CIRCUITS and SWITCHING THEORY iii. NAND gate. Inputs A 0 0 1 1 iv. OR gate. Inputs A 0 0 1 1 Exercise 2 B 0 1 0 1 Output Q 0 1 1 1 B 0 1 0 1 Output Q 1 1 1 0

a) b) c) d) e)

4. 2. Pin 10. 7 & 14. NOR

65

Unit E1 : Discovering Electronics Solution to Problem on Page 14: Inputs B


0 0 1 1 0 0 1 1

A
0 0 0 0 1 1 1 1

C
0 1 0 1 0 1 0 1

F
1 1 0 0 1 1 0 0

Outputs G
0 1 0 0 0 1 0 0

Q
1 0 1 1 0 0 0 0

Exercise 3 1. Inputs A
0 0 1 1

B
0 1 0 1

Outputs K Q
1 0 0 0 0 1 1 1

2. A
0 0 0 0 1 1 1 1

Inputs B
0 0 1 1 0 0 1 1

C
0 1 0 1 0 1 0 1

F
1 0 1 0 1 0 1 0

Outputs G
1 0 1 1 1 0 1 1

Q
1 1 1 1 0 1 0 0

66

LOGIC CIRCUITS and SWITCHING THEORY 3. A


0 0 0 0 1 1 1 1

Inputs B
0 0 1 1 0 0 1 1

C
0 1 0 1 0 1 0 1

D
1 1 1 1 0 0 0 0

E
1 0 1 0 1 0 1 0

Outputs F
0 0 1 1 0 0 0 0

G
1 1 0 1 1 1 0 1

Q
1 1 1 1 1 1 0 1

67

Unit E1 : Discovering Electronics Exercise 4 1. Output Q is on when input A is high and input B is low. (i.e. Q = A AND NOT B) The logic circuit required is as follows:

2.

Output Q is on when input A is low and input B is high or when input A is high and input B is low. (i.e. Q = [NOT A AND B] OR [A AND NOT B]) The logic circuit required is as follows:

68

LOGIC CIRCUITS and SWITCHING THEORY 3. (a) (b) (c) (d) P = Inverse of input A (or P = NOT A) The name of this gate is AND. R = A NOR B.

4.

Red = Input A Yellow = NOT B Green = NOT A AND B

69

Unit E1 : Discovering Electronics Exercise 5 1.

i. Expression A is correct for an AND gate. ii. Expression D is correct for a NOT gate. iii. Expression B is correct for a NOR gate. iv. Expression E is correct for a NAND gate. v. Expression C is correct for an OR gate. X=B Y = A.B Z = A.B

2.

70

LOGIC CIRCUITS and SWITCHING THEORY

Exercise 6 1. a) Inputs A 0 0 1 1 b) i) ii) iii) c) B 0 1 0 1

Truth Table Outputs O/p 1 O/p 2 1 1 1 0 0 0 0 0

O/p 3 0 0 1 0

O/p 1 = NOT A, or A O/p 2 = A NOR B, or A B O/p 3 = A AND NOT B, or A.B

71

Unit E1 : Discovering Electronics 2. a) Complete the following truth table for the system. Inputs A 0 0 1 1 b) c) d) B 0 1 0 1 Outputs LED buzzer 1 1 1 0 0 0 0 0

The led output is the inverse of input A. Buzzer = A NOR B, so a NOR logic gate is required.

3.

a) Inputs A 0 0 1 1 b) c) B 0 1 0 1 R 0 0 0 1 Outputs Y 1 1 1 0

G 1 0 0 0

An AND gate is required to provide the R output. Y = A NAND B ( or Y = NOT R)

72

LOGIC CIRCUITS and SWITCHING THEORY

d) e)

A NOR gate is required to provide the G output.

Or

73

Unit E1 : Discovering Electronics 4. a) Inputs A 0 0 1 1 b) c) d) B 0 1 0 1 V1 (cyan) 0 0 0 1 Outputs V2 V3 (magenta) (yellow) 1 1 0 1 1 0 0 0

An AND gate will provide the V1 output. V2 = NOT B (or B ) V3 = NOT A (or A )

74

LOGIC CIRCUITS and SWITCHING THEORY Exercise 7 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 4. NOR gates. NAND gates. 4. 3, 6, 8 and 11. 7404. 2. 4002 & 4072 14. 9, 10, 11 & 12. AND gates. 7402.

75

Unit E1 : Discovering Electronics Exercise 8 1.


A B Q C

2.
A

Exercise 9
a) b) c) d) In circuit C with the switch open the input to the logic system is at logic 1 In circuit C with the switch closed the input to the logic system is at logic 0 In circuit D with the switch open the input to the logic system is at logic 0 In circuit D with the switch closed the input to the logic system is at logic 1

2.

a) b) c)

Resistor R1 is a pull DOWN resistor and R2 is a pull UP resistor. When switch SW2 is pressed input B is at logic 0 When both switches are pressed output Q is at logic 0

76

LOGIC CIRCUITS and SWITCHING THEORY

Examination Style Questions


1. The diagram shows the pin-out for an IC (integrated circuit).

(a) (b) (c)

How many logic gates are in this IC? How many inputs does each gate have? Pin 1 is labelled. (i) (ii) What is the pin number for the 0V pin? What is the pin number for the output of gate A?

........................................... ...........................................

........................................... ........................................... [4]

2.

(a)

Here are five logic gate symbols.

Complete the table to match the logic symbols and their names. Logic Gate Name AND gate NAND gate NOR gate NOT gate OR gate [3] 77 Correct Symbol A, B, C, D or E

Unit E1 : Discovering Electronics


(b) Complete the truth tables for the following logic gates: (i) a NOT gate Input 0 1 [1] (ii) an AND gate Input 0 0 1 1 0 1 0 1 [1] (c) A NOT gate and an AND gate are connected together as shown in the block diagram. Output Output

(i)

Complete the following truth table for this system: L 0 0 1 1 M 0 1 0 1 [2] X Q

(ii)

Name the single logic gate which produces the same effect as this logic system. ........................................ [1]

78

LOGIC CIRCUITS and SWITCHING THEORY


3. An electronic system has two input sensors A and B, and three outputs P, Q and R. The truth table showing how the input sensors control the outputs is shown below. B 0 0 1 1 (a) A 0 1 0 1 P 0 1 0 1 Q 1 1 0 0 R 1 0 0 0

Which of the following expressions correctly describes the P output? A Answer NOT A B NOT B

.................................... [1]

(b)

Which of the following expressions correctly describes the Q output? A Answer NOT A B NOT B

....................................

(c)

[1] Complete the following diagram to show how the R output can be obtained using a single logic gate.

[1]

79

Unit E1 : Discovering Electronics


4. The following diagram shows a logic system.

(a)

Complete the following truth table for this system. Input A 0 0 1 1 Input B 0 1 0 1 X Q

(b)

(i)

[2] Complete the diagram to show how a NAND gate can be made to behave as a NOT gate.

[1] (ii) Draw a diagram to show the NAND gate equivalent of an AND gate.

[1] (iii) Here is a logic system built using only NAND gates.

Cross out all redundant gates. [1] 80

LOGIC CIRCUITS and SWITCHING THEORY


5. The diagram shows the pin-out for an IC (Integrated circuit).

(a) (b) (c)

How many logic gates are in this IC? How many inputs does each gate have? Pin 1 is labelled. (i) (ii) What is the pin number for the 0V pin? What is the pin number for the output of gate X?

........................................... ...........................................

........................................... ...........................................

(d)

Choose the type of logic gate found on this IC from the following list: AND OR NOT NAND NOR

Answer : ............................................... [5] 6.

Complete the statements: (a) (b) The signal at P will be logic 0 only when input A is logic ....................... [1] Output Q will be logic 1 only when the signal at P is logic ......................, and input B is logic ...................... [1] 81

Unit E1 : Discovering Electronics


7. Here are five logic gate symbols:

(a)

Which symbol, V, W, X, Y or Z, is the symbol for a NOT gate?

........................... [1]

(b)

Which symbol, V, W, X, Y, or Z, is the symbol for the logic gate which has the following truth table? Input A 0 0 1 1 Input B 0 1 0 1 Q 0 1 1 1

Answer : .................................... [1] (c) Which one of the following logic gate systems, R, S, T, or U, has the same output as an AND gate?

Answer : .................................... [1]

82

LOGIC CIRCUITS and SWITCHING THEORY


8. Here is part of the block diagram for a system that tells the assistant when someone enters a shop.

(a)

The switch unit is used to arm (switch on) the system. It outputs logic 1 when switched on. The buzzer sounds when someone stands on the pressure pad, but only of the system is armed. The pressure pad outputs logic 1 when someone stands on it. The transistor switch needs a logic 1 input to make the buzzer sound. Which of the following truth tables, C, D, E, or F, gives the required output for logic gate X?

Answer : ................................ [1] (b) What type of logic gate is required in block X? Choose your answer from the following list: AND gate NAND gate NOT gate OR Gate

Answer : ................................ [1]

83

Unit E1 : Discovering Electronics


(c) Which one of the following, P, Q, R, or S is a suitable circuit for the switch unit? It outputs logic 1 (12V) when switched on.

Answer : ................................. [1]

84

LOGIC CIRCUITS and SWITCHING THEORY


9. (a) Complete the truth table for the following logic system:

A 0 0 1 1

B 0 1 0 1

[3] (b) Redraw the system replacing each of the three gates with its equivalent NAND gate arrangement.

[3]

85

Unit E1 : Discovering Electronics


10. The diagram shows the pin-out for an IC (integrated circuit).

(a) (b) (c)

How many logic gates are in this IC? How many inputs does each gate have? Pin 1 is labelled. (i) (ii) What is the pin number connected to 0V ? What is the number of the pin labelled X?

........................................... ...........................................

........................................... ...........................................

(d)

Choose the type of logic gate found on this IC from the following list: AND OR NOT NAND NOR

Answer : ............................................... [5]

86

LOGIC CIRCUITS and SWITCHING THEORY


11. (a) Here are five logic gates:

(i)

Which one, A, B, C, D, or E, is an AND gate? Answer : ............................................. [1]

(ii)

Which one, A, B, C, D, or E, has the following truth table? Inputs 0 0 1 1 0 1 0 1 Q 1 1 1 0

Answer : ............................................. [1] (b) The following logic system gives the same output as one of the logic gates in part (a).

(i)

Complete the following truth table for this logic system. A 0 0 1 1 B 0 1 0 1 [2] X Q

(ii)

Which single logic gate gives the same output as this system? Answer : ........................................... [1]

87

Unit E1 : Discovering Electronics


12. The following logic system is built using three logic gates.

(a)

(i)

Complete the following truth table for the logic system above. A 0 0 1 1 B 0 1 0 1 X Y Q

[2] (ii) Which single logic gate gives the same output as this system? Answer : .................................... [1] (iii) Redraw the system showing the NAND equivalent of each gate.

[2] (b) Here is another system of NAND gates.

(i) (ii)

Simplify it by crossing out any redundant gates. [2] Give one reason why it is cheaper to convert a logic system into its NAND gate equivalent. ................................................................................................................................. ................................................................................................................................. [1]

88

LOGIC CIRCUITS and SWITCHING THEORY


13. Here are five logic gate symbols:

(a)

Which symbol, V, W, X, Y or Z, is the symbol for a NOT gate?

........................... [1]

(b)

Complete the truth table for the logic gate W. Input A 0 0 1 1 Input B 0 1 0 1 [1] Q

(c)

Which one of the following logic gate systems, P, Q, R, or S, has the same output as logic gate W?

Answer : .................................... [1]

89

Unit E1 : Discovering Electronics


14. The diagram shows the pin-out for an IC (integrated circuit).

(a) (b) (c) (d)

How many logic gates are in this IC? How many inputs does each gate have? Label Pin 1 of the IC.

........................................... ...........................................

What is the number of the pin connected to the output of gate A? ...........................................

(e)

Choose the type of logic gate found on this IC from the following list: AND OR NOT NAND NOR

Answer : ............................................... [5]

90

LOGIC CIRCUITS and SWITCHING THEORY


15. (a) Here is a list of logic gates: AND (i) OR NOT NAND NOR

Which of the gates has the following symbol? Answer : .................................... [1]

(ii)

Which of the gates has the following truth table? A 0 0 1 1 B 0 1 0 1 Q 0 0 0 1

Answer : ................................... [1] (ii) Which of the gates has the opposite effect to (inverts) an OR gate? Answer : .................................... (b) Complete the truth table for the following logic system:

A 0 0 1 1

B 0 1 0 1

[2]

91

Unit E1 : Discovering Electronics


16. (a) Complete the truth table for the following logic system.

A 0 0 1 1

B 0 1 0 1

[3] (b) (i) Redraw the system replacing each of the three gates with its equivalent NAND gate arrangement.

[3] (ii) Draw a line through each redundant gate. [1]

92

LOGIC CIRCUITS and SWITCHING THEORY


17. (a) Here are five logic gates symbols:

Which symbol, A, B, C, D or E, is the symbol for: (i) (ii) (iii) a NOT gate; an OR gate; a NAND gate? ........................................... ........................................... ........................................... [3] (b) Here are five truth tables:

Which table, A, B, C, D or E, is the truth table for: (i) (ii) (iii) a NOT gate; an OR gate; a NAND gate? ........................................... ........................................... ........................................... [3]

93

Unit E1 : Discovering Electronics


(c) (i) Complete the truth table for the following logic system:

A 0 0 1 1 (ii)

B 0 1 0 1

Name the single logic gate which produces the same effect as this logic system. ..................................................... [1]

94

LOGIC CIRCUITS and SWITCHING THEORY


18. (a) Complete the truth table for the following logic gates. (i) OR

(ii)

AND

[4] (b) Complete the truth table for the following system of logic gates.

A 0 0 1 1

B 0 1 0 1

[3]

95

Unit E1 : Discovering Electronics


(c) (i) Redraw the system replacing each of the three gates with its equivalent NAND gate arrangement.

[3] (ii) Draw a line through each redundant gate. [1]

96

LOGIC CIRCUITS and SWITCHING THEORY


19. (a) Write the name of each logic gate in the spaces provided.

[3] (b) The three gates are arranged in the following logic system. Complete the truth table.

A 0 0 1 1

B 0 1 0 1

[3]

97

Unit E1 : Discovering Electronics


20. (a) Complete the truth table for the following NAND gate.

[1] (b) The NAND gate is used along with a NOT gate and an OR gate as part of a logic system shown below.

Complete the truth table for the logic system.

A 0 0 1 1

B 0 1 0 1

Q2

[3]

98

LOGIC CIRCUITS and SWITCHING THEORY


21. A logic gate system is required to switch on three different lights P, Q and R. input switches A and B control the lights. The following truth table shows how the lights come on for various switching conditions. A 0 0 1 1 (a) (i) B 0 1 0 1 P 0 1 0 0 Q 1 0 1 0 R 1 1 0 0

Output Q can be obtained by inverting one input. Write down the Boolean expression for Q obtained in this way. Q = ...................................................................... [1]

(ii)

Using the truth table write down the Boolean expressions for outputs P, and R. P = ...................................................................... R = ..................................................................... [2]

(b)

Draw the logic circuit needed to produce output P.

[2]

99

Unit E1 : Discovering Electronics


(c) Here is another logic system.

Draw the NAND gate equivalent of this circuit.

[3]

100

LOGIC CIRCUITS and SWITCHING THEORY


22. Here is the pin-out for an IC (integrated circuit).

(a) (b) (c) (d)

How many logic gates are in this IC? How many inputs does each gate have? Which pin, A, B, C or D is Pin 1 of this IC.

........................................... ........................................... ...........................................

Choose the type of logic gate found on this IC from the following list: AND OR NOT NAND NOR

Answer : ............................................... [4]

101

Unit E1 : Discovering Electronics Self Evaluation Review

Learning Objectives

My personal review of these objectives:

1.9.1 Introduction. Recognise high/low, 1/0, as two state logic levels; 1.9.2 Truth Tables. Draw symbols and construct truth tables for AND, OR, NOT, NOR, and NAND gates; Produce a truth table for a system of up to five gates; Devise a system of gates from a truth table; Design simple systems using logic gates to solve a given problem; Use Boolean notation as a shorthand method of expressing a truth table; 1.9.3 Use of data sheets. Use data sheets to; Select a logic IC for given applications; Identify pin connections of logic gates; 1.9.4 NAND gate implementation. Show how other gates can be made up from NAND gates; Implement a given logic circuit using NAND gates; Remove double inversions; 1.9.5 Pull up/down resistors. Recognise the use of pull up/down resistors to provide the correct logic levels at a gate input.

Targets:

1.

2.

102

Das könnte Ihnen auch gefallen