Machine Architecture. ITNP23: Foundations of Information Technology Una Benlic 4B69

Similar documents
Central Processing Unit (CPU)

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

MICROPROCESSOR AND MICROCOMPUTER BASICS

CHAPTER 7: The CPU and Memory

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

The Central Processing Unit:

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

CPU Organisation and Operation

(Refer Slide Time: 00:01:16 min)

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Basic Concepts of Information Technology (IT)

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Computer Organization. and Instruction Execution. August 22

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

LSN 2 Computer Processors

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Central Processing Unit

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Discovering Computers Living in a Digital World

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

Chapter 2 Logic Gates and Introduction to Computer Architecture

1 PERSONAL COMPUTERS

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Technical Product Specifications Dell Dimension 2400 Created by: Scott Puckett

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Unit A451: Computer systems and programming. Section 2: Computing Hardware 1/5: Central Processing Unit

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

1 Classical Universal Computer 3

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

lesson 1 An Overview of the Computer System

Microprocessor and Microcontroller Architecture

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Primary Memory. Input Units CPU (Central Processing Unit)

1 Computer hardware. Peripheral Bus device "B" Peripheral device. controller. Memory. Central Processing Unit (CPU)

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

CPU Organization and Assembly Language

PROBLEMS. which was discussed in Section

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

Chapter 1 Computer System Overview

TIMING DIAGRAM O 8085

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

The Motherboard Chapter #5

Administrative Issues

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Instruction Set Architecture (ISA)

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Here is a diagram of a simple computer system: (this diagram will be the one needed for exams) CPU. cache

Summary of the MARIE Assembly Language

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Block diagram of typical laptop/desktop

Microprocessor & Assembly Language

Introduction to Computer Architecture Concepts

İSTANBUL AYDIN UNIVERSITY

Let s put together a Manual Processor

A3 Computer Architecture

MACHINE ARCHITECTURE & LANGUAGE

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

Basic Computer Organization

OVERVIEW OF MICROPROCESSORS

COMPUTER BASICS. Seema Sirpal Delhi University Computer Centre

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Computer organization

Chapter 1. The largest computers, used mainly for research, are called a. microcomputers. b. maxicomputers. c. supercomputers. d. mainframe computers.

Acknowledgments. Thanks to the following web site and people for the materials and images used in this presentation:

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

K Hinds Page No. 1. Lecture 3 ASCII

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

Instruction Set Design

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

Operating System Fundamentals Robert Power & Robert Ford

Intel 8086 architecture

Computer Systems Structure Main Memory Organization

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Introducción. Diseño de sistemas digitales.1

Processor Architectures

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

What's in a computer?

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

Desktop Publishing 5N0785 Learning Outcome 2 Monaghan Institute Level 5 Module

on an system with an infinite number of processors. Calculate the speedup of

Embedded Software development Process and Tools: Lesson-3 Host and Target Machines

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

Week One Lecture Note 1.0 INTRODUCTION TO COMPUTER 1.1 WHAT IS COMPUTER?

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Introduction To Computers: Hardware and Software

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

Transcription:

Machine Architecture ITNP23: Foundations of Information Technology Una Benlic 4B69 ube@cs.stir.ac.uk

Basic Machine Architecture In these lectures we aim to: Understand the basic architecture of a simple computer. Understand the components: CPU, main memory, I/O Understand the concepts of stored program and machine cycle.

Literature Introduction to Computing Systems, Patt and Patel, latest edition. Computer Science: An Overview, J. G. Brookshear, latest edition, Addison-Wesley

To get the task done by a computer, we need: 1) A computer program that specifies what the computer must do. 2) The computer itself that is to carry out the task

Computer program Set of instructions, each specifying a well-defined piece of work for the computer to carry out. Instruction is the smallest piece of work specified in a computer program. To be executed, a machine-code program must be stored in main memory as sequence of machine-code instructions.

Von Neumann model John von Neumann proposed a fundamental model of a computer for processing computer programs in 1946. Consists of five parts: memory, a processing unit, input, output and a control unit.

Slightly more detailed von Neumann model

Main memory - RAM Random-access memory (RAM) Temporarily stores both software instruction and data. It is basically your computer's short term memory. Memory is divided into fixed-sized units called cells. Each cell is associated with a unique identifier called an address. RAM is measured in MB, e.g., a 256MB memory has 2 28 uniquely identifiable locations, and each location can store 8 bits of informations.

Main memory - ROM Read-Only Memory (ROM) Contents can be accessed and read but can't be changed. Being non-volatile, the information is not lost once the computer has been shut off. ROM includes such things as the computer's BIOS (basic input/output system), which are the instructions the computer follows for booting up. ROM is measured in Megabytes.

Accessing memory location To read the contents of a memory location: place the address of the memory location in the memory's address register (MAR) interrogate the computer's memory The information stored in the location having the address will be placed in the memory's data register (MDR). To write a value in a memory location: write the address of the memory location in the MAR, and the value to be stored in MDR. interrogate the computer's memory with the Write Enable signal asserted.

Two features of a memory location Its address and what is stored there. An analogy: the post office boxes in your local post office.

Central Processing Unit (CPU) Consists of a processing unit and a control unit.

CPU Processing unit Carries out the processing of information in the computer. Can consist of many sophisticated complex functional units, each performing one particular operation (divide, square root, etc). The simplest processing unit is the Arithmetic and Logic Unit (ALU), so called because it is usually capable of performing basic arithmetic functions (like ADD and SUBTRACT) and basic logical operations (like AND, OR and NOT operations). The size of the quantities normally processed by the ALU is often referred to as the word length and each element is referred to as a word. Most microprocessors today that are used in PCs or workstations have a word length of either 32 bits (as in the case of Intel's Pentium IV) or 64 bits (Intel's Itanium processor). A computer often provides some small amount of storage very close to the ALU to allow results to be temporarily stored if they will need to produce additional results in the near future.

CPU control unit Like the conductor of an orchestra - it is in charge of making all the other parts play together. It keeps track of both where we are within the process of executing the program and where we are in the process of executing each instruction. To keep track of which instruction is being executed, it has an Instruction Register (IR) to contain that instruction. To keep track of which instruction is to processed next, it has a Program Counter (PC) register (also caller instruction pointer) that contains the next instruction's address.

Input and Output Many devices exist for the purpose of getting the information into the computer and displaying the result outside the computer. The most basic input device is the keyboard, while the most basic output device is the monitor. For input we have among other things the mouse, digital scanners, CD disks, etc. For output, we have among other things printers, LED displays, and disks.

System bus System bus - bus connecting the CPU and memory. Combines the functions of a data bus to carry information, an address bus to determine where it should be sent, and a control bus to determine its operation.

Machine code instructions Instruction is made of two parts, the opcode (what the instruction does) and the operands (who it is to do it to). E.g., ADD instruction for a LC-3 computer. Machine code (lines of numbers!) is very hard to read, so instead programmers use a set of mnemonics called assembly language to represent the numerical instructions.

Assembly language instructions Some examples from the Intel 8021 instruction set: MOV A, 4 Copy contents of memory location 4 to register A DEC A Take away 1 (decrement) the contents of register A MOV B, A Copy contents of register A to register B ADD A, B Add contents of register B to register A MOV 4, A Copy contents of register A to memory Location 4 Example Let's try this out with the following values: A: initial value 2 B: initial value 4 Memory location 4: initial value 3 In a modern programming language this could be written as: x = (x-1)*2

Machine cycle Instructions are processed under the direction of the control unit in a step-by-step manner. The sequence of steps is called the instruction cycle and each step is referred to as a phase. Six phases to the instruction cycle: FETCH, DECODE, EVALUATE ADDRESS, FETCH OPERANDS, EXECUTE, STORE RESULT

Instruction cycle phases FETCH: obtains the next instruction from memory and loads it into the instruction register (IR) of the control unit. The program counter (PC) contains the address of the next instruction. The FETCH phase takes multiple steps: Step 1: Load the MAR with the contents of the PC, and simultaneously increment the PC. Step 2: Interrogate memory, resulting in the instruction being placed in the MDR. Step 3: Load the IR with the content of the MDR.

Instruction cycle phases DECODE: examines the instruction in order to figure out what is being asked to do. EVALUATE ADDRESS: computes the address of the memory location that is needed to process the instruction. FETCH OPERANDS: obtains the source operands needed to process the instruction. EXECUTE: carries out the execution of the instruction. STORE RESULT: the final phase of an instruction's execution. The result is written to its designated destination. Processing continues until something breaks this sequential flow.

Running Programs So, to run a program: we arrange that its instructions are in contiguous locations in memory place the start address in the PC... stand clear!

Machine cycle - example Here is a snapshot of the state of a simple computer showing the contents of main memory. Trace the execution of the program stored in the main memory. At each step, show the contents of main memory and of all registers used in executing this program.

Clock speed The CPU requires a fixed number of clock ticks, or cycles, to execute each instruction. The faster the clocks rate, the faster the CPU, or the faster it can execute instructions. Clock Speeds are usually determined in MHz, 1 MHz representing 1 million cycles per second, or in GHz, 1 GHz representing 1 thousand million cycles per second. The higher the CPU speed, the better a computer will perform, in a general sense. Other components can improve a computer's performance as well, like memory (RAM) and the motherboard, as well as the number of cores that a processor has, like dual core or quad core.

Machine Speed Instruction Rate Clock speed can be misleading as a machine s capability is also how much work it can do between ticks, not just how fast it ticks. Machine speed instruction rate is a better measure than clock speed alone. It s measured in MIPS (millions of instructions per second). Measures how many machine language instructions can be fetched, decoded, and executed in one second.

Cache Not included in our machine architecture diagram, but certainly plays a part in program execution. It is located on or near the processor. Computer designers observed that when a program fetches a piece of data or instruction, there is a high likelihood that: 1)It will access that same instruction or piece of data in the very near future 2)It will likely access the instructions or data that are located near this one. This is known as the principle of locality

Cache To exploit this, when the computer references a piece of data, it should move the data from RAM to cache. It should also move data in the memory cells located near this item into cache. Cache memory is typically 10 times faster than RAM, but is much smaller (100s of Kilobytes of storage, rather than 100s or Megabytes or Gigabytes)

Cache When the computer needs a piece of information, it does the following: 1) Looks first in cache to see if the information is there. 2) If it is not, then access the information in RAM 3) Copy the data just fetched into cache along with the k immediately following memory locations. If the cache is full, discard some of the older items that have not been accessed recently. A good analogy to cache is a fridge! Without one, we d have to go to the supermarket every time we needed an item (that usually requires cool storage). With a fridge, we can store food for now, and food we will need in the immediate future, reducing trips to the supermarket (Schneider & Gersting, 2004) Cache size on CPUs and devices (e.g. hard drives) can have a large impact on speed

Summary We have discussed... the structure of a simple computer its basic components (CPU, Main Memory, I/O) its operation (stored program concept, program execution

END OF LECTURE