digital systems - baltimore polytechnic institute...2014/11/04  · key trends ive come up with a...

73
Digital Systems We live in a digital world and I am a digital girl.

Upload: others

Post on 24-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital Systems

“We live in a digital world and I am a digital girl.”

Page 2: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

REMINDER: students are responsible for all concepts referred to in student learn sheets.

Page 3: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Lecture Overview

Basic electricity 1

Binary number system

Computer trends 2

Analog and digital technology 3

4

Digital Logic 5

Page 4: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Key trends

“I’ve come up with a set of rules that describe our reactions to technologies:

1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.

2. Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.

3. Anything invented after you’re thirty-five is against the natural order of things.”

– Douglas Adams, author of The Hitchhiker’s Guide to the Galaxy

Page 5: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Electricity vs. Electronics

Electricity

– using electrons to transferring energy

Electronics

– using electrical signals to convert and process information

Page 6: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Electricity Vocabulary

• Circuit

• Voltage, current

• Resistor

• Switch

• Electromechanical relay

• Capacitor

Pictoral

Schematic

Page 7: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Vocabulary

• Circuit

• Voltage, current (DC/AC)

• Resistor

• Switch

• Electromechanical relay

• Capacitor

http://en.wikipedia.org/wiki/War_of_currents

Electricity

Page 8: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Vocabulary

• Circuit

• Voltage, current

• Resistor (Ohm’s, Watt’s laws)

• Switch

• Electromechanical relay

• Capacitor

Electricity

Page 9: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Vocabulary

• Circuit

• Voltage, current

• Resistor

• Switch

• Electromechanical relay

• Capacitor

Electricity

Page 10: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Vocabulary

• Circuit

• Voltage, current

• Resistor

• Switch

• Electromechanical relay

– Electromagnetism

• Capacitor

Electricity

Page 11: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Vocabulary

• Circuit

• Voltage, current

• Resistor

• Switch

• Electromechanical relay

• Capacitor

Electricity

Page 12: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Robot Car Schematic

Page 13: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Key trends • Mechanical Relay (1835)

– Joseph Henry, Samuel Morse

– overcame limited range of telegraph signal by allowing repetition

• Vacuum Tube (1904) – Inspired by the light bulb and first patented by Edison.

– Used as an amplifier, AC/DC converter, switch

• Transistor (1948) – Fundamental building block of modern electronics

– Solid state – electrons confined to solid material (e.g., no mechanical devices)

– Amplify and switch electronic signals and power

Page 14: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Key trends • Integrated circuit (1958)

– Large number of tiny transistors integrated on single chip

– Printed as a unit (photolithography), mass produced, minimal material

– Moore’s Law

• Microprocessor (1971) – Incorporates the functions of a CPU on a single IC

• Programmable; has internal memory

• Input, processing, output

– PCs use many for different functions

– Control in embedded systems

Page 15: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

What’s the big deal?

• Why ICs?

1. Reliability – less prone to failure (solid state)

2. Size – single chips replaced entire boards

3. Speed – electricity has shorter distance to travel

4. Efficiency – smaller = less electrical power = less heat

5. Cost – mass production

Page 16: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Embedded systems • > 90% of world’s microprocessors are inside common

household and electronic devices.

• A microprocessor used as a component of a larger system is an embedded system.

• Examples: – Electronic thermostats

– Traffic lights

– Wristwatches

– Calculators

– Cameras

– Cars

– Ovens

– Etc.

• Almost anything powered by electricity…

Page 17: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Key trends

• Babbage’s analytical engine

• Atanasoff-Berry-Computer (ABC) and IBM

• Zuse’s Z1 and the Nazis

• Turing’s Colossus

• Mark I

• ENIAC

• Jack Kilby and the IC

• Intel 4004

• Personal Computers

• Integrated circuit

• Microprocessor

Student G-Doc

Page 18: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

What everyday product is likely the biggest user of computers?

Car may have over 50 computers

Page 19: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital Systems

Part 10

“We live in a digital world and I am a digital girl.”

Page 20: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Electricity vs. Electronics

Electricity

– using electrons to transferring energy

Electronics

– using electrical signals to convert and process information

Page 21: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

• Phonograph record—wiggles in grooves to represent sound oscillations

• Mercury thermometers

• Vinyl records

• Slide rule—an instrument which does

multiplication by adding lengths which correspond to the logarithms of numbers.

