module 7

61
Module 7 Hardware

Upload: demont

Post on 07-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Module 7. Hardware. Introduction. Switches are the basic blocks of computer hardware. We build increasingly complex hardware from these simple switches. An example of a switch that we use everyday in our lives is the Light Switch. Introduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Module 7

Module 7

Hardware

Page 2: Module 7

Introduction

• Switches are the basic blocks of computer hardware.

• We build increasingly complex hardware from these simple switches.

• An example of a switch that we use everyday in our lives is the Light Switch.

Page 3: Module 7

Introduction

• The switches that we use in computer hardware are far too small to be seen by the naked eye.

• Then how are these components constructed if they are that small?

Page 4: Module 7

Introduction

• The answer rests in three technologies:

Page 5: Module 7

Introduction

• The answer rests in three technologies:– The idea of representing information by electrical

signals which led to development of the telegraph. • Switching devices developed such as Vacuum tubes,

but they all suffered from the disadvantages of being large, high power consumption and slow speed.

Page 6: Module 7

Introduction

• The answer rests in three technologies:– The idea of representing information by electrical

signals which led to development of the telegraph. • Switching devices developed such as Vacuum tubes,

but they all suffered from the disadvantages of being large, high power consumption and slow speed.

– Invention of transistor which is a very small switch.

Page 7: Module 7

Introduction• The answer rests in three technologies:– The idea of representing information by electrical

signals which led to development of the telegraph. • Switching devices developed such as Vacuum tubes, but

they all suffered from the disadvantages of being large, high power consumption and slow speed.

– Invention of transistor which is a very small switch.– Photography.

• The computer scientists got the idea of having layers of chemicals on top of each other from photography to “print” the wires of circuit directly on a non-conducting base and this led to invention of Integrated Circuits (ICs) which packs thousands of transistors on one chip.

Page 8: Module 7

Electrical Switches

• We adopt the convention that:

Page 9: Module 7

Electrical Switches

• We adopt the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

Page 10: Module 7

Electrical Switches

• We adopt the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

Page 11: Module 7

Electrical Switches

• We adopt the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

• Think of a switch as box with three wires connected to it called in, out and control.

Page 12: Module 7

Electrical Switches

• We adopt the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

• Think of a switch as box with three wires connected to it called in, out and control.

• Our switches will come in two basic varieties:

Page 13: Module 7

Electrical Switches

• We adopt the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

• Think of a switch as box with three wires connected to it called in, out and control.

• Our switches will come in two basic varieties: – Normally open– Normally closed

Page 14: Module 7

An electronic switch in general

Page 15: Module 7

Normally Open Switch

• In a normally open switch, current can pass from in to out only when there is a signal at the control wire.

Page 16: Module 7

Normally Open Switch

• In a normally open switch, current can pass from in to out only when there is a signal at the control wire.

• That is when control is 1.

Page 17: Module 7

Normally Open Switch

• In a normally open switch, current can pass from in to out only when there is a signal at the control wire.

• That is when control is 1.• Otherwise the value of out is 0.

Page 18: Module 7

Normally Open Switch

Page 19: Module 7

Normally Closed Switch

• In a normally close switch, current can pass from in to out unless there is a signal at the control wire.

Page 20: Module 7

Normally Closed Switch

• In a normally close switch, current can pass from in to out unless there is a signal at the control wire.

• That is when control is 0.

Page 21: Module 7

Normally Closed Switch

• In a normally close switch, current can pass from in to out unless there is a signal at the control wire.

• That is when control is 0.• Otherwise the value of out is 0.

Page 22: Module 7

Normally Closed Switch

Page 23: Module 7

Logic

• From computer science perspective we are not concerned with electrical currents and voltages.

Page 24: Module 7

Logic

• From computer science perspective we are not concerned with electrical currents and voltages.

• We adopted the convention that:

Page 25: Module 7

Logic

• From computer science perspective we are not concerned with electrical currents and voltages.

• We adopted the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

Page 26: Module 7

Logic

• From computer science perspective we are not concerned with electrical currents and voltages.

• We adopted the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

Page 27: Module 7

Logic

• From computer science perspective we are not concerned with electrical currents and voltages.

• We adopted the convention that:– A high voltage in a wire is represented by the symbol 1.– Little or no voltage in a wire represented by symbol 0.

• With this convention a switch can be viewed as a logic operator.

• We can regard a switch as an operator that produces an output state depending only on the input states.

Page 28: Module 7

Logic

• Example: S = John and Merry are happy. P = John is happy. Q = Merry is happy. S = P AND Q .

Page 29: Module 7

Logic

