Structure of a computer system

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

Computer Structure.
Computer Memory and Data Transfer
© Paradigm Publishing, Inc. 2-1 Chapter 2 Input and Processing Chapter 2 Input and Processing.
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
Professor Michael J. Losacco CIS 1110 – Using Computers System Unit Chapter 4.
Chapter 0 Introduction to Computing
The CPU - Outline. Components of CPU Englander p
IT Systems Memory EN230-1 Justin Champion C208 –
Objectives Overview Discovering Computers 2014: Chapter 6 See Page 248
GCSE Computing - The CPU
Basic Computer Organization CH-4 Richard Gomez 6/14/01 Computer Science Quote: John Von Neumann If people do not believe that mathematics is simple, it.
6. The CPU and Memory Chapt. 7.
5.1 Chaper 4 Central Processing Unit Foundations of Computer Science  Cengage Learning.
CPU Describe the purpose of the CPU
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.
Memory. When we receive some instruction or information we retain them in our memory. Similarly a computer stores the instructions for solving a problem,
COMPONENTS OF THE SYSTEM UNIT
Your Interactive Guide to the Digital World Discovering Computers 2012.
Memory Hierarchy.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Lesson 3 — How a Computer Processes Data
Chapter 3 Computer Hard ware
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 2. Computer Structure Computer Structure The traditional diagram of a computer...
© Paradigm Publishing Inc. 2-1 Chapter 2 Input and Processing.
Higher Computing Computer Structure.
Higher Grade Computing
Computer Processing of Data
Introduction to Computing: Lecture 4
Random access memory.
 Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.