Analog Devices

Page 22: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Analog processes

What do these items have in common?

1. Continuous signal.

2. Has infinite resolution (theoretically).

3. Uses some property of the medium to convey the signal information.

4. Noise.

Page 23: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Analog processes

• How tall are you?

• How many M&M’s have you ever eaten?

• What color is the car you most ride in?

• How many shades of red can you see?

• What’s the temperature outside?

• What’s your body temperature?

• What time is it?

Page 24: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Example of Analog Signals

• An analog signal can be any time-varying signal.

• Minimum and maximum values can be either positive or negative.

• They can be periodic (repeating) or non-periodic.

• Sine waves and square waves are two common analog signals.

• Note that this square wave is not a digital signal because its

minimum value is negative.

24

0 volts

Sine Wave Square Wave (not digital)

Random-Periodic

Page 25: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital processes What do these items have in common?

1. Discrete bands of analog signal.

2. Easier to get a device to switch into a number of known states.

3. No noise.

Page 26: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital processes

• Are you over 6’ tall?

• Are you an only child?

• Is the car you most ride in blue?

• Is it above freezing outside?

• Is it before 11am?

• Any question can be answered as a series of yes or no questions.

Page 27: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Logic Levels Before examining digital signals, we must define logic levels.

A logic level is a voltage level that represents a defined

digital state.

Logic HIGH: The higher of two voltages, typically 5 volts

Logic LOW: The lower of two voltages, typically 0 volts

27

5.0 v

2.0 v

0.8 v

0.0 v Logic Low

Logic High

Invalid Logic Level

Logic Level Voltage True/False On/Off 0/1

HIGH 5 volts True On 1

LOW 0 volts False Off 0

Page 28: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

ADC

• The world happens in analog

• Analog data (measured)

• ADC = analog to digital converter

– Digital data (counted)

– ADC = digitization = sampling

– Sample rate – time interval of samples (x-axis)

– Sample precision – number of discrete digital values that can be represented (y-axis)

Page 29: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Conversion • CD music is encoded as 44.1

kHz, 16 bit audio.

– The music is sampled ('sliced‘) 44,100 times a second.

– 16 bit means the precision (height range) is 65,536 different values for each sample.

• The finer the grid, the better the digital representation.

[44,100 samples/channel/second x 2 bytes/sample x 2 channels x 74 minutes x 60 seconds/minute = 783,216,000 bytes]

Page 30: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

To recreate an analog signal, need good digitization.

Page 31: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Computer components

PROCESSOR

STORAGE

OUTPUT INPUT

Page 32: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Bridging the Digital Divide

Binary-to-Decimal Conversion

Decimal-to-Binary

Conversion

32

Page 33: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Decimal vs. Binary

• Decimal number system – base 10

– 10 digits possible:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

– Placeholders are powers of 10

– 10 possible digits:

… 107 106 105 104 103 102 101 100

Page 34: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Decimal vs. Binary

• Binary number system (bin) – base 2

– 2 digits possible:

0, 1

– Placeholders are powers of 2

– 10 possible digits:

… 27 26 25 24 23 22 21 20

Page 35: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Decimal ‒to‒ Binary Conversion

The Process : Successive Division

a) Divide the Decimal Number by 2; the remainder is the LSB of

Binary Number .

b) If the quotation is zero, the conversion is complete; else repeat

step (a) using the quotation as the Decimal Number. The new

remainder is the next most significant bit of the Binary Number.

Example:

Convert the decimal number 610 into its binary equivalent.

Bit tSignifican Most 1 r 0 1 2

1 r 1 3 2

Bit tSignifican Least 0 r 3 6 2

610 = 1102

35

Page 36: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Dec → Binary : Example #1 Example:

Convert the decimal number 2610 into its binary equivalent.

36

Page 37: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Dec → Binary : Example #1 Example:

Convert the decimal number 2610 into its binary equivalent.

Solution:

LSB 0 r 13 26 2

MSB 1 r 0 1 2

1 r 6 13 2

0 r 3 6 2

1 r 1 3 2

2610 = 110102

37

Page 38: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Dec → Binary : Example #2 Example:

Convert the decimal number 4110 into its binary equivalent.

38

Page 39: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Dec → Binary : Example #2 Example:

Convert the decimal number 4110 into its binary equivalent.

Solution:

LSB 1 r 20 41 2

0 r 10 20 2

