Chapter 2: Data Manipulation

Slides:



Advertisements
Similar presentations
Stored Program Architecture
Advertisements

Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
Computer Architecture and Data Manipulation Chapter 3.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Chapter.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Data Manipulation Computer System consists of the following parts:
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Memory - Registers Instruction Sets
Stored Program Concept: The Hardware View
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Chapter 2.2 Machine Language.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
CPU Registers PC Arith Logic Unit Bus Interface I/O Bridge System bus Memory bus Main Memory USB Controller Graphics Adapter Disk Controller I/O Bus Mouse.
Computer Structure.
Lecture 3. Diff b/w RAM and Registers Registers are used to hold data immediately applicable to the operation at hand Registers are used to hold data.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
CPU Computer Hardware Organization (How does the computer look from inside?) Register file ALU PC System bus Memory bus Main memory Bus interface I/O bridge.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Data manipulation, Part one Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
The Central Processing Unit (CPU) and the Machine Cycle.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation. © 2005 Pearson Addison-Wesley. All rights reserved 2-2 Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Copyright © 2015 Pearson Education, Inc. Chapter 2: Data Manipulation.
Computer Structure & Architecture 7b - CPU & Buses.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Data Manipulation Brookshear, J.G. (2012) Computer Science: an Overview.
20 October 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Dale & Lewis Chapter 5 Computing components
Data Manipulation, part two Introduction to computer, 2 nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2: Data Manipulation
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
27 October 2015 Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
© 2015 Pearson Education Limited 2015 Quiz in last 15 minutes Midterm 1 is next Sunday Assignment 1 due today at 4pm Assignment 2 will be up today; due.
Chapter 2: Data Manipulation
Chapter 2: Data Manipulation
5 - How Computers Calculate - the ALU
The Processor and Machine Language
CS149D Elements of Computer Science
Chapter 2: Data Manipulation
Chapter 5: Computer Systems Organization
MARIE: An Introduction to a Simple Computer
Chapter 2: Data Manipulation
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Program Execution.
Information Representation: Machine Instructions
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Chapter 2: Data Manipulation
Presentation transcript:

Chapter 2: Data Manipulation

Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution

Computer Architecture Central Processing Unit (CPU) or processor Arithmetic/Logic unit versus Control unit Registers : temporary storage units within the CPU that hold data being processed and are very easily accessible by CPU. Two types of Registers General purpose : Can be used for any task Special purpose : Used for special task e.g Program Counter ( PC) and Instruction Register (IR) Bus Motherboard

Inside the System Unit

Figure 2.1 CPU and main memory connected via a bus

Bus and its types A bus connects parts of the CPU to one another. It also links the CPU to the various components of the system board. There are three types of buses: Data Bus Address Bus Control Bus

Von Neumann Stored Program Concept A program can be encoded as bit patterns and stored in main memory. From there, the CPU can then extract the instructions and execute them. In turn, the program to be executed can be altered easily.

Terminology Machine instruction: An instruction (or command) encoded as a bit pattern recognizable by the CPU Machine language: The set of all instructions recognized by a machine

Machine Instruction Types Data Transfer: copy data from one location to another Arithmetic/Logic: use existing bit patterns to compute a new bit patterns Control: direct the execution of the program

Data Transfer Instructions Load : To fetch data from Main Memory Store : To save data into Main Memory Move: To transfer data from register to register

Arithmetic / Logical Instructions Add / Sub / Mult / Div / Mod And / OR / XOR / NOT /SHIFT /ROTATE

Arithmetic/Logic Operations Logic: AND, OR, XOR Masking Rotate and Shift: circular shift, logical shift, arithmetic shift Arithmetic: add, subtract, multiply, divide Precise action depends on how the values are encoded (two’s complement versus floating-point).

Control Instructions Jump Halt

What is a High Level Language and Machine Language A High Level Language is easily understood by human beings A Machine Language Instruction is in Binary format easily understood by the Machine / Computer Difference ?? One High Level Language Instruction gets translated into Many Machine Level Instructions thus taking more time to execute

Example If I write in High Level Language a:= b+c It gets translated into 4 machine level instructions: Fetch b Fetch c Add b and c Store their result in a

Figure 2.2 Adding values stored in memory

Figure 2.4 The architecture of the machine described in Appendix C

Difference Between PC and IR Program counter (PC) : It contains the address of the next instruction to be executed Instruction Register: It contains the Instruction that is currently being executed by the CPU

Parts of a Machine Instruction Op-code: Specifies which operation to execute Operand: Gives more detailed information about the operation Interpretation of operand varies depending on op-code

Figure 2.5 The composition of an instruction for the machine in Appendix C

Figure 2.6 Decoding the instruction 35A7

Figure 2.7 An encoded version of the instructions in Figure 2.2

Program Execution Controlled by two special-purpose registers Program counter: address of next instruction Instruction register: current instruction Machine Cycle Fetch Decode Execute

Figure 2.8 The machine cycle

Figure 2.9 Decoding the instruction B258

Figure 2. 10 The program from Figure 2 Figure 2.10 The program from Figure 2.7 stored in main memory ready for execution

Figure 2.11 Performing the fetch step of the machine cycle

Figure 2.11 Performing the fetch step of the machine cycle (cont’d)