Computer Processing CSCE 110 J. Michael Moore.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

The CPU The Central Presentation Unit What is the CPU?
Instruction Set Design
Arithmetic Logic Unit (ALU)
 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 Organization and Architecture
Computer Architecture and Data Manipulation Chapter 3.
Basic Logical Operations (fascinating)
Basic Logical Operations (Fascinating)
Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.
1 Foundations of Software Design Lecture 3: How Computers Work Marti Hearst Fall 2002.
Processor Technology and Architecture
Lecture 14: Review Intro to IT COSC1078 Introduction to Information Technology Lecture 14 Revision and Review James Harland
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
James Tam Basic Logical Operations (Fascinating) In this section you will learn what are the basic logical operations and how to evaluate different logical.
Stored Program Concept: The Hardware View
James Tam AND OR NOT NAND NOR XOR Basic logic operations (fascinating)
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Chapter 2.2 Machine Language.
James Tam Basic Logical Operations (Fascinating) In this section you will learn what are the basic logical operations and how to evaluate different expressions.
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.
J. Michael Moore Computer Processing CSCE 110. J. Michael Moore ProcessorInputOutput Memory Storage.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Basic Operational Concepts of a Computer
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.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
Cis303a_chapt04.ppt Chapter 4 Processor Technology and Architecture Internal Components CPU Operation (internal components) Control Unit Move data and.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Lecture 11: System Fundamentals Intro to IT COSC1078 Introduction to Information Technology Lecture 11 System Fundamentals James Harland
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
Data Manipulation CSC Overview  Computer Architecture  Machine Language  Computer Architecture  Machine Language.
Computer Architecture Lecture 03 Fasih ur Rehman.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
Dale & Lewis Chapter 5 Computing components
Data Manipulation, part two Introduction to computer, 2 nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
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.
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.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
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.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Chapter 4 The Von Neumann Model
5 - How Computers Calculate - the ALU
The fetch-execute cycle
The Processor and Machine Language
Functional Units.
CS149D Elements of Computer Science
CSCE Fall 2013 Prof. Jennifer L. Welch.
CSCE 121: Simple Computer Model Spring 2015
Sequencing, Selection, and Loops in Machine Language
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
The Von Neumann Architecture Odds and Ends
CSCE Fall 2012 Prof. Jennifer L. Welch.
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Digital Circuits and Logic
Information Representation: Machine Instructions
Instruction execution and ALU
CS 111 – Sept. 16 Machine language examples Instruction execution
Sec (2.3) Program Execution.
Presentation transcript:

Computer Processing CSCE 110 J. Michael Moore

Memory Input Processor Output Storage J. Michael Moore

a.k.a. Central Processing Unit (CPU) arithmetic/logic unit (ALU) registers control unit Processor figures out what the ALU should do next transfers data between main memory and registers special memory cells that hold data used by ALU and are even faster than cache performs operations on data (e.g. addition, multiplication) J. Michael Moore

Processing Bits Boolean Logic Applied to circuits J. Michael Moore

Logical AND Truth table Truth table Logic gate X Y X AND Y False True 1 Logic gate J. Michael Moore

Logical AND: An Example T F AND J. Michael Moore

Logical OR Truth table X Y X OR Y False True Truth table X Y X OR Y 1 1 Logic gate J. Michael Moore

Logical OR: An Example T F OR J. Michael Moore

Logical NOT Truth table X Not X False True Truth table X Not X 1 1 Logic gate J. Michael Moore

Logical NOT: An Example F NOT J. Michael Moore

Logical NAND Truth table X Y X AND Y X NAND Y False True Truth table X 1 Logic gate J. Michael Moore

Logical NAND: An Example T F AND NAND J. Michael Moore

Logical NOR Truth table X Y X OR Y X NOR Y False True Truth table X Y 1 Logic gate J. Michael Moore

Logical NOR: An Example T F OR NOR J. Michael Moore

Logical Exclusive OR (XOR) Truth table X Y X XOR Y False True Truth table X Y X XOR Y 1 Logic gate J. Michael Moore

Logical XOR: An Example T F XOR http://fac-staff.seattleu.edu/quinnm/web/education/JavaApplets/applets/BinaryLogicOperators.html J. Michael Moore

Adder Half Adder Full Adder Ripple Carry Adder J. Michael Moore

Memory Input Processor Output Storage J. Michael Moore

How a Program is Executed Ex: to add the number held in address 3 and the number held in address 6 and put the result in address 10, the control unit copies data in main memory address 3 into register 1 LOAD 3, 1 copies data in main memory address 6 into register 4 LOAD 6, 4 tells ALU to add contents of registers 1 and 4 and put the result in register 3 ADD 1, 4, 3 copies data in register 3 into main memory address 10 STORE 3, 10 J. Michael Moore

How a Program is Executed LOAD, ADD, and STORE are machine instructions operation: what action to do (e.g. ADD) operand: what is affected (e.g. register 3) How does the control unit know which instruction is next? The Program J. Michael Moore

How a Program is Stored Program: list of machine instructions using some agreed upon coding conventions. For example: first byte second byte instruction operation code first operand second operand third operand J. Michael Moore

How a Program is Stored Suppose the opcode for ADD is 0010 Then ADD 1, 4, 3 would be encoded as: Program is stored the same way data is stored. 1 first byte second byte instruction third operand second first operation code J. Michael Moore

How a Program is Executed The control unit has instruction register: holds current instruction to be executed program counter: holds address of next instruction in the program to be fetched from memory J. Michael Moore

How a Program is Executed Program counter tells where the computer is in the program. Usually, the next instruction to execute is the next instruction in memory. Sometimes we want to jump to another instruction (e.g., an ‘if’ statement or ‘while’ loop). More instructions: unconditional JUMP: always jump to the address given conditional JUMP: only jump if a certain condition is true (e.g., some register equals 0 or two registers equal each other) Instruction to stop executing instructions: HALT J. Michael Moore

Machine Cycle Fetch next instruction, as indicated by the program counter (PC), and increment the PC Decode the bit pattern in the instruction register (IR) - figure out which circuitry needs to be activated to perform the specified instruction Execute the specified instruction, by activating the ALU to do the right thing. If a JUMP, this may cause the PC to be altered Typical speeds: 10 to 100 million instructions per second (MIPS) J. Michael Moore

... ... ... Architecture CPU Control Unit ALU R4 R3 R2 R1 IR PC BUS First Instruction Second Instruction Third Instruction ... Data ... ... 1 2 3 4 Memory 95 96 97 98 99 J. Michael Moore

Assembly Language Example PC: IR: R4: R3: R2: R1: Memory: ... 12-13: LOAD 108, 3 14-15: LOAD 109, 4 16-17: ADD 3, 4, 1 18-19: STORE 1, 110 20-21: HALT 108: 109: 110: 14 16 18 12 20 22 HALT STORE ADD LOAD LOAD 35 77 112 112 44 35 77 J. Michael Moore