Computer Organization

Slides:



Advertisements
Similar presentations
Components of a computer system
Advertisements

Introduction to Computer Systems
Chapter 0 Introduction to Computing
Stored Program Concept: The Hardware View
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
1-1 ICS102: Introduction To Computing I King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
6. The CPU and Memory Chapt. 7.
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
UNIX Unbounded 5 th Edition Amir Afzal Chapter 1 First Things First.
Topics Introduction Hardware and Software How Computers Store Data
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Architecture And Organization UNIT-II Structured Organization.
Computer Architecture
Exam Format  105 Total Points  25 Points Short Answer  20 Points Fill in the Blank  15 Points T/F  45 Points Multiple Choice  The above are approximations.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
Computer Architecture 2 nd year (computer and Information Sc.)
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Computer Organization Instructors Course By: Lecturer: Shimaa Ibrahim Hassan TA: Eng: Moufeda Hussien Lecture: 9:45 Address:
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Electronic Analog Computer Dr. Amin Danial Asham by.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
General Computer Knowledge COE 201- Computer Proficiency.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Processing Hardware, Software. Hardware Hardware Processing is performed by a computer ’ s central processing unit and is measured by the clock speed.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Computer Organisation
Computer Architecture and Number Systems
CPU Lesson 2.
Systems Architecture Keywords Fetch Execute Cycle
Computer Science II Chapter 1.
Computer Organisation
Topics Introduction Hardware and Software How Computers Store Data
Computer Organisation
The Central Processing Unit
Introduction to Computer Architecture
Computer Organization
Computer Architecture
IB Computer Science Topic 2.1.1
Teaching Computing to GCSE
CS 1308 Exam 2 Review.
COMS 161 Introduction to Computing
Introduction to Computer Architecture
Topics Introduction Hardware and Software How Computers Store Data
CPU Key Revision Points.
GCSE OCR 3 Memory Computer Science J276 Unit 1
Components of a CPU AS Computing - F451.
Introduction to Computer Systems
Objectives Describe the difference between RAM and ROM
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
CS 1308 Exam 2 Review.
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Computer components.
Presentation transcript:

Computer Organization IB Computer Science Topic 2

Outline the four phases of the machine instruction cycle. [8 marks] Draw a block diagram showing the basic components of the CPU and how they interact with memory. [8 marks]

Machine Instruction Cycle Overview Fetch Decode Execute Store

Components of the CPU You need to be able to reproduce this diagram and discuss everything in it Control Unit Registers Arithmetic Logic Memory [01] [02] [..] [FF] Address Bus Data Bus MAR MDR

Registers Registers are the smallest and fastest unit of memory in a computer system, and are used to store information that the CPU is working on at that exact moment. Registers you need to know about: Program Counter: Stores the address of the next instruction Memory Address Register: Stores the address in memory that is to read or written. Memory Data Register: Stores the data in memory that has been read or is to be written. Instruction Register: Stores the current instruction being processed. Accumulator: A set of general purpose registers used for storing temporary intermediate results of the CPU's calculations.

The Store Phase (optional) The Fetch Phase The PC (Program Counter) stores the address of the next instruction in memory. The contents of the PC are copied to the MAR and the PC is incremented. The address is put onto the address bus. The data at that address is read into the MDR. The data returns on the data bus. The Decode Phase The instruction carried by the MDR is copied to the IR (Instruction Register) The instruction is translated into a format that the ALU can understand. The Execute Phase The ALU carries out the operation, e.g. ADD, MUL, CMP, JMP, STO, etc. The Store Phase (optional) This is almost exactly the same as the Fetch phase, except that the control bus carries a "write" signal instead of a "read" signal. Therefore, instead of reading the data stored at the MAR address into the MDR, the data stored in the MDR is written to the location at the MAR address.

Questions Draw a block diagram showing the basic components of the CPU and how they interact with memory. [8 marks] Explain why the address bus is unidirectional and the data bus is bidirectional. [4 marks] Outline the four phases of the machine instruction cycle. [8 marks] Compare the roles of the Memory Address Register and the Memory Data Register. [4 marks]

Operating Systems Operating System: Software that controls the execution of programs and that may provide services such as resource allocation, scheduling, input/output control, and data management. How many operating systems can you name? Main functions: A collection of programs Input/Output (IO) control File management Software/hardware interface Memory management User interface Scheduling Program execution control Security

Operating Systems and Security User management: login with password System of privileges, determining which user or process can do what, eg delete files, shut down the system, etc Permissions for files and directories, eg read-only Memory management: keeping one process’s or one user's memory space separate from another’s Built-in firewall

