Data Manipulation. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

Similar documents
Chapter 2: Data Manipulation

Chapter 2: Data Manipulation

Chapter 2: Data Manipulation. Copyright 2015 Pearson Education, Inc.

Chapter 2 Data Manipulation

Computer Architecture and Data Manipulation. Von Neumann Architecture

Figure 2.1 CPU and main memory connected via a bus. Computer Architecture 2014/10/12. Chapter 2: Data Manipulation

Chapter 2: Data Manipulation

Chapter 2: Data Manipulation

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

Introduction to Computer Science Lecture 2: Data Manipulation

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

Chapter 5: Computer Systems Organization

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Data Manipulation. *2.4 Arithmetic/Logic. Instructions. Logic Operations Rotation and Shift Operations Arithmetic Operations. *2.5 Communicating with

CS 101, Mock Computer Architecture

CS1004: Intro to CS in Java, Spring 2005

Computer Organization

Introduction to Computer Science Lesson 5

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CMPUT101 Introduction to Computing - Summer 2002

The Von Neumann Architecture Odds and Ends. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

Computers Are Your Future

CS 24: INTRODUCTION TO. Spring 2018 Lecture 3 COMPUTING SYSTEMS

Introduction to Computers & Programming

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

Chapter 4 The Von Neumann Model

Chapter One. Introduction to Computer System

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

COS 140: Foundations of Computer Science

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

Introduction to Computer Science. Homework 1

Computer Architecture (part 2)

Chapter 4 The Von Neumann Model

Computer Architecture 2/26/01 Lecture #

Chapter 4 The Von Neumann Model

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison

Chapter 1 : Introduction

Computer Organization

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

5 Computer Organization

Components of a personal computer

Dec Hex Bin ORG ; ZERO. Introduction To Computing

LC-3 Architecture. (Ch4 ish material)

Microprocessors and Microcontrollers. Assignment 1:

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

CMPUT101 Introduction to Computing - Summer 2002

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

Computer Architecture and Assembly Language. Spring

CISC / RISC. Complex / Reduced Instruction Set Computers

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

16.1. Unit 16. Computer Organization Design of a Simple Processor

5 Computer Organization

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Homeschool Enrichment. The System Unit: Processing & Memory

EE 3170 Microcontroller Applications

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

FACTFILE: GCE DIGITAL TECHNOLOGY

Overview of Computer Organization. Chapter 1 S. Dandamudi

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Full file at

3.1 Description of Microprocessor. 3.2 History of Microprocessor

ECE 486/586. Computer Architecture. Lecture # 7

COMPUTER ORGANIZATION & ARCHITECTURE

Overview of Computer Organization. Outline

Week 1. Introduction to Microcomputers and Microprocessors, Computer Codes, Programming, and Operating Systems

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Microcomputer Architecture and Programming

Topic Notes: MIPS Instruction Set Architecture

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Von Neumann Architecture

Computer Organization and Technology Processor and System Structures

Chapter 2 Logic Gates and Introduction to Computer Architecture

Computer Architecture Dr. Charles Kim Howard University

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Segment 1A. Introduction to Microcomputer and Microprocessor

Processing Unit CS206T

SAE5C Computer Organization and Architecture. Unit : I - V

Introduction to Computers - Chapter 4

The Central Processing Unit

Introduction. Computer System Organization. Languages, Levels, Virtual Machines. A multilevel machine. Sarjana Magister Program

EC-801 Advanced Computer Architecture

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Introduction to CPU Design

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Computer organization and architecture UNIT-I 2 MARKS

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Components of a Computer System

Computer Organization CS 206 T Lec# 2: Instruction Sets

Transcription:

Data Manipulation Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating with Other Devices C.E., NCU, Taiwan 2

Computer Architecture Central Processing Unit (CPU) or processor arithmetic/logic Unit (ALU): perform data manipulation control Unit: coordinate the machine s activities registers: temporary storage of information general purpose registers a temporary holding places for data being manipulated by the CPU Inputs to the ALU circuitry Results produced by ALU circuitry special-purpose registers cache Memory Bus Motherboard C.E., NCU, Taiwan 3

Cache Memory Cache memory keep a copy of that portion of main memory that is of current interest register cache memory CPU can execute more rapidly update main memory if data change Main memory: data that will be needed in the near future Mass storage: data that will likely not be needed in the near future C.E., NCU, Taiwan 4

CPU & Main Memory C.E., NCU, Taiwan 5

Adding Values Stored in Memory C.E., NCU, Taiwan 6

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating with Other Devices C.E., NCU, Taiwan 7