D75P 34R HNC Computer Architecture 1 Week 9 The Processor, Busses and Peripherals © C Nyssen/Aberdeen College 2003 All images © C Nyssen /Aberdeen College.
Discovering Computers 2012: Chapter 4
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
© Paradigm Publishing Inc. 2-1 Chapter 2 Input and Processing.
Components of a Computer Prepared by: Mrs. McCallum-Rodney.
© Banff and Buchan College 2007 DH2T 34 Computer Architecture 1 LO2 Lesson One Memory.
COMPUTER Structure Higher Unit 1 – Computer Systems St Kentigern’s Academy.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
Information Technology Basic Computer Architecture Adnan Khalid.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Overview von Neumann Architecture Computer component Computer function
Computer operation is of how the different parts of a computer system work together to perform a task.
Chapter 2.
CS 1410 Intro to Computer Tecnology Computer Hardware1.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
Hardware and Software By: Kyle Face. Hardware! Main computer hardware components Hardware refers to the physical components of a computer (What you can.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Chapter 2 content Basic organization of computer What is motherboard
Computer Systems Nat 4/5 Computing Science Computer Structure:
Computer Hardware What is a CPU.
CPU Lesson 2.
Systems Architecture Keywords Fetch Execute Cycle
Chapter 2.1 CPU.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Discovering Computers 2011: Living in a Digital World Chapter 4
Hook – CPU Knowledge Check
Introduction to Computing
Components of a CPU AS Computing - F451.
Unit 1.1 System Architecture Lesson 2
Chapter 5 Computer Organization
Presentation transcript:

Structure of a computer system Computer Structure A simple computer system consists of the following components: Processor Memory Input/Output Communication Channels Structure of a computer system INPUT PROCESSOR OUTPUT BACKING STORAGE MAIN MEMORY

Architecture of a computer system Control Unit ALU Arithmetic Logic Unit Registers Main Memory External Memory Peripheral Devices buses This diagram is a typical example of John Von Neumann (1903 – 57) architecture. Virtually all computers follow this architecture model. Stored Program Concept.

Buses – communication channel. The parts which go together to make up the computer system need to be able to communicate with one another. Buses connect the processor to the memory and input/output devices. There are three buses that connect all of these parts. Address Bus Processor Main Memory Input Output Data Bus The control bus is not shown in this diagram.

Standard Grade Revision Program A program is a list of instruction which tell the processor to do something. Each program instruction is stored in separate locations with it own binary number in the computers main memory. An item is stored in memory in a storage location with its own unique address (binary number). RAM 011 111 101 100

Standard Grade Revision cont.. The processor can identify each storage location this is known as addressability. WORD Each storage location can hold data this is known as a word. Word is the number of bits that can be processed by the CPU in one operation

Address Bus The address bus is a collection of wires used to identify which address in memory the CPU is accessing. Unidirectional bus, transferring information in one direction. The number of wires in an address bus (width) determines the number of unique memory locations which the CPU can address.

Address bus width and addressable memory 2 lines 00 01 10 11 A 2 line address bus would allow addresses. 4 because 22 = 4. A 3 line address bus would allow addresses. 8 because 23 = 8. 3 lines 000 001 010 011 100 101 110 111 X lines on the address bus allows addresses. 2x A 24 line address bus allows 224 = 65536 storage locations

Calculating the addressable memory in a computer system. Formula = Number of storage locations (addresses) x size of each storage location Type of question Calculate the maximum memory size of a computer with a 24 bit address bus and a memory word size of 16 bits.

= 2^24 x 16 bits = 2^24 x 16 bits = 16777216 x 2 bytes = 16777216 x 16 = 32768 Kb/1024 = 32 Mb = 2^24 x 16 bits = 16777216 x 2 bytes = 33554432 bytes = 32768 Kb = 32 Mb Question 1 Calculate the maximum memory size of a computer with a 32 bit address bus and a memory word size of 8 bits. Question 2 Calculate the maximum memory size of a computer with a 24 bit address bus and a 16 bit data bus. That the width of the data bus matches the capacity of each memory location.

Every time a bit is added to the width of the address bus, the address range doubles. Increasing the width of the address bus, for instance, from 32 bits to 40 bits, will increase the total number of memory locations which the processor can address from 2^32 to 2^40. Increasing address bus width has NO effect on computer performance.

Data Bus Carries data to and from the CPU, main memory and any other devices attached to the data bus. Bi-directional bus – 2 way. The width of the data bus determines the quantity of data that the bus can carry at one time. CPU RAM WRITE READ It is a two-way bus as data may be going to the processor (Read) or coming from the processor (Write).

Most common 32 bit bus which can transfer 32 bits of data from a processing unit or storage device. (32 bit Word Length) Word Length – the number of bits a computer can process in a single operation. Increasing the data bus width will increase the quantity of data which the bus can carry at one time. This will have an effect on the computer performance of the computer system.

NMI - Non Maskable Interrupt Control Bus (line) The control bus is not really a bus. Each wire is used for a separate purpose whereas the data and address bus consist of a collection of wires that are always together. The control bus is made up of a number of separate wires, each with their own function: Read/Write Clock Reset Interrupt NMI - Non Maskable Interrupt CU

More about this later – Fetch Execute Cycle Read/Write Function Control unit will initiate a read signal when data has to be read from another part of the computer system. When data has to be written to a memory location then the control unit will initiate a write signal. More about this later – Fetch Execute Cycle

Clock Generates a constant pulse at a frequency measured in Hertz. Common CPUs available today perform at 3Ghz and faster. This means that a 3Ghz CPU can execute 3,000,000,000 instructions in a single second! Each beat causes the control unit to fetch and decode data, which is called the “Fetch Execute Cycle”.

Reset Used to return the processor to an initial state, as if it has just been switched on. All internal registers are cleared and the machine reboots. If you computer has ‘frozen’ many computers have a small button somewhere on the case which can be used to activate the reset line.

Interrupt A signal from a peripheral device or a program. Allows the peripheral or program to communicate with the processor. Each time the keyboard is pressed an interrupt is generated. IBM PC can allow 256 interrupts.

Steps involved with an interrupt Stops the current program (break in execution) Saves current program Runs program to deal with interrupt (Interrupt Service Routine) Reloads its original task and continues what it was doing. Software can be used to ignore (mask) an interrupt. For example, a printer out of paper.

Non Maskable Interrupt Behaves in the same way as an Interrupt, except that the processor cannot ignore the interrupt.

You have now seen the three buses. The processor uses the three buses to communicate with the main memory. The processor works on data which is stored in main memory. It therefore spends a lot of time transferring data to and from the main memory. The two most basic operations which the processor carries out are and memory read memory write.

ALU Arithmetic Logic Unit Inside the Processor Control Unit ALU Registers Control Unit ALU Arithmetic Logic Unit Registers PC MAR MDA IR MAIN MEMORY Control Bus (line) Data Bus Address Bus

Registers are temporary storage locations inside the processor. The registers are used hold: ● data which is being processed ● instructions which are being executed ● addresses which are about to be accessed.

Registers Memory Address Registers memory address register used to hold memory address being accessed. Memory Data Registers contains the data to be written to memory or receives the data read from memory. Program Counter The register which stores the address of the next instruction is called the program counter. Usually after each instruction is executed, the program counter increases by one (hence the use of the word counter) so that it contains the address of the next instruction. Instruction Counter Hold the instruction currently being executed.

Control Unit The control unit controls the flow of information through the processor, and coordinates the activities of the other units within it. In a way, it is the "brain within the brain", as it controls what happens inside the processor, which in turn controls the rest of the PC. The control unit fetches each instruction (by sending out a signal) in sequence, decodes it and executes it. This is known as the Fetch Execute Cycle.

Control Unit cont… Timing/Control Logic Tells other parts of the system what to do and when to do it. Makes sure everything happens in the correct place at the correct time. Instruction Decoder Decodes the machine code during the cycle. These signals are sent out and received on the control bus

Arithmetic Logic Unit (ALU) Deals with the arithmetic operations and logical operations. Arithmetic Addition Subtraction Division Logic Logical OR Logical AND Think of programming IF mark >50 then print “PASS”

Stored Program Concept Programs are stored in slow-to-access storage medium (hard disc) and the processor works on them in fast-access storage medium (RAM). By changing the program, which is stored or held in the computers main memory, a computer can carry out a completely different process. e.g. using Word and Excel at the same time. Process A process is a program in execution.

CPU What happens when a program is opened: A processor of a computer is able to carry out a process only when it is given a set of instructions Programs move into RAM when in use by the computer Programs are stored in the computers Hard Disk CPU Hard Disk The Processor decodes the instructions and executes them.

Fetch Execute Cycle A program may contain thousands of instructions but the processor can only execute one instruction at a time. The fetch execute cycle is the name given to the way in which the CPU takes in an instruction from memory (FETCH) and carries out that instruction (EXECUTE).

In computing, the two-phase cycle used by the computer's central processing unit to process the instructions in a program. Fetch Stage During the fetch phase, the next program instruction is transferred from the computer's immediate-access memory to the instruction register (memory location used to hold the instruction while it is being executed). Execute Stage During the execute phase, the instruction is decoded and obeyed. The process is repeated in a continuous loop.

Summary – fetch-execute cycle (Memory Read) The processor sets up the address bus with the address of the next instruction to be fetched. The processor sends a read signal on the control bus. The instruction is then copied onto the data bus from the correct memory location to a register in the CPU. The CU (Control unit) decodes the instruction and begins to execute it. Once the execute phase has completed, the fetch phase will be carried out again.

Fetch-Execute Cycle (Memory Write) The processor sets up the address bus with the address of where the instructions has to be placed The processor sends a write signal on the control bus. The instruction is then copied onto the data bus from the CPU and taken to the memory location. The instructions are then placed in the correct memory location in main memory. Once the execute phase has completed, the fetch phase will be carried out again.

Known as primary storage INPUT PROCESSOR OUTPUT BACKING STORAGE MAIN MEMORY Memory Main memory of a computer is a general term for any type of computer memory other than backing storage. Known as primary storage Memory consists of a number of storage location, each identified by a unique address

Types of Memory Main memory consists of two types, Random Access Memory (RAM) and Read Only Memory (ROM) Random Access Memory Holds data as long as computer is switched on Data is lost when computer is switched off Known as volatile memory RAM can be written to and read from Type types of RAM DRAM – Dynamic SRAM – Static

DRAM – Dynamic The term dynamic is derived from the fact that it does need refreshed Contents constantly refreshed from the CPU (1000 times a second) or data will be lost Access time of 60 – 70 nanoseconds (1 nanosecond is one billionth (10-9) of a second) Cheap to produce Holds large amounts of data Requires less power than SRAM

SRAM - Static Type of memory that is faster and more reliable than the more common DRAM The term static is derived from the fact that it doesn't need to be refreshed like dynamic RAM. Holds its data as long as there is a power supply Consumes more power Faster access times Expensive to produce SRAM is more suited to cache memory

VRAM – Video This is an old type of memory that was designed for used with graphic adapters. It is special because it allows two devices to read the contents of the memory at the same time. This allows the monitor to access the memory for screen updates, while at the same time allowing the graphics processor to provide new data.

Cache Memory The cache memory is similar to the main memory but is smaller than main memory and performs faster. The cache memory performs faster by accessing information in fewer clock cycles. There are two types of cache memory present in the majority of systems Level 1 (L1) cache is in the processor Level 2 (L2) cache memory is optional and found on the motherboard of most processor-based systems.

How it works? An area of high speed memory set aside to store frequently accessed data. When data is accessed, a copy (and its address in memory) is stored in cache memory. The next time the CPU looks for information, it first checks the cache. If the data is there (called a hit), it can retrieve it from the much faster cache memory. If it is not, then it accesses system memory, puts a copy of the new data in the cache, and processes the information.

Cache Memory A small amount of random access memory that sits between the processor and RAM in order to speed up data transfer. Temporary store for often used instructions. Web Pages are saved in cache memory Much faster for CPU to access data held in cache memory than in main memory. CPU CACHE RAM Very fast access fast access

Read Only Memory Memory that holds its data permanently. When the computer is switched off, data is preserved. The contents of ROM are fixed when the computer is manufactured. Used to hold part of the operating system program, the bootstrap loader, which is used to start up the computer. Access time of 10 – 50 nanoseconds

Types of ROM ROM: Read-only memory. The “1”s and “0”s are permanent and created at the silicon foundry. Only used for circuits needed in the tens of thousands and after many prototypes. PROM: Programmable read-only memory. A hardware device connected to a PC can program the ROM, but it is write-once. EPROM: Erasable programmable read-only memory. A PROM that can be erased by exposure to ultraviolet light . EEPROM: Electrically erasable programmable read-only memory. A PROM that can be erased by high voltages. FLASH ROM: Erased and reprogrammed easily inside a computer. Flash ROM is now very popular. Used for USB memory pens, memory cards, mobile phones.

Memory Map

Review Questions