Levels of Memory Primary Memory Secondary Memory Registers: Smallest, fastest memory, used to hold data that the CPU is currently working. Cache: Small, fast memory, used to hold very frequently used data. RAM: Random Access Memory. Holds data and instructions from running programs. ROM: Non-volatile memory, used to hold the operating system's bootstrap loader (small start-up program) or BIOS. Secondary Memory Disk storage Magnetic tape USB flash drives

Operating Systems and Memory Management Multi-tasking environment: keeping the memory space of each process safe from other running processes (see Security) Multi-user environment: keeping the memory space (primary and secondary) of each user safe from other users (see Security) Allocating and deallocating memory for each process Paging: Dividing virtual memory up into equal- sized blocks (pages) Paging allows OSs to allocate non-contiguous chunks of memory to the same process, thus reducing fragmentation problems Virtual memory: The use of secondary memory as if it were primary memory. By creating virtual memory, the OS make it easier for programs to reference memory because they don’t need to worry about the complications of the underlying physical structure of memory and disk (another example of abstraction)

Applications An application is a computer program that allows a user to perform some useful activity. Examples are: Word processor: Text document management Spreadsheet: Mathematical and financial calculations Database: Organisation of information Email: Electronic mail Web browser: Viewing HTML pages Graphics processing: Editing, cropping and enhancing images Computer-Aided Design (CAD): Creating and editing designs for engineering or manufacturing Note that you are not allowed to use proprietary names in your exam. So you say "spreadsheet software" and not "MS Excel", etc.

Common Features of Applications The IB Guide refers to features: "Including toolbars, menus, dialogue boxes, graphical user interface GUI) components. Students should understand that some features are provided by the application software and some by the operating system." Operating systems make services available to applications: I/O (input/output) operations File system manipulation (reading/writing files) Frameworks of GUI components Program execution Hardware interface Error detection All applications need these services, so it makes sense to centralise their provision. They make the development of software simpler because potentially complex interaction with hardware is avoided.

Questions Outline the main functions of an operating system. [4 marks] Explain the advantages of virtual memory. [4 marks] In what ways can an operating system improve information security in a computer? [4 marks]

Binary Representation Definitions Bit: The smallest amount of data that can be represented. Short for "binary digit". Represented as either a 0 or 1. Byte: 8 bits Denary/Decimal: The base 10 counting system. The normal place- value counting system in which a new column is created when a power of 10 is reached. Hexadecimal: The base 16 counting system. Requires six new symbols in addition to 0-9, which are A-F. Since 24 = 16, one Hex digit can be used to represent 4 bits, and two Hex digits can be used to represent a byte.

Data Representation No bits No diff values 1 2 4 3 8 16 5 32 n ? The Guide mentions: Strings, integers, characters, colours. The most basic point is that more bits allows more different values to be stored. No bits No diff values 1 2 4 3 8 16 5 32 n ? 1 00 01 10 11 000 001 010 011 100 101 110 111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100 10101 10110 10111 11000 11001 11010 11011 11100 11101 11110 11111 More bits means: More different values Data is larger

Raster images Also called bitmaps, raster images use a grid of points of colour But how many different colours can one point be? Colour depth is the number of bits per pixel (generally "bit depth") (The number of pixels makes a difference too.) Obvious tradeoff between picture quality vs file size

Questions An image file is made up of a grid of 200 x 300 pixels and has a colour depth of 8 bits. How many different colours can each pixel represent? [2 marks] What is the size of the file? [2 marks] A friend argues that if you increase the colour depth of this file, you will improve its quality. To what extent is he correct? [4 marks] General knowledge! What does RGB stand for? How many colours can RGB represent? What are the RGB values for: white? black? What colour is: 888888? 00FFFF? Why is ASCII vs Unicode relevant to this topic? Explain one advantage and one disadvantage of Unicode over ASCII.

Logic Gates A B X C The Guide mentions AND, OR, NOT, NAND, NOR, XOR Which of these are binary operators and which are unary operators? Construct truth tables for each. Look at the logic diagram below. Construct a truth table for X given the inputs A, B and C. AND NOT XOR A B C X

Redraw each of these diagrams using fewers gates NOT A AND X NOT B NOT AND A OR X AND B NOT

Harder Write a boolean expression for the following logic diagram Construct its truth table NOT A AND X B OR C Construct a logic diagram for the following boolean expression: A AND (B OR NOT C)

IB Example Maria won’t go to school if it is cold and raining or she has not done her homework Draw a logic diagram Construct a truth table Huh?! Think… What are the inputs? What is the output? What are the Boolean operators?

IB Example: Maria won’t go to school if it is cold and raining or she has not done her homework. Inputs Cold Raining Done Homework Outputs: Go to School and R or not S H not C R H C and R Not H C and R or Not H S = Not(C and R or Not H) 1