Chapter 2 Data Manipulation. © 2005 Pearson Addison-Wesley. All rights reserved 2-2 Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
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 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Lecture 14: Review Intro to IT COSC1078 Introduction to Information Technology Lecture 14 Revision and Review James Harland
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Data Manipulation Computer System consists of the following parts:
Chapter 2.2 Machine Language.
Computer Structure.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
Processor Structure & Operations of an Accumulator Machine
Intro to CS Chapt 2 Data Manipualtion 1 Data Manipulation How is data manipulated inside a computer? –How is data input? –How is it stored? –How is it.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Invitation to Computer Science 5th Edition
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.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Data Manipulation, Communication and Architecture Fall 2012.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Data manipulation, Part one Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
The Central Processing Unit (CPU) and the Machine Cycle.
Invitation to Computer Science 6th Edition Chapter 5 Computer Systems Organization.
Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions.
General Concepts of Computer Organization Overview of Microcomputer.
Data Manipulation CSC 2001 TTU CSC 2001 TTU. Now what?  Program can be represented (and stored) like data. So, now what happens?  The program needs.
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.
Data Manipulation CSC Overview  Computer Architecture  Machine Language  Computer Architecture  Machine Language.
Copyright © 2015 Pearson Education, Inc. Chapter 2: Data Manipulation.
Computer Science/Ch.3 Data Manipulation 3-1 Chapter 3 Data Manipulation.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
MICROOCESSORS AND MICROCONTROLLER:
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.
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
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.
Von Neumann Computers Article Authors: Rudolf Eigenman & David Lilja
Register Transfer Languages (RTL)
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2: Data Manipulation
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
CPIT Program Execution. Today, general-purpose computers use a set of instructions called a program to process data. A computer executes the.
© 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
CS149D Elements of Computer Science
Chapter 2: Data Manipulation
Chapter 5: Computer Systems Organization
Chapter 2: Data Manipulation
Machine Language.
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

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

© 2005 Pearson Addison-Wesley. All rights reserved 2-3 Computer Architecture Central Processing Unit (CPU) or processor –Arithmetic/Logic Unit (ALU) –Control Unit –Registers –Cache Memory Bus Motherboard

© 2005 Pearson Addison-Wesley. All rights reserved 2-4 Stored program concept A program is just a special type of data. –A program can be stored in main memory. One general-purpose machine can run many different programs.

© 2005 Pearson Addison-Wesley. All rights reserved 2-5 Figure 2.1 CPU and main memory connected via a bus

© 2005 Pearson Addison-Wesley. All rights reserved 2-6 Machine language: definitions 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

© 2005 Pearson Addison-Wesley. All rights reserved 2-7 Machine language philosophies Reduced Instruction Set Computing (RISC) –Few, simple, efficient, and fast instructions –Example: PowerPC from Apple/IBM/Motorola Complex Instruction Set Computing (CISC) –Many, convenient, and powerful instructions –Example: Pentium from Intel

© 2005 Pearson Addison-Wesley. All rights reserved 2-8 Machine instruction types Data Transfer: copy data between CPU and main memory Arithmetic/Logic: use existing data values to compute a new data value Control: direct the execution of the program

© 2005 Pearson Addison-Wesley. All rights reserved 2-9 Figure 2.2 Adding values stored in memory

© 2005 Pearson Addison-Wesley. All rights reserved 2-10 Figure 2.3 Dividing values stored in memory

© 2005 Pearson Addison-Wesley. All rights reserved 2-11 Figure 2.4 The architecture of the machine described in Appendix C

© 2005 Pearson Addison-Wesley. All rights reserved 2-12 Parts of 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

© 2005 Pearson Addison-Wesley. All rights reserved 2-13 Figure 2.5 The composition of an instruction for the machine in Appendix C

© 2005 Pearson Addison-Wesley. All rights reserved 2-14 Figure 2.6 Decoding the instruction 35A7

© 2005 Pearson Addison-Wesley. All rights reserved 2-15 Figure 2.7 An encoded version of the instructions in Figure 2.2

© 2005 Pearson Addison-Wesley. All rights reserved 2-16 Program execution Controlled by two special-purpose registers –Program counter: address of next instruction –Instruction register: current instruction Steps performed by control unit –Fetch –Decode –Execute

© 2005 Pearson Addison-Wesley. All rights reserved 2-17 Figure 2.8 The machine cycle

© 2005 Pearson Addison-Wesley. All rights reserved 2-18 Figure 2.9 Decoding the instruction B258

© 2005 Pearson Addison-Wesley. All rights reserved 2-19 Figure 2.10 The program from Figure 2.7 stored in main memory ready for execution

© 2005 Pearson Addison-Wesley. All rights reserved 2-20 Figure 2.11 Performing the fetch step of the machine cycle

© 2005 Pearson Addison-Wesley. All rights reserved 2-21 Figure 2.11 Performing the fetch step of the machine cycle (cont’d)

© 2005 Pearson Addison-Wesley. All rights reserved 2-22 Arithmetic/Logic operations Logic: AND, OR, XOR Rotate and Shift: circular shift, logical shift, arithmetic shift Arithmetic: add, subtract, multiply, divide –Often separate instructions for different types of data

© 2005 Pearson Addison-Wesley. All rights reserved 2-23 Figure 2.12 Rotating the bit pattern A3 one bit to the right

© 2005 Pearson Addison-Wesley. All rights reserved 2-24 Communicating with other devices Controller = intermediary device that handles communication between the computer and a device. Port = set of addresses assigned to a device. –Memory-mapped I/O: CPU reads from or writes to addresses of the controller’s port

© 2005 Pearson Addison-Wesley. All rights reserved 2-25 Communicating with other devices (continued) Direct memory access (DMA): main memory access by a controller over the bus Von Neumann Bottleneck: insufficient bus speed impedes performance Handshaking: the process of controlling the transfer of data between components of different speeds

© 2005 Pearson Addison-Wesley. All rights reserved 2-26 Figure 2.13 Controllers attached to a machine’s bus

© 2005 Pearson Addison-Wesley. All rights reserved 2-27 Figure 2.14 A conceptual representation of memory-mapped I/O

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

© 2005 Pearson Addison-Wesley. All rights reserved 2-29 Data communication path types Serial: one line transfers one bit at a time Parallel: several lines transfer different bits simultaneously Modem: converts between digital bits and analog tones

© 2005 Pearson Addison-Wesley. All rights reserved 2-30 Other architectures Throughput = (total work) / (total time) Technologies to increase throughput –Pipelining: overlap steps of the machine cycle –Parallel processing: use multiple processors simultaneously SISD = no parallel processing MIMD = different programs, different data SIMD = same program, different data