• Example: S = John and Merry are happy. P = John is happy. Q = Merry is happy. S = P AND Q . • AND is a logical operator.• We refer to P and Q as components of logical

operator AND.

Page 30: Module 7

Logic

• Suppose we decide to interpret – 0 as false.– 1 as true.

Page 31: Module 7

Logic

• Suppose we decide to interpret – 0 as false.– 1 as true.

• Then the action of normally open switch is the same, under this interpretation, as that of AND logical operator.

Page 32: Module 7

Logic

• Suppose we decide to interpret – 0 as false.– 1 as true.

• Then the action of normally open switch is the same, under this interpretation, as that of AND logical operator.

• Logical AND operator is evaluated to true if and only if both of its operands are true.

Page 33: Module 7

Logic

Page 34: Module 7

• A normally open switch acts as an AND operator.

• We refer to it as an AND gate. It has three components:– two input lines.– one output line.

AND Gate

Page 35: Module 7

AND Gate

Page 36: Module 7

OR gate

• OR is another logical operator. We also have a gate for OR and we call it OR gate.

Page 37: Module 7

OR gate

• OR is another logical operator. We also have a gate for OR and we call it OR gate.

• An OR gate like AND gate has three components:– Two input lines– One output line

Page 38: Module 7

OR gate

• OR is another logical operator. We also have a gate for OR and we call it OR gate.

• An OR gate like AND gate has three components:– Two input lines– One output line

• A Logical OR operator evaluates as true if at least one of the operands are true.

Page 39: Module 7

OR gate

• OR is another logical operator. We also have a gate for OR and we call it OR gate.

• An OR gate like AND gate has three components:– Two input lines– One output line

• A Logical OR operator evaluates as true if at least one of the operands are true.

• In the same line, an OR gate has output 1 if at least one of the input lines are 1.

Page 40: Module 7

OR Gate

Page 41: Module 7

NOT Gate• We have logical operator NOT which reverses

the truth value of its statement. Ex: R = Peter is happy. then, NOT R = Peter is not happy.

Page 42: Module 7

NOT Gate• We have logical operator NOT which reverses the truth value

of its statement. Ex: R = Peter is happy. then, NOT R = Peter is not happy.• As two other logical operator we have a corresponding NOT

gate which has two components:– One input line– One output line

Page 43: Module 7

NOT gate

Page 44: Module 7

Logical Expressions

• We can use the three basic logical operators, AND, NOT and OR to build any logical expression by combining them.

EX: We have two named statements: P = Button A has been pushed. R = Button B has been pushed. We want to write an expression Q which is true when either both of the buttons have been pushed or none of them.

Page 45: Module 7

Example

P R Q

1 1 1

1 0 0

0 1 0

0 0 1

True = 1False = 0P = 1 means button A has been pushed.

Page 46: Module 7

Finding the appropriate Expression

P R PR P’ R’ P’R’ PR + P’R’

1 1 1 0 0 0 1

1 0 0 0 1 0 0

0 1 0 1 0 0 0

0 0 0 1 1 1 1

PR stands for P AND RP’ stands for NOT PM + N stands for M OR NThus, we have Q = PR + P’R’

Page 47: Module 7

Building a Logical Circuit

• Now we want to build the a circuit for our computer using AND, OR and NOT gates which corresponds to logical expression Q = PR + P’R’

• That is given inputs P and R (in 0 and 1) produces Q (in 0 and 1)

Page 48: Module 7

Big Picture

Page 49: Module 7

Step 1

Page 50: Module 7

Step 2

Page 51: Module 7

Step 2

Page 52: Module 7

Step 3

Page 53: Module 7

Step 3

Page 54: Module 7

Multiplexer

• A multi-way switch• A two way multiplexer has two input lines,

one select line and one output line.• The select line determines the current from

which input line should pass to output line.

Page 55: Module 7

Multiplexer

Page 56: Module 7

2-way MUXa b select output

1 1 1 1

1 1 0 1

1 0 1 1

1 0 0 0

0 1 1 0

0 1 0 1

0 0 1 0

0 0 0 0

Page 57: Module 7

2-way MUX

• Select input a if the select is 1.• Select input b if the select is 0.

Page 58: Module 7

2-way MUX

Page 59: Module 7

Decoder

• Decoder is a circuit which has a single input and multiple outputs. It has one or more select lines.

• Select lines determine the current of input line should pass to which of the output lines.

Page 60: Module 7

Decoder

Page 61: Module 7

Two-way Decoder

a s0 x1 x0

1 1 1 0

1 0 0 1

0 1 0 0

0 0 0 0