22
Digital Logic Circuits Digital Logic Circuits (Part 1) (Part 1) Computer Architecture Computer Architecture (Fall 2006) (Fall 2006)

Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Embed Size (px)

Citation preview

Page 1: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Digital Logic CircuitsDigital Logic Circuits(Part 1)(Part 1)

Digital Logic CircuitsDigital Logic Circuits(Part 1)(Part 1)

Computer ArchitectureComputer Architecture(Fall 2006)(Fall 2006)

Page 2: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Electronics for Boolean Algebra

• Interconnected set of Transistors called Circuits– Transistors are Electronic Switches

• Turn “On” or “Off” – Depending on input voltages

– Used to implement Boolean expressions Transistor

A

B

C

(A•B)+C

Page 3: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Logic Gates

• Developing large circuits is complex– Drawing many transistors is cumbersome– Makes the circuit diagram unwieldy

• Hard to illustrate and comprehend

• Solution: Logic Gates– Abstract notation for common logic circuits

• Functionally similar to set of transistors

– Simpler to develop and use

Page 4: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Basic Gates

• Corresponding to basic operations in Boolean Algebra– NOT Gate

– AND Gate

– OR Gate

A A

A

B

A+B

A

B

A•BInput

Output

Data always flows in a unidirectional manner from inputs to outputs of the logic gates!

Page 5: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Commonly used Gates

• Other commonly used gates– NAND

– NOR

– XOR

A

B

(A•B)

A

B

(A+B)

A

B

AB

The circle (or bubble) indicates inversion or NOT operation. You may add this

circle (or bubble) at the output or input of any gate!

Page 6: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Equations to Circuits

• Convert Boolean equations to Logic Circuits• Logic circuits drawn on paper are often also called

Schematics

– Straightforward process• Convert each operator to a Logic Gate

– Suitably connect inputs and output• Pay attention to crossing lines versus connected lines

• Label all inputs and outputs

A

B AA

No relationship between A & B.

These two lines/wires are the same!

AB

No relationship between A & B. This

is preferred!

Page 7: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Example 1

• A•B•C•D– (A•B)•(C•D)

A

B

A•B

C

D C•D

A•B•C•DABCD

A•B•C•D

Standard Version (With 2-input Gates) Shortcut Version (n-Input Gates)

There are a few aspects to consider when using the shortcut version:

1. All gates must be the same2. Input to output transformation must be

straightforward

Page 8: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Example 2

• Convert English to logic circuit– Output O is

• A, if C=1 • B, if C=0

• Solution– O = (A•C)+(B•C)

A

B

C

A•C

B•C

O=(A•C)+(B•C)

Shortcut for NOT operation.

Page 9: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Design & Verification• The graphical representation of logic circuits is called

a schematic.• These days schematics are developed and verified

using software– Modern software provide “virtual” components for

developing schematics• Components include logic gates, ICs, and other electronic

devices including both digital and analog devices– Software ease interconnection between components– Logic circuits are verified using simulation

• There is a lot that goes into the simulations and it is an active area of research and development.

• There are a wide variety of schematic software available from various companies– In this course we will use a software packaged called

MultiSIM from National Instruments Inc.

Page 10: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

MultiSIM• MultiSIM

– Feature roundup:• Is a popular, industry standard, software from National

Instruments Inc. • It is widely used for prototyping digital (and analog) circuits. • The software provides many virtual components for developing

schematics• Include simulation engine and graphical interface for verification• Schematics can be used to directly synthesize Printed Circuit

Boards (PCBs) for mounting the physical integrated circuits and devices.

– In this course we will be using MultiSIM to:• Design logic circuits • Verify their correct operation through simulation.

– The process will enable you to obtain a good understanding of logic circuits and their operational characteristics.

– Note that MultiSIM is installed on all SEAS computers. • But SEAS does not have student licenses for the software

Page 11: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Starting MultiSIM• Start MultiSIM via the Windows menu options shown

below:– Start→ EAS Applications → Engineering Apps →

MultiSIM 9 → MultiSIM 9• It does take about 10-15 seconds for the software to startup (and

it looks like nothing is happening)

Page 12: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Using MultiSIM

This area (with a grid) is where you will develop your schematics.

Click the “Misc Digital” iconto select a logic gate to be placed.

(All of these buttons pretty much take you to the same set of options)

Use these buttons to Start/Stop the simulation or

pause it after you have completed design of a

schematic.

Page 13: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Selecting Component to PlaceOn clicking this icon you will be presented in the dialog box shown below. Select component to place on your schematic from this dialog box.

Choose appropriate “Group” and “Family” settings to view corresponding subset of components in the adjacent “Component:” menu

Choose appropriate “Component” to place in schematic from this list and then click the button.

Preview of the component is shown here.

Page 14: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Placing & Connecting Components• To place a component in the schematic

– Selected a component as described in the previous slide

• Refer to the ComponentList.doc file off Blackboard for a list of commonly used components and their locations in MultiSIM

– Press the button• The selected component will tag along with your mouse

cursor• Click (left mouse button) at the appropriate location in the

schematic area (gridded area as shown below) to place a component

Page 15: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Connecting Components• Once you have placed two components on the

schematic you can connect pins of the components by– However over a pin of a component– The mouse cursor will turn into a cross hair– Click on a pin and move the mouse to the next pin (or

wire) to connect components• Don’t drag the mouse with the left-mouse-button depressed!

Release the mouse button and move the mouse

Page 16: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Simulation

• Once you have completed your schematic– You must verify correct operation using

simulation– Click simulate button ( ) to start simulation– You may toggle status of switches using

spacebar

– For dip switches you need to use number (1,2,…,9) keys to toggle their status

Page 17: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

General Selection Logic

• Develop a circuit to select 1 of the given 5 inputs– Let the inputs be A, B,

C, D, & E– Assign unique

combinations of 1s and 0s to identify each Input

• Given n inputs you need k bits such that 2k>=n

• In this case n=5 and therefore k=3

• Let selection variables be s1, s2, and s3

S1 S2 S3 O

0 0 0 A

0 0 1 B

0 1 0 C

0 1 1 D

1 0 0 E

Page 18: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

General Selection (Cont.)• Boolean equation for the example:

– O=(A•S1•S2•S3)+(B•S1•S2•S3)+(C•S1•S2•S3)+(D•S1•S2•S3)+

(E•S1•S2•S3)

S1 S2 S3 O

0 0 0 A

0 0 1 B

0 1 0 C

0 1 1 D

1 0 0 E

Page 19: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Logic Circuit for Selector

S3S2S1

C

A

B

D

E

O

Page 20: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

Multiplexer (Mux)

• Select 1 given N circuits are called Multiplexers– Have N inputs– K selection lines

• Such that 2k >= N

– 1 output line

N x K

Multiplexer

• • •

• •

•N inputs

K select lines

Page 21: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

De-Multiplexer (DeMux)

• Move 1 input bit to selected output line– 1 Input– N Output lines– K selection lines

• Such that 2K>=N

N x K

De-Multiplexer

• • •

• •

•1 Input

K select lines

N Outputs

Page 22: Digital Logic Circuits (Part 1) Computer Architecture (Fall 2006)

De-Multiplexer Logic Circuit

• 1 X 4 De-Multiplexer

S2S1

A

A•S1•S2

A•S1•S2

A•S1•S2

A•S1•S2