digital fundamentals - helsingin...

75
Digital Fundamentals Functions of combinational logic

Upload: others

Post on 10-Mar-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Digital Fundamentals

Functions of

combinational logic

Page 2: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Objectives

•Distinguish between half-adders and full-adders

•Use full-adders to implement multibit parallel binary adders

•Explain the differences between ripple carry and look-ahead carry parallel adders

•Use the magnitude comparator to determine the relationship between two binary numbers and use cascaded comparators to handle the comparison of larger numbers

•Implement a basic binary decoder

•Use BCD-to-7-segment decoders in display systems

•Apply a decimal-to-BCD priority encoder in a simple keyboard application

•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 2

•Convert from binary to Gray code, and Gray code to binary by using logic devices

•Apply multiplexers in data selection, multiplexed displays, logic function generation, and simple communications systems

•Use decoders as demultiplexers

•Explain the meaning of parity

•Use parity generators and checkers to detect bit errors in digital systems

•Implement a simple data communications system

•Identify glitches, common bugs in digital systems

•Describe basically how SPLDs are programmed

Page 3: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Half-adder

Functions of Combinational Logic 3

Page 4: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Full-adder

Functions of Combinational Logic 4

Page 5: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Full-adder implementation with half-adders

Functions of Combinational Logic 5

Page 6: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 6

Page 7: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Parallel binary adders

Functions of Combinational Logic 7

Page 8: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 8

Page 9: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 9

Four-bit parallel adders

Page 10: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 10

Page 11: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Examples of 4-bit paralleladders in the IC form

Functions of Combinational Logic 11Specs for the 74LS283

Page 12: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Adder expansion

Functions of Combinational Logic 12

Page 13: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 13

Page 14: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Application example – voting system

Functions of Combinational Logic 14

Page 15: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Comparators -equality

Functions of Combinational Logic 15

Page 16: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 16

Page 17: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Inequality

Example 6-6Determine the states of the three outputs withthe following inputs:

Functions of Combinational Logic 17

Solution: A=0110, B=0011. A>B is HIGH,and others outputs LOW.

Page 18: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

A 4-bit magnitude comparator – 74HC85

Functions of Combinational Logic 18

Page 19: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Example 6-7Use 74HC85 comparators to compare the magnitudes of two 8-bit numbers. Show the comparators withproper interconnections.

Solution:

Functions of Combinational Logic 19

Page 20: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 20

Page 21: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Decoders – basic binary decoder

Functions of Combinational Logic 21

determines if input=1001 and sets the output to HIGH level

accordingly

Page 22: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 22

Page 23: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

4-bit decoder

Decoding functions and the truth table for a 4-line-to-16-line (1-of-16) decoder with active-LOW outputs

Functions of Combinational Logic 23

Page 24: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Logic symbol for 4-line-to-16-linedecoder

Functions of Combinational Logic 24

Page 25: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74HC154 IC decoder

Functions of Combinational Logic 25

Page 26: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 26

Page 27: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Application example

Functions of Combinational Logic 27

Page 28: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

BCD-to-decimal decoder

Functions of Combinational Logic 28

Page 29: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 29

Page 30: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

BCD-to-7-segment decoder

Functions of Combinational Logic 30

Page 31: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74LS47 BCD-to-7-segment decoder/driver

Functions of Combinational Logic 31

Page 32: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 32

Page 33: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Encoders – decimal-to-BCD encoder

Functions of Combinational Logic 33

Page 34: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74HC147 decimal-to-BCD priority encoderHPRI means highest value input has priority

Functions of Combinational Logic 34

Page 35: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74F148 8-line-to-3-line encoder

Functions of Combinational Logic 35

Page 36: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

16-line-to-4-line encoder using a couple of 74F148 ICs and external logic

Functions of Combinational Logic 36

Page 37: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 37

Page 38: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Application example – keyboard encoder

Functions of Combinational Logic 38

Page 39: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Code converters – BCD-to-binary conversion

Functions of Combinational Logic 39

Page 40: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 40

Page 41: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Binary-to-Gray conversion

Gray-to-binary conversion

Functions of Combinational Logic 41

Binary-to-Gray conversion

Page 42: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 42

Page 43: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Multiplexers (data selectors)

Functions of Combinational Logic 43

1-of-4 data selector/multiplexer

Page 44: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 44

Page 45: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74HC157A quaruple 2-input data selector/multiplexer

Functions of Combinational Logic 45

Page 46: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74LS151 8-input data selector/multiplexer

Functions of Combinational Logic 46

Page 47: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 47

Page 48: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Application example – 7-segment displaymultiplexer

Functions of Combinational Logic 48

Page 49: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 49

Page 50: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 50

Page 51: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 51

Page 52: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Demultiplexers

1-line-to-4-line demultiplexer

Functions of Combinational Logic 52

Page 53: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 53

Page 54: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74HC164 decoder used as ademultiplexer

Functions of Combinational Logic 54

Page 55: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Parity generators/checkers

Basic parity logic

Functions of Combinational Logic 55

Page 56: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

74LS280 9-bit parity generator/checker

Functions of Combinational Logic 56

Page 57: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Data transmission system witherror detection

Functions of Combinational Logic 57

Page 58: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Troubleshooting - glitch

Functions of Combinational Logic 58

Page 59: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 59

Page 60: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Elimination of glitches with strobing

THINK! How does it work?

Functions of Combinational Logic 60

Page 61: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 61

Page 62: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Programmable logic

Functions of Combinational Logic 62

•Computer•software•programmer

Page 63: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

SPLD conventional programming sequence

Functions of Combinational Logic 63

Page 64: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 64

Page 65: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

ISP – in system programmable SPLDs

JTAG

Functions of Combinational Logic 65

Page 66: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 66

Page 67: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 67

How this can be done?

Page 68: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 68

Page 69: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Ts

Functions of Combinational Logic 69

State diagram

Page 70: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 70

Page 71: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 71

Page 72: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 72

Page 73: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Summary

Functions of Combinational Logic 73

Page 74: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

IC types

Functions of Combinational Logic 74

Page 75: Digital Fundamentals - Helsingin yliopistoelectronics.physics.helsinki.fi/wp-content/uploads/2012/...•Convert from binary to Gray code, and Gray code to binary by using logic devices

Functions of Combinational Logic 75