chapter 2 data manipulation yonsei university 1 st semester, 2015 sanghyun park

25
Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Upload: daniel-osborne

Post on 04-Jan-2016

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Chapter 2Data Manipulation

Yonsei University

1st Semester, 2015 Sanghyun Park

Page 2: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating With Other Devices

Page 3: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Computer Architecture The central processing unit, or ____ is a main part of the

computer

CPU consists of two parts: Arithmetic/logic unit: performs data __________ Control unit: __________ the machine’s activities

CPU contains cells, or ________, for temporary storage of information

For the purpose of transferring bit patterns, a machine’s CPU and main memory are connected by a collection of wires called a ____

Page 4: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

CPU and Main Memory

Page 5: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Stored Program Concept Program (instructions) is stored in _______ instead of

being built into the control unit as part of the machine

Adding values stored in memory

Page 6: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Machine Language (1/2) CPUs are designed to recognize __________ encoded

as bit patterns

This collection of instructions along with the encoding system is called the machine _________

An instruction expressed in this language is called a _________ instruction

Page 7: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Machine Language (2/2) Two philosophies of CPU design:

CPU should be designed to execute a _______ set of machine instructions: leads to a ______ instruction set computer (_____)

CPU should have the ability to execute a ______ number of complex instructions: leads to a ________ instruction set computer (_____)

Machine instructions can be classified as: Data transfer: LOAD, STORE, I/O instructions Arithmetic/Logic: arithmetic/logic operations, SHIFT, ROTATE Control: conditional or unconditional JUMP

Page 8: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An illustrative Machine Language (1/3)

The architecture of the machine for the discussion

Page 9: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An illustrative Machine Language (2/3)

The encoded version of a machine instruction consists of two parts: _______ (short for operation code) field: indicates which of the

elementary operations is requested by the instruction ____________: provides more detailed information about the

operation specified by the op-code

The entire machine language of the illustrative machine consists of only 12 basic instructions

Each of these instructions is encoded using a total of 16 bits, represented by ____ hexadecimal digits

Page 10: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An illustrative Machine Language (3/3)

Page 11: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Decoding the Instruction 35A7

Page 12: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An Encoded Version of the Instructions in Figure 2.2

Page 13: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Program Execution (1/2) A computer follows a program stored in its memory by

copying the instructions from memory into the control unit as needed

The order in which the instructions are fetched from memory corresponds to the order in which they are stored in the memory unless otherwise specified by a ______ instruction

Page 14: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Program Execution (2/2) Within the control unit are two special purpose registers:

The ______________ contains the address of the next instruction to be executed

The _________________ holds the instruction being executed

The control unit performs its job by continually repeating an algorithm through a three-step process known as the _____________

Page 15: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Machine Cycle

Page 16: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An Example of Program Execution (1/3)

Page 17: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An Example of Program Execution (2/3)

Page 18: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

An Example of Program Execution (3/3)

Page 19: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Arithmetic/Logic Operations

10011010 10011010 10011010

AND 11001001 OR 11001001 XOR 11001001________ ________ _________10001000 11011011 01010011

00001111 11110000 11111111

AND 10101010 OR 10101010 XOR 10101010________ ________ _________00001010 11111010

01010101

Page 20: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Rotating to the Right

Page 21: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Communicating with Other Devices (1/5)

The main memory and CPU form the _____ of a computer

Communication between a computer and other devices is normally handled through an intermediary device known as a ________

From there the controller connects via ______ to peripheral devices

Page 22: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Communicating with Other Devices (2/5)

These controllers are often small _________ within themselves, each with its own memory circuitry and CPU that performs a program

A controller _______ messages and data back and forth between forms compatible with the internal characteristics of the computer and those of the peripheral device

Page 23: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Communicating with Other Devices (3/5)

Page 24: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Communicating with Other Devices (4/5)

The CPU is able to communicate with the _________in the same manner that it communicates with main memory

I/O instructions _______ the various controllers by an _________ system similar to that of main memory

The set of addresses assigned to a controller are called a _____

An alternative is _________________ in which each controller is designed to respond to references to a unique set of main memory addresses

Page 25: Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park

Communicating with Other Devices (5/5)