+ All Categories
Home > Documents > Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic...

Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic...

Date post: 27-Dec-2015
Category:
Upload: derick-harvey
View: 215 times
Download: 0 times
Share this document with a friend
31
Chapters 4, 5, & 6 Quiz # 2 1
Transcript
Page 1: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

Chapters 4, 5, & 6

Quiz # 2

1

Page 2: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

2

Computers and Electricity

Gate A device that performs a basic operation onelectrical signalsCircuits Gates combined to perform morecomplicated tasks

Page 3: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

3

Computers and Electricity

How do we describe the behavior of gates and circuits?Boolean expressionsUses Boolean algebra, a mathematical notation for expressing two-valued logic Logic diagramsA graphical representation of a circuit; each gate has itsown symbolTruth tablesA table showing all possible input value and the associatedoutput values

Page 4: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

4

NOT Gate

A NOT gate accepts one input signal (0 or 1) and returns the opposite signal as output

Figure 4.1 Various representations of a NOT gate

Page 5: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

5

AND Gate

An AND gate accepts two input signals

If both are 1, the output is 1; otherwise, the output is 0

Figure 4.2 Various representations of an AND gate

Page 6: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

6

OR Gate

An OR gate accepts two input signals

If both are 0, the output is 0; otherwise,the output is 1

Figure 4.3 Various representations of a OR gate

Page 7: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

7

XOR Gate

Figure 4.4 Various representations of an XOR gate

An XOR gate accepts two input signals

If both are the same, the output is 0; otherwise,the output is 1

Page 8: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

NAND Gate

The NAND gate accepts two input signalsIf both are 1, the output is 0; otherwise,the output is 1

Figure 4.5 Various representations of a NAND gate

Page 9: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

9

NOR Gate

Figure 4.6 Various representations of a NOR gate

The NOR gate accepts two input signals

If both are 0, the output is 1; otherwise, the output is 0

Page 10: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

10

Combinational Circuits

Gates are combined into circuits by using the output of one gate as the input for another

Page 11: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

11

Combinational Circuits

Three inputs require eight rows to describe all possible input combinations

This same circuit using a Boolean expression is (AB + AC)

Page 12: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

12

Combinational Circuits

Consider the following Boolean expression A(B + C)

Does this truth table look familiar?

Compare it with previous table

Page 13: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

13

Combinational Circuits

Circuit equivalenceTwo circuits that produce the same output for

identical inputBoolean algebra allows us to apply provable

mathematical principles to help design circuits

A(B + C) = AB + BC (distributive law) so circuits must be equivalent

Page 14: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

14

Adders

The result of adding two binary digits could produce a carry value

Recall that 1 + 1 = 10 in base two

Half adderA circuit that computes

the sum of two bits and produces the correct carry bit

Truth table

Page 15: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

15

Adders

Circuit diagram representing a half adder

Boolean expressions

sum = A Bcarry = AB

Page 16: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

16

Adders

Full adder

A circuit that takes the carry-in value into account

Figure 4.10 A full adder

Page 17: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

17

Circuits as Memory

The design of this circuit guarantees that the two outputs X and Y are always complements of each other

The value of X at any point in time is considered to be the current state of the circuit

Therefore, if X is 1, the circuit is storing a 1; if X is 0, the circuit is storing a 0

Figure 4.12 An S-R latch

Page 18: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

Chapter 5 Goals

• Read an ad for a computer and understand the jargon

• Describe how a storage heirarchy is organized and accessed

• Name and describe different auxiliary storage devices

• Explain the concept of embedded systems and give examples from your own home

18

Page 19: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

Basic Concepts of Computer Hardware

• von Neumann Computer– Program & data are stored in the

same memory– Single program counter – one

instruction at a time

Input Devices CPU Output Devices

RAM

Input devices accept data and programs from the outside world Output devices provide results to the user Some devices are both input and output

Page 20: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

20

Arithmetic/Logic Unit

Performs basic arithmetic operations such as adding

Performs logical operations such as AND, OR, and NOT

Most modern ALUs have a small amount of special storage units called registers

Page 21: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

21

Input/Output Units

Input Unit A device through which data and programs fromthe outside world are entered into the computer;

Can you name three?Output unit A device through which results stored in thecomputer memory are made available to theoutside world

Can you name two?

Page 22: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

22

The Fetch-Execute Cycle

Fetch the next instruction

Decode the instruction

Get data if needed

Execute the instruction

Why is it called a cycle?

Page 23: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

23

RAM and ROM

Random Access Memory (RAM)Memory in which each location can be accessed and changed Read Only Memory (ROM)Memory in which each location can be accessed but not changedRAM is volatile, ROM is not

What does volatile mean?

Page 24: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

Magnetic Disks

Figure 5.5 The organization of a magnetic disk

Page 25: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

25

Synchronous processing

One approach to parallelism is to have multiple processors apply the same program to multiple data sets

Figure 5.8 Processors in a synchronous computing environment

Page 26: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

26

Embedded Systems

Embedded systems

Computers that are dedicated to perform

a narrow range of functions as part of a

larger system

Empty your pockets or backpacks.

How many embedded systems do you have?

Page 27: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

Chapter 6 Goals

• Understand what an algorithm and a program are

• How are algorithms developed• Understand the evolution of programming

languages

27

Page 28: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

28

Machine Language

Characteristics of machine language:– Every processor type has its own set

of specific machine instructions– The relationship between the processor and

the instructions it can carry out is completely integrated

– Each machine-language instruction does only one very low-level task

Page 29: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

29

Assembly Process

Page 30: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

30

Following an Algorithm

Algorithm for preparing a Hollandaise sauceIF concerned about cholesterol

Put butter substitute in a potELSE

Put butter in a potTurn on burnerPut pot on the burnerWHILE (NOT bubbling)

Leave pot on the burnerPut other ingredients in the blenderTurn on blenderWHILE (more in pot)

Pour contents into lender in slow steamTurn off blender

Page 31: Chapters 4, 5, & 6 Quiz # 2 1. 2 Computers and Electricity Gate A device that performs a basic operation on electrical signals Circuits Gates combined.

31

Testing

Test plan A document that specifies how many times and with what data the program must be run in order to thoroughly test itCode coverage An approach that designs test cases by looking atthe codeData coverage An approach that designs test cases by looking at the allowable data values


Recommended