Machine Language Machine instruction = an instruction coded as a bit pattern directly recognizable by the CPU Machine language = the set of all instructions recognized by a machine Reduced Instruction Set Computing (RISC) CPU executes minimal set of machine instructions few, simple, efficient, and fast instructions example: PowerPC from Apple/IBM/Motorola Complex Instruction Set Computing (CISC) CPU executes a large number of complex instructions, even though man of them are technically redundant the more complex CPU is easier to program example: Pentium from Intel C.E., NCU, Taiwan 8

Machine Instruction Types Data Transfer Copy data between CPU and main memory LOAD : fill a general-purpose register with the contents of a memory cell STORE : transfer the contents of a register to a memory cell I/O instructions : communicating with devices outside the CPU-main memory context (printers, keyboards, monitors, disk drives, etc.) C.E., NCU, Taiwan 9

Machine Instruction Types Arithmetic/Logic Use existing data values to compute a new data value Tell the control unit to request an activity within the arithmetic/logic unit AND, OR, and XOR SHIFT : the bits that fall off the end of the register are discarded ROTATE : fill the holes left at the other end C.E., NCU, Taiwan 10

Machine Instruction Types Control Direct the execution of the program rather than the manipulation of data JUMP unconditional jumps conditional jumps Dividing Values Stored in Memory C.E., NCU, Taiwan 11

A Machine Instruction Op-code: specifies which machine operation to execute one per instruction Operand: more detailed information about this operation number of operands varies depending on op-code C.E., NCU, Taiwan 12

Decoding The Instruction 35A7 C.E., NCU, Taiwan 13

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating with Other Devices C.E., NCU, Taiwan 14

Program Execution Controlled by two special-purpose registers within CPU program counter : address of next instruction instruction register : current instruction Machine cycle: 3 steps performed by control unit fetch decode execute C.E., NCU, Taiwan 15

A Machine Cycle C.E., NCU, Taiwan 16

Special Case Decoding the Instruction B258 C.E., NCU, Taiwan 17

Stored Program Concept A program is just a special type of data! a program can be encoded and stored in main memory the control unit extracts the program from memory, decode the instructions, and execute them The machine alone don t know what is data and what is program The computer just executes according to the program counter C.E., NCU, Taiwan 18

The Program Stored in Main Memory Ready for Execution C.E., NCU, Taiwan 19

Performing the Fetch Step of the Machine Cycle (1/2) C.E., NCU, Taiwan 20

Performing the Fetch Step of the Machine Cycle (2/2) C.E., NCU, Taiwan 21

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating with Other Devices C.E., NCU, Taiwan 22

Arithmetic/Logic Operations Logic: AND, OR, XOR Rotate and Shift circular shift logical shift : discard the bit that falls off the edge and always fill the hole with a 0 arithmetic shift : leave the sign bit unchanged Arithmetic: add, subtract, multiply, divide separate instructions for different types of data C.E., NCU, Taiwan 23

Outline Computer Architecture Machine Language Program Execution Arithmetic/Logic Instructions Communicating with Other Devices C.E., NCU, Taiwan 24

Controllers Attached to a Machine s Bus C.E., NCU, Taiwan 25

Controller Intermediary device : it handles communication between the computer and a device Physical form of a circuit board : it plugs into a slot on the computer s motherboard Format conversion : between a computer and a particular type of peripheral device Port = set of addresses assigned to a controller memory-mapped I/O : computer s I/O devices appear to be in various memory locations buses contain a signal : indicates whether the message is for a controller or memory C.E., NCU, Taiwan 26

A Conceptual Representation of Memory-Mapped I/O C.E., NCU, Taiwan 27

Communicating with Other Devices Direct memory access (DMA) a controller accesses main memory over the bus CPU is not using the bus CPU continues with other tasks while the controller performs read/write Von Neumann bottleneck: the CPU and the controllers compete for bus access von Neumann architecture: a computer design model that uses a single storage structure to hold both instructions and data coordination of these activities is a major design issue Handshaking 2-way dialogue the computer and the peripheral device exchange device s status and coordinate their activities C.E., NCU, Taiwan 28

Data Communication Rates Measurement units bps = bits per second Kbps = kilo-bps, or 1,000 bps Mbps = mega-bps, or 1,000,000 bps Gbps = giga-bps, or 1,000,000,000 bps Bandwidth = maximum available rate depends on the type of communication path and the technology used in its implementation C.E., NCU, Taiwan 29

Data Communication Path Types Parallel communication several lines transfer different bits simultaneously rapid complex communication path example: CPU peripheral devices (e.g., printers) rates: > Mbps Serial communication one line transfers one bit at a time slower communication between different computers example : telephone line modem : bit patterns (source) audible tones bit patterns (destination) (D/A A/D) C.E., NCU, Taiwan 30