0 r 5 10 2

1 r 2 5 2

4110 = 1010012

MSB 1 r 0 1 2

0 r 1 2 2

39

Page 40: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary ‒to‒ Decimal Process

The Process : Weighted Multiplication

a) Multiply each bit of the Binary Number by it corresponding bit-

weighting factor (i.e. Bit-0→20=1; Bit-1→21=2; Bit-2→22=4; etc).

b) Sum up all the products in step (a) to get the Decimal Number.

Example:

Convert the decimal number 01102 into its decimal equivalent.

0110 2 = 6 10

0 1 1 0

23 22 21 20

8 4 2 1

0 + 4 + 2 + 0 = 610

Bit-Weighting Factors

40

Page 41: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary → Dec : Example #1 Example:

Convert the binary number 100102 into its decimal equivalent.

41

Page 42: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary → Dec : Example #1 Example:

Convert the binary number 100102 into its decimal equivalent.

100102 = 1810

1 0 0 1 0

24 23 22 21 20

16 8 4 2 1

16 + 0 + 0 + 2 + 0 = 1810

Solution:

42

Page 43: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary number system • Let’s count:

1

2

3

4

5

6

7

8

9

10

Page 44: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

There are 10 types of people in the world:

Those who understand binary and those who don’t.

Page 45: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary number system

• How many bits are in a byte?

• How many binary numbers in a bit?

• How many binary numbers in a byte?

Page 46: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

ASCII vs. Unicode

Page 47: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Other number systems

• Binary (bin) – 0, 1

– on/off

• Octal (oct) – 0, 1, 2, 3, 4, 5, 6, 7

– 1/3 length of binary #

– 3 bits into 1 octal digit

• Hexadecimal (hex) – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

– ¼ length of binary #

– 16 bits into 1 hexadecimal digit

• Decimal – 10 not a power of 2

• All capable of representing any number

• Conversions between systems possible without any loss of value

Page 48: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary to Octal

• Group bits in binary # in groups of 3, then convert each group:

1 1 1 0 0 1 0 1

0 1 1 1 0 0 1 0 1

3 4 5

111001012 = 3458

Page 49: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary to Hexadecimal

• Group bits in binary # in groups of 4, then convert each group:

1 1 1 0 0 1 0 1

1 1 1 0 0 1 0 1

E 5

111001012 = E516

Page 50: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Binary to Hex

• A byte is tough to represent with oct.

• Easier with hex.

1 0 0 0 1 0 0 1

Page 51: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital Systems

Part 11

“We live in a digital world and I am a digital girl.”

Page 52: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Basis for digital computers

• George Boole (1854) linked arithmetic, logic, bin – showed how bin simplifies complex logic probs.

• The true-false nature of Boolean logic makes it compatible with binary logic used in digital computers.

• Electronic circuits can produce Boolean logic operations – Claude Shannon (1938)

• Logic circuits are called gates.

– NOT

– AND

– OR

Page 53: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Logic Gates

• Go over NOT, AND, OR, NOR, NAND, XOR here.

• Gate diagram, truth table, sentence symbol.

BOARD

Page 54: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Logic Gates NOT

The simplest possible gate is called an "inverter," or a NOT gate.

One bit as input produces its opposite as output.

The symbol for a NOT gate in circuit diagrams is shown below.

The logic table, or truth table for the NOT gate shows input and output.

A BOARD

Page 55: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Logic Gates AND

The AND gate has the following symbol and logic table.

Two or more input bits produce one output bit.

Both inputs must be true (1) for the output to be true.

Otherwise the output is false (0).

A.B BOARD

Page 56: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Logic Gates OR

• The OR gate has the following symbol and logic table. • Two or more input bits produce one output bit. • Either inputs must be true (1) for the output to be true.

A+B BOARD

Page 57: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

NAND is a NOT and

an AND gate.

A B Q

0 0 0

0 1 0

1 0 0

1 1 1

Not

A B Q'

0 0 1

0 1 1

1 0 1

1 1 0

Page 58: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Tying inputs together

• What do you suppose the truth table looks

like for this guy?

Page 59: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital electronics make logic decisions (use Venn diagrams, truth tables, logic circuits)

1. You have a fire alarm installed in your house which will sound if it senses heat or smoke.

2. You have a buzzer in your car that sounds when your keys are in the ignition and the door is open, or if your seat belt is not fastened.

3. People can vote if they are a citizen, are 18 and are registered.

4. George is elected chairman only if he gets majority of 3 votes.

5. You can go to the R movie if you have $10 and if you are over 18 or accompanied by a parent.

BOARD

Page 60: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Truth Tables & Logic Expressions Given design specifications (i.e., word problem) create a Truth Table

and Write SOP logic Expression

X Y OUT

0 0 0

0 1 0

1 0 1

1 1 0

EQUALS EQUALS

Design Specifications

Truth Table

Y XOUT

Logic Expression

EQUALS End

Product

Page 61: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

B. Constructing A Truth Table (Example 1)

• A truth table shows how a logic design’s output

respond to ALL combinations of possible inputs.

• A logic design with N inputs will have 2N input

combinations.

Input 1 Input 2 Output

2 Inputs Input 1 Input 2 Input 3 Output

3 Inputs

0

0

0

1

0

1

0

1

0

0

1

1

0

0

0

0

1

1

1

1

0

0

1

1

0

0

1

1

0

1

0

1

0

1

0

1

0

1

1

0

0

0

1

1

All possibilities (This is known for all Truth Tables)

66

Page 62: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

1. Construct a Truth Table-2 Inputs (example #2)

Create a truth table to represent this situation:

I want to pick all girls in the class who have glasses.

The “truth” or how you get “picked” is to be a girl AND to

have glasses.

0

0

0

1

Step 1) How many Inputs? = 2 (Girls & Glasses)

Step 2) 2N = 22 = 4 I/P combinations Step 3) Create Truth Table with 3 Columns

Input 1 GIRL

Input 2 GLASSES

Output

Girls with Glasses

Step 4) Label Input 1 & Input 2 Step 5) Label Output Step 6) Fill in 0s & 1s --- All possible solutions

0 0

0 1

1 0

1 1 Step 7) Fill in Outputs * This is an “AND” problem * We only care when Girl “AND” Glasses are True or “1”

67

Page 63: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Combine gates.

• Gates can (obviously, now) be combined.

• The output of one gate can become the input of another.

• Try to determine the logic sentences and tables for these circuits.

Page 64: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Construct the logic sentences and tables for these circuits.

Page 65: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

3. Control systems: e.g., car will start only if doors are locked, seat belts are on, key is turned D S K I 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

How could we state the conditions that generate the desired output?

Page 66: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

3. Control systems: e.g., car will start only if doors are locked, seat belts are on, key is turned D S K I 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

I = D AND S AND K

How could we state the conditions that generate the desired output?

Can you draw the diagram for the above logic statement?

Page 67: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Digital electronics make logic

decisions.

• A fire alarm sounds if it senses heat or smoke.

• You can go to the movie if you have $10 and if you can find a ride to

the theater.

• People can vote if they are a citizen, are 18 and are registered.

Page 68: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

How does a computer handle this?

• A fire alarm sounds if it senses heat or smoke.

– Two conditions - heat OR smoke.

– One action - sound the alarm

heat smoke alarm

no no no

yes no yes

no yes yes

yes yes yes

heat smoke alarm

0 0 0

1 0 1

0 1 1

1 1 1

yes = 1

no = 0

Page 69: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Truth table for going to a movie.

• You can go to the movie if you have $10 and you have a ride.

– Two conditions - $10 AND ride.

– One action – see movie

Have $10 Have ride Go movie

no no no

yes no no

no yes no

yes yes yes

Hav $10 Have ride Go movie

0 0 0

1 0 0

0 1 0

1 1 1

Page 70: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

Make a truth table for voting. • People can vote if they are a citizen, are 18 and are registered.

Citizen

18 years

old

Registered

to vote Vote

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

Page 71: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

All computations...

• The most sophisticated computer can be made with NAND gates from Radio Shack.

• Need millions of them.

Page 72: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

BOARD

Page 73: Digital Systems - Baltimore Polytechnic Institute...2014/11/04  · Key trends Ive come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the

References

Lectures and notes from Michael Karweit, JHU

Mr. Mick Scott, Instructor, EI

Beekman and Beekman – Digital Planet: Tomorrow’s Technology and You

Shelly – Discovering Computers 2011

http://www.robotroom.com/NumberSystems.html

Wikipedia

Background knowledge of basic electronics

http://logic.ly/demo/

www.jhu.edu/~virtlab/virtlab.html