Documente Academic
Documente Profesional
Documente Cultură
Gates:-
Course: Computer Fundamental Instructor: Dr. Arif Mushtaq Topic: Logic Gates
Circuits:-
Transistor
voltage in control high allows current to flow -switch is closed (on) control low stops current flow switch is open (off) voltage out
Gates
Gate: a group of transistors (on =1, off = 0)
Gates are switches that distinguish between two electrical voltages: Current is low => 0 Current is high => 1
control
Basic Types:
AND Gate
3
OR Gate
NOT Gate
4
AND Gate
A 0 0 1 1
B 0 1 0 1
A AND B 0 0 0 1
A OR B 0 1 1 1
5
A 0 1
NOT A 1 0
3/26/2012
AND Gate
OR Gate To construct and AND gate, we must use of two transistors connected in series. If both Input-1 and Input-2 are set to 1. This will put both of the transistors into the ON state, then the resulting output will be 1. Input-1
OR Gate
Power Supply To construct OR gate, we again must use two transistors. However, this time they are connected in parallel rather than in series.
Input-2 Input-2 If either, or both, of the control lines Input-1 and Input-2 are set to 1, then the corresponding transistors will be in the ON state.
8
Output
Output
NOT Gate
Resistor Power supply Output Input A NOT gate requires only a single transistor. If the input line is a 1, then the transistor will pass the current through, and it will be discarded, producing an output of 0. If the input line is a 0, the transistor blocks passage of current to the discard area, and it is transmitted to the output line, producing an output value of 1.
Waste basket
9 10
Integrated circuits
Integrated circuits started to appear in the late 1960s. A typical single chip at that age, but still available to buy today - is shown below; it contains four NAND gates and has 14 pins. Vcc
14 13 12 11 10 9 8
Boolean algebra
Boolean algebra is also called Boolean logic, which studies two logical values, {false, true}, which we may label {0, 1}, and their operations. The basic operations include two binary operations AND, OR, and the unary operation negation NOT. There are other binary operations, but they can be expressed in terms of these three.
12
Pin 8
Notch
1 2 3 4 5 6 7
GND
11
3/26/2012
OR Operation (contd.)
W 0 0 W X Y X 0 0 1 1 0 0 1 1 Y 0 1 0 1 0 1 0 1 Z 0 1 1 1 1 1 1 1
14
OR
0 0 1
1 1 1
Combinational Circuits
By combining gates, we can compute a Boolean expression What we want to do is:
Derive the Boolean expression for some binary calculation (e.g., addition) Then build the circuit using the various logic gates
Example-1
Determine the output assuming that the upper input is 1 and the lower input is 0. Write the boolean expression of this circuit
A
Y B
This is how we will build the digital circuits that make up the ALU (arithmetic-logic unit) and other parts of the computer
15
Example-2
Determine the input combination that produces an output of 1. Write the truth table for the circuit
A
Y B
0 1 1 1 1
18
3/26/2012
AND
(X*Y)
AND
(Y +Z)
(X*Y) * (Y +Z)
OR
20
XOR Operation
X
Example-3
The rectangles represent some types of gates. Based upon the inputs/output given, identify the gates (AND / OR / XOR).
XOR
Y X Y Z 0 1 1 0
Truth Table
0 0 1 1
0 1 0 1
1
0
21
Example-4
The rectangles represent some types of gates. Based upon the inputs/output given, identify the gates (AND / OR / XOR).
Example-5
The rectangles represent some types of gates. Based upon the inputs/output given, identify the gates (AND / OR / XOR).
1
0
1
? ? ? 0
3/26/2012
Binary Operations
Truth Table
Binary Addition
X Y 0 0 1 0 1 Carry Sum 0 0 0 1 0 1 1 0 Y XOR Sum X AND Carry
Binary Operations
Addition, Subtraction, Multiplication, Division
How combinational circuits for these operations are built ?? Lets look at a combinational circuit for Binary addition
25
0 1 1
26
A B + ( A + B) B
27