digital electronics. logic gates and gate or gate not gate xor gate nand gate nor gate xnor gate dr...
TRANSCRIPT
Digital Electronics
• Logic gatesAND gateOR gateNOT gateXOR gateNAND gateNOR gateXNOR gate
Dr Khayyat
INTRODUCTION
• Logic Gates are circuits made up of transistors, diodes, and resistors. Logic gates process one or more input signals in a logical fashion. Depending on the input value or voltage, the logic gate will either output a value of '1' for ON or a value of '0' for OFF.
Dr Khayyat
• DIGITAL CIRCUITS Logic Gates are digital circuits. All digital circuits are either ON or OFF.
• A light switch in your house can be used as an example of a digital circuit. The light is either ON or OFF depending on the switch position.
• When the Light is ON the output value is '1'.• When the Light is OFF the output value is '0'.• The inputs are the position of the light switch.
The switch is placed either in the ON or OFF position to activate the Light.
Dr Khayyat
Digital signals
Dr Khayyat
• There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
Dr Khayyat
AND gate
• The AND gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator.
• The output is "true" when both inputs are "true." Otherwise, the output is "false."
Dr Khayyat
AND (symbol & truth table)
Dr Khayyat
INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 0
0 1 0
1 0 0
1 1 1
A.B = Y
A
B
A.B
• 'AND' gates are like two or more switches in series. All the switches have to be closed ( 'ON' or a value of '1') in order to make the lamp (output C) turn on.
Dr Khayyat
Dr Khayyat
OR gate
• The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."
Dr Khayyat
Dr Khayyat
OR (symbol & truth table)INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 0
0 1 1
1 0 1
1 1 1
A+B = Y
• An 'OR' gate is like two or more switches in parallel. Only one switch needs to be closed ('ON' or a value of '1') in order to make the lamp (output C) turn 'ON' with a value of '1'.
Dr Khayyat
What is AND & OR?
Dr Khayyat
AND• To the right is the equivalent AND gate. We use
the same logic levels, but the diodes are reversed and the resistor is set to pull the output voltage up to a logic 1 state. For this example, +V = +5 volts, although other voltages can just as easily be used. Now, if both inputs are unconnected or if they are both at logic 1, output Z will be at logic 1. If either input is grounded (logic 0), that diode will conduct and will pull the output down to logic 0 as well. Both inputs must be logic 1 in order for the output to be logic 1, so this circuit performs the logical AND function.
Dr Khayyat
OR• To the left you see a basic Diode Logic OR gate.
We'll assume that a logic 1 is represented by +5 volts, and a logic 0 is represented by ground, or zero volts. In this figure, if both inputs are left unconnected or are both at logic 0, output Z will also be held at zero volts by the resistor, and will thus be a logic 0 as well. However, if either input is raised to +5 volts, its diode will become forward biased and will therefore conduct. This in turn will force the output up to logic 1. If both inputs are logic 1, the output will still be logic 1. Hence, this gate correctly performs a logical OR function.
Dr Khayyat
• In both of these gates, we have made the assumption that the diodes do not introduce any errors or losses into the circuit. This is not really the case; a silicon diode will experience a forward voltage drop of about 0.65v to 0.7v while conducting. But we can get around this very nicely by specifying that any voltage above +3.5 volts shall be logic 1, and any voltage below +1.5 volts shall be logic 0. It is illegal in this system for an output voltage to be between +1.5 and +3.5 volts; this is the undefined voltage region.
Dr Khayyat
Dr Khayyat
• Typical Voltage Assignment
• Binary 1: Any voltage between 2V to 5VBinary 0: Any voltage between 0V to 0.8VNot used: Voltage between 0.8V to 2V, this may cause error in a digital circuit.
Inverter or NOT gate
• A logical inverter, sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.
Dr Khayyat
Dr Khayyat
NOT (symbol & truth table)
INPUT
A
OUTPUT
Y
1 0
0 1
YA
Dr Khayyat
XOR gate• The XOR (exclusive-OR) gate acts in the
same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.
Dr Khayyat
Dr Khayyat
XOR (symbol & truth table)
INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 0
0 1 1
1 0 1
1 1 0
YBA
YBABA
..
Dr Khayyat
AB
YBA
YBABA
..
Y
NAND gate
• The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."
Dr Khayyat
Dr Khayyat
NAND (symbol & truth table)
INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate
• The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false."
Dr Khayyat
Dr Khayyat
NOR (symbol & truth table)
INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 1
0 1 0
1 0 0
1 1 0
XNOR gate
• The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and "false" if the inputs are different.
Dr Khayyat
Dr Khayyat
XNOR (symbol & truth table)INPUT 1
A
INPUT 2
B
OUTPUT
Y
0 0 1
0 1 0
1 0 0
1 1 1
YBA
YBABA
..
Detailed Truth Table of XOR & XNOR
A B
0 0 1 1 0 0 0 0 1 1
0 1 1 0 0 1 1 0 0 0
1 0 0 1 1 0 1 0 0 0
1 1 0 0 0 0 0 1 0 1
A B BA. BA. BA. BA.BA BA
Combinations of logic gates
• Logic gates can be combined to produce more complex functions.
Dr Khayyat
D = NOT (A OR B)E = B AND CQ = D OR E = (NOT (A OR B)) OR (B AND C)
Dr Khayyat
Integrated Circuits (IC)
• 7400 - NAND (four gates per chip)
• 7402 - NOR (four gates per chip)
• 7404 - NOT (six gates per chip)
• 7408 - AND (four gates per chip)
• 7432 - OR (four gates per chip)
• 7486 - XOR (four gates per chip)
Dr Khayyat
Inside an IC
Dr Khayyat
The rules of Boolean Algebra
• AND Operations (·) 0·0 = 0, A·0 = 0, 1·0 = 0, A·1 = A, 0·1 = 0,
A·A = A, 1·1 = 1, A·A' = 0
• OR Operations (+) 0+0 = 0, A+0 = A, 1+0 = 1, A+1 = 1, 0+1 = 1
A+A = A, 1+1 = 1, A+A' = 1
• NOT Operations (') 0' = 1, A'' = A, 1' = 0
Dr Khayyat
القالبات
التخزين و العد عمليات في شيوعا الدوائر أكثرتشغيل حالتا لها التي و القالبات دوائر هي
المستويين الحالتان هاتان تقابل مستقرتان1 &0النطقيين
مثل القالبات من عدد :هناك
RS flip-flop
JK flip-flop
D flip-flop
Dr Khayyat
SR Flip Flop
Dr Khayyat
Q
Q`
و الخط و الخط هما دخل خطا له قالبالمتمم خرج و العادي الخرج هما خرج خطا
يكون عندما ضبط حالة في القالب يكونيكون عندما ضبط اعادة حالة في يكون وأو دوائر باستخدام القالب دوائر تنفذ
دوائر باستخدام
Dr Khayyat
RSRS
QQ`
SET
RESET
Q=1, Q`=0
Q=0, Q`=1
RSNORNAND
• An SR Flip Flop is an arrangements of logic gates that maintains a stable output even after the inputs are turned off. This simple flip flop circuit has a set input (S) and a reset input (R). The set input causes the output of 0 (top output) and 1 (bottom output). The reset input causes the opposite to happen (top = 1, bottom =0). Once the outputs are established, the wiring of the circuit is maintained until S or R go high, or power is turned of to the circuit.
Dr Khayyat
Truth table of the RS flip-flop
R S Q Q` حالة
0 0 0 1 تخزين
0 1 1 0 ضبط
1 0 0 1 اعادة ضبط
1 1 0 0 غير مضبوطة
Dr Khayyat
المنطق قوانين بعض
Dr Khayyat
1.
1.
.
1.
11
00.
0
AA
AA
AAA
AAA
AA
A
A
AA
Dr Khayyat
DeMorgan's Theorem
• (x+y)' = x' * y'
• (x*y)' = x' + y'
Dr Khayyat
Implications of DeMorgan's Theorem
• (x+y)' = x' * y'
Dr Khayyat
(x*y)' = x' + y'
Dr Khayyat
Implementing Circuits From Boolean Expression
Dr Khayyat
What function is implemented by the circuit shown x'y'+z(x'+y')zx'y'zx'+y'+zNA
Dr Khayyat
• What function is implemented by the circuit shown x+y+zx+y+z'x'y'zx'+y'+z'NA
Dr Khayyat
• What function is implemented by the circuit shown xz'+yxz+yx'z+y'x'y'+y'z'x'y'+y'z
Dr Khayyat
• Which gate is the following circuit equivalent to? ANDORNANDNORNone of the above
Dr Khayyat
• The function in the following circuit is: abcdab+cd (a+b)(c+d)a+b+c+d(a'+b')(c'+d')
Dr Khayyat
Which of the following functions equals the function: f=x+yz' ?x(y'+z)x(y'+z)(y+x)(z'+x)(y+x')(x'+z')NA
Dr Khayyat
• Given F=A'B+(C'+E)(D+F'), use de Morgan's theorem to find F'.ACE'+BCE'+D'F(A+B')(CE'D'F)A+B+CE'D'FACE'+AD'F+B'CE'+B'D'FNA
Dr Khayyat
• The function in the following circuit is: x'+y'+z'x+y+zx'z'+y'z'xy+zz
Dr Khayyat
• Try Harder Simplify the following: {[(AB)'C]'D}'(A'+B')C+D'(A+B')C'+D'A'+(B'+C')DA'+B'+C'+D'A+B+C+D
Dr Khayyat
• Thank you, and hoping that you’ve enjoyed the course, as I very much liked delivering it!