Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Machine cycle.
Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
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.
Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Data Manipulation Computer System consists of the following parts:
Computer Processing CSCE 110 J. Michael Moore.
Chapter 9_2 Following Instructions: Principles of Computer Operation.
Stored Program Concept: The Hardware View
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.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
What’s on the Motherboard? The two main parts of the CPU are the control unit and the arithmetic logic unit. The control unit retrieves instructions from.
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.
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.
Data manipulation, Part one Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
The Central Processing Unit (CPU) and the Machine Cycle.
Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
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.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
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.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2: Data Manipulation
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
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.
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.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
© 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 fetch-execute cycle
CS149D Elements of Computer Science
Chapter 2: Data Manipulation
Central Processing Unit
Chapter 2: Data Manipulation
Machine Language.
Program Execution.
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
CS 111 – Sept. 16 Machine language examples Instruction execution
Sec (2.3) Program Execution.
Presentation transcript:

Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved

© 2007 Pearson Addison-Wesley. All rights reserved 0-2 Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures

© 2007 Pearson Addison-Wesley. All rights reserved 0-3 Computer Architecture Central Processing Unit (CPU) or processor –Arithmetic/Logic unit versus Control unit –Registers General purpose Special purpose Bus Motherboard

© 2007 Pearson Addison-Wesley. All rights reserved 0-4 Figure 2.1 CPU and main memory connected via a bus

© 2007 Pearson Addison-Wesley. All rights reserved 0-5 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.

© 2007 Pearson Addison-Wesley. All rights reserved 0-6 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

© 2007 Pearson Addison-Wesley. All rights reserved 0-7 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

© 2007 Pearson Addison-Wesley. All rights reserved 0-8 Figure 2.2 Adding values stored in memory

© 2007 Pearson Addison-Wesley. All rights reserved 0-9 Figure 2.3 Dividing values stored in memory

© 2007 Pearson Addison-Wesley. All rights reserved 0-10 Figure 2.4 The architecture of the machine described in Appendix C

© 2007 Pearson Addison-Wesley. All rights reserved 0-11 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

© 2007 Pearson Addison-Wesley. All rights reserved 0-12 Figure 2.5 The composition of an instruction for the machine in Appendix C

© 2007 Pearson Addison-Wesley. All rights reserved 0-13 Figure 2.6 Decoding the instruction 35A7

© 2007 Pearson Addison-Wesley. All rights reserved 0-14 Figure 2.7 An encoded version of the instructions in Figure 2.2

© 2007 Pearson Addison-Wesley. All rights reserved 0-15 Program Execution Controlled by two special-purpose registers –Program counter: address of next instruction –Instruction register: current instruction Machine Cycle –Fetch –Decode –Execute

© 2007 Pearson Addison-Wesley. All rights reserved 0-16 Figure 2.8 The machine cycle

© 2007 Pearson Addison-Wesley. All rights reserved 0-17 Figure 2.9 Decoding the instruction B258

© 2007 Pearson Addison-Wesley. All rights reserved 0-18 Figure 2.10 The program from Figure 2.7 stored in main memory ready for execution

© 2007 Pearson Addison-Wesley. All rights reserved 0-19 Figure 2.11 Performing the fetch step of the machine cycle

© 2007 Pearson Addison-Wesley. All rights reserved 0-20 Figure 2.11 Performing the fetch step of the machine cycle (cont’d)

© 2007 Pearson Addison-Wesley. All rights reserved 0-21 Arithmetic/Logic Operations Logic: AND, OR, XOR –Masking Rotate and Shift: circular shift, logical shift, arithmetic shift Arithmetic: add, subtract, multiply, divide

© 2007 Pearson Addison-Wesley. All rights reserved 0-22 Figure 2.12 Rotating the bit pattern A3 one bit to the right