Sie sind auf Seite 1von 8
. Digital Systems (a) Candidates should be able to understand the function of each of the following logic gates: NOT, AND, NAND, OR, NOR and represent these functions by means of truth iables (limited to a maximum-of two inputs, where appropriate). Logic is generally concerned with binary variables; i.e. anything which has only two possible values. For example; a “person” can be maie or female, a “statement” can be true or false, a door can be open or closed, and so on. To apply the rules of logic there must be no grey or fuzzy areas of doubt (i.e. the “door” is not allowed to be ajar). In electronic logic, the binary variable is voltage and its two values are high and low. A high voltage usually means one very close to the positive of the power supply whereas a low voltage usually means one close to the negative of the supply. Figure 2.1 shows a simple circuit which generates a high or a low voltage according to the position of the switch. (6 V has been used as a typical power supply.) ov Fig. 2.1 The two lines emerging from ihe power supply are labelled 0 V'and +5 V. ‘The zero-volt line forms the reference to which all voltages are measured. If the switch is in the low position, the voltmeter will read 0 V. If the switch is in the high position, the voltmeter will read +5 V. A low voltage of OV is denoted by the symbol logic 0. Ahigh voltage of +5 V is denoted by the symbol fogic 1. Note that logic 1 is a symbol, not a number (i.e. is not half of two). In electronic logic, integrated circuits can be built which carry out logic functions. The three basic logic functions are NOT, AND and OR. 24 The NOT function Figure 2.2(a) shows a circuit with an/on/off switch. In this circuit, the light bulb will be on if the switch is off, i.e. the state of the jight bulb is NOT the state of the switch. ov (a) (b) TRUTH TABLE A Q oO 1 1 oO (c) Fig. 2.2 Figure 2.2(b) shows an integrated circuit (called a NOT gate) which behaves in a similar way. The output of the gate is NOT the same logic level as the input to the gate. If the input is logic 0 then the output is logic 1 and vice versa. The electronic symbol for a NOT gate is shown in Fig, 2.2(c), along with its truth table. A truth table is simply a table listing all the possible inputs to a logic system along with the corresponding outputs. As a NOT gate only has 1 binary input, there are 2' = 2 possible combinations of input logic states. Note that a NOT gate is often called an INVERTER because of its behaviour. 25 The AND function Figure 2.3(a) shows a circuit with two on/off switches A and B. In this circuit, the light bulb can only be on if switch A is on AND switch B is on. For ail other combinations of the two switches, the fight bulb is off. off off A B I (a) (b) B Q s—[_)- ee Q 0 0 e be Oo 1 1 (ce) Fig. 2.3 Figure 2.3(b) shows an integrated circuit (called an AND gate) which behaves in a similar way. The output of the gate can only be logic 1 (a high voltage) if input Ais logic 1 AND input B is logic 1. The electronic symbol for an AND gate is shown in Fig. 2.3(c) along with its truth table. Note that the AND gate has 2 inputs so that there are 2? = 4 combinations of input logic states in the truth table. The OR function Figure 2.4(a) shows a circuit with two on/off switches A and B. In this circuit, the light buib will be on if either switch A is on OR switch B is on. 26 A B (a) (b) Ee Q tof 4 e aero 1 : Ee 1 i (c) Fig. 2.4 Figure 2.4(b) shows an integrated circuit (called an OR gate) Which behaves In a similar way. The output of the gate will be logic 1 if either input A is logic 1 OR input B is logic 1. The electronic symbol for an OR gate is shown in Fig. 2.4(c) along with its truth table. Since the OR gate has 2 inputs, there are 2? = 4 possible combinations of input logic states in the truth table. In logic circuit diagrams, the power supply line connections to the logic gates are not normally shown. _ More complex logic systems can be formed from suitable interconnections of these three gates. For example The NAND function When an AND gate is followed by a NOT gate, the logic circuit so created has the function which is called a NOT AND gate or NAND gate. This is shown in Fig. 2.5, where the symbol for a NAND gate is simply that of an AND gate with a small circle at the output. A — A— | eo = res — p—_1 4 oO 1 Fig. 2.5 =|4lololm lo}a}=|=lo In digital/binary electronics, the small circle implies logical inversion (i.e. the NOT function). 27 The NOR function When an OR gate is followed by a NOT gate, the logic circuit so created has the function which is called a NOT OR gate or NOR gate. This is shown in Fig. 2.6, where the symbol for a NOR gate is simply that of an OR gate with a small circle at the output. i] 9 Il o> © alo|+|o]> a|alolola ojofo|=|O Fig. 2.6 2 (b) Candidates should be able to recall how to combine AND, NOT and OR gates, or NAND gates only, to form EX-OR and EX-NOR gates. The EX-OR function The EXCLUSIVE-OR function (EX-OR) is demonstrated by the stair-lighting circuit shown in Fig. 2.7. Here the light bulb will be on if switch A is 4, or if switch Bis 1, but it excludes the state where they are both 1. In other words, the bulb will be on when the state of the two switches is different. Fig. 2.7 The symbol for the logic circuit which performs this EX-OR function is shown In Fig. 2.8 along with its corresponding truth table. A Bs Q A o ojo s) >-e go ts o ifi 1 1 }| 0 Fig. 2.8 28 The EX-OR function can be generated by interconnecting basic logic gates to form a logic circuit. The logic circuit is essentially given by EX-OR = (A AND NOT B) OR (NOT A AND B) Figure 2.9 shows three such logic circuits which all produce the EX-OR function, i.e. they all share exactly the same truth table as shown in Figure 2.8. , [ | pa Fig. 2.9 The EX-OR is sometimes referred to as a difference gate because the output is only ever logic 1 when the inputs are different. A B: The EX-NOR function 29 The EX-NOR gate is simply an EX-OR gate followed by an inverter or NOT gate. The symbol for an EX-NOR gate is shown in Fig. 2.10 along with its truth table. Such a gate is often termed a parity gate because the output is logic 1 whenever the inputs are the same. —) > =) >>-e Fig. 2.10. aJalolo|> =Jo]-jolo alolo]+|o Figure 2.11 shows thé use.of an EX-OR gate ‘afd an EX-NOR gate in inputs are generated by two push switches. a circuit where the i +5V A B I = 4. + | difference ~ + ov (a) + 45V Aid = T ov wu The “difference LED" will light if A is pushed or if B is pushed but not if they are both pushed (Fig. 2.11(a)). The “same LED" will light if neither switch is pushed or if they are both pushed (Fig. 2.11 (b)). 2 (c) Candidates should be able to’ analyse circuits using combinations of logic gates to perform control functions. Suppose it is required to make a simple combination lock system which will allow access to a protected area through an electronically locked door. The system is to consist of 4 input switches A, B, C and D, each of which can be set to logic 1 or logic 0. If ABCD is set to the correct code, then a solenoid is to be energised and the lock opened. If, however, an incorrect code is set, the lock will remain closed and an alarm will sound, The four switches ABCD generate a binary code which can have any one of 24 = 16 possible values. From these codes, only one is to be correct and the other fifteen incorrect. Figure 2.12 shows a possible design for such a ¢ircuit. (Note that, for clarity, the power supply lines to the logic gates are not shown although the gates are all powered from the 5V supply.) Points have been labelled w, x, y and z to assist with the explanation. “push to operate” par +5V 1 alarm solenoid | lock! ov Fig. 2.12 In order for the lock to open, point y must be logic 1. If point y is logic 1, then point z must be logic 0 and thus the alarm cannot sound when the lock is open.

Das könnte Ihnen auch gefallen