Sunteți pe pagina 1din 5

3/26/2012

Transistors, Gates and Circuits


Transistors:Week: Lecture Date: 08 26/03/2012
Transistor acts like a switch, which is either in an ON state or OFF state. A group of transistors are used to build gate, which also acts like a switch (ON or OFF). The main difference b/w transistor and gate is that, first has only one input, while second may has many inputs. A group of Gates are used to build a circuit, which is used to solve complex problems (like microprocessor).

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

Gates and Boolean Algebra

Gates and Boolean Algebra (cont)

AND Gate

OR Gate NOT 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

Power supply Input-1 `

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.

Logic Gates, Truth Tables & Boolean Algebra

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

AND Operation (contd.)


W 0 0 W X Y Z 0 0 1 1 1 1 X 0 0 1 1 0 0 1 1 Y 0 1 0 1 0 1 0 1 Z 0 0 0 0 0 0 0 1
13

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

AND Operation is equivalent to taking product in arithmetic

OR Operation is equivalent to taking sum in arithmetic

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

Combinational Circuits - Example


Truth Table for Boolean expression (X*Y) * (Y +Z)
X 0 0 0 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 X*Y 0 0 0 0 0 0 0 1 Y 1 1 0 0 1 1 0 0 Y +Z 1 1 0 1 1 1 0 1 (X*Y) * (Y +Z) 0 0 0 0 0 0 0 1

A
Y B

0 1 1 1 1

18

3/26/2012

Combinational Circuits - Example


Truth Table for Boolean expression (X*Y) * (Y +Z)
X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 X*Y 0 0 0 0 0 0 0 1 Y 1 1 0 0 1 1 0 0 Y +Z 1 1 0 1 1 1 0 1 (X*Y) * (Y +Z) 0 0 0 0 0 0 0 1

Combinational Circuits - Example


We will combine logic gates together for calculations e.g. a circuit for a Boolean expression (X*Y) * (Y +Z)
X Y

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

Exercise: Making Logic circuits


Make a truth table and the logic circuit for

Logic Circuit Boolean Exp


What is the boolean expression of this circuit??

A B + ( A + B) B

27

S-ar putea să vă placă și