Lecture 1 Introduction To Computer Organization

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lecture 1 Introduction To Computer Organization as PDF for free.

More details

  • Words: 1,290
  • Pages: 7
‫ا  ا   ا د‬    ‫ا   ا‬ -  ‫ا   ا‬

Kingdom of Saudi Arabia Royal Commission at Yanbu University College – Yanbu Department of ACS & AIT Yanbu Al-Sinaiyah

  ‫ ا‬

2ND Semester 2007-08

CS-203 HANDOUT 1 (HO - 1) INTRODUCTION TO COMPUTER ORGANIZATION

Computers are large digital systems a group of components of digital circuits or blocks, that are integrated together to achieve a certain task. They are used to process digital information which consists of 0’s and 1’s. So let us come up with the basic building blocks for this computer. • • • • •

CPU (Arithmetic and Logic Unit and control unit) Input and Output devices Memory Devices The stored Program Buses

1. Central Processing Unit (CPU) CPU is brain of the whole computer system and is responsible for controlling and coordinating between all devices of computer. Internally CPU consists of the following. 1. 2. 3. 4. 5.

Control unit Arithmetic and Logic Unit Registers Internal buses External buses

1.1 Control Unit Control unit that controls and coordinates the operation of other units in the CPU and perform the following functions: 1. Coordinate the operation and translate the program instructions into microoperations to be performed by the different units inside CPU. This is called decoding of instructions. 2. Provide the control signals for other units of CPU to perform the different microoperations required to execute each instruction. The ALU and registers make up the computer's data path. The data path and control unit form the Central Processing Unit.

Prepared by: Khurram Tanvir

1

CS203 HO#1

ALU + registers = data path Data path + Control Unit = CPU

1.2 Arithmetic and Logic Unit (ALU) ALU is responsible for performing all mathematical and logical calculations like addition, subtraction, multiplication, division, AND, OR, XOR, NOT etc. Modern computers have multiple ALUs to be able to do multiple calculations at the same time (to increase speed). Fig shows the symbolic view of the ALU and its operation. An ALU has two inputs as well as selection lines. The selection lines specify the operation to be performed on the inputs.

1.3 Registers Registers are fastest storage elements similar to cache and are used to store temporary data or most frequently used data. Information is stored in named locations (not

Prepared by: Khurram Tanvir

2

CS203 HO#1

addressed locations) Information is accessed by specifying the name of the register where they exist There are two main types of registers in computer systems: 1. General Purpose Registers that are accessible to the programmers of the computer 2. Special Purpose Registers that are only used by the computer itself and can not be accessed by the programmer directly. 3. State-of-the-art computers contain large number of registers that are usually organized into one dimensional arrays called register files.

2. Input Devices Devices that can enter data to computers are called input devices. Examples of input devices include keyboards, Mouse, touch pads, light pens, joy sticks ...etc.

Examples of Input Devices

Prepared by: Khurram Tanvir

3

CS203 HO#1

3. Output Devices An output is used to output information from the computer and is used to output the data. Examples of output devices are monitors, printers ...etc. Input and output devices are also called peripheral devices.

4. Memory Devices A device that can store binary data and retrieve it for latter use. device. Memory devices are used for two purposes 1. store or write data (called a write operation) and 2. Get (or fetch) a stored piece of data (called a read operation). Nowadays, Computers have many types of memory devices:

4.1 Random-Access Memory (RAM) Usually called the main memory Used to store the information used by the computer It can be read and written to It does not store information permanently (when it is powered off, the stored information are gone); volatile memory 5. Information stored in it can be accessed in any order at equal time periods (hence the name random access) 1. 2. 3. 4.

Information is accessed by an address that specifies the exact location of the piece of information in the RAM.

4.2 ROM (Read-Only-Memory) 1. 2. 3. 4.

A read-only-memory, i.e. it stores information permanently; non-volatile Again has random access of stored information ROM is usually used to store the information required by the computer to start-up Recent types of ROMs that are used in PCs (personal Computers) are also called FLASH or CMOS

4.3 Cache Cache is a very fast type of RAM that is used to store information that is most frequently or recently used by the computer. Cache memory is used in between CPU and RAM. Recent computers have 2-levels of cache; the first level is faster but smaller in size (usually called internal cache) and is inside CPU, and the second level is slower but larger in size (external cache, normally outside CPU).

Prepared by: Khurram Tanvir

4

CS203 HO#1

CPU Cache RAM Secondary Storage (Hardisk, CD, floppy etc)

5. The Program This program consists of digital instructions. These instructions tell CPU what to do. So in other words, program guides the CPU to perform work accordingly. The program consists of bunch of instructions. Machine language instructions usually are made up of several fields. Each field specifies different information for the computer. The major two fields are: 1. Op-code 2. Operand Instruction = op-code + operand

Op-code (Operation code) An instruction field that specifies the particular operation that is to be performed by the instruction field which stands for operation code and it specifies the particular operation that is to be performed. Each operation has its unique opcode and may take the computer several micro-operations to accomplish. MOV, ADD, SUB are the examples of the Intel 8086 op-codes. Operands fields which specify where to get the source and destination operands for the operation specified by the op-code. The source/destination of operands can be the memory or one of the general-purpose registers. The set of all op-codes for a particular microprocessor defines instruction set for that processor.

Prepared by: Khurram Tanvir

5

CS203 HO#1

5.1

Micro-Operations

The CPU breaks down machine instructions into smaller operations that are called micro-operations. These micro-operations are performed by the control unit inside CPU to control different tasks of CPU. (i.e. the programmer does not specify them)

6. Buses Buses are parallel wires and are used to transport the digital signals among different devices inside computer. A bus typically consists of three basic sub types of buses. 1. Address Bus: Used to transport address signals from CPU to different devices. 2. Data Bus: used to transport data among different devices in computer. 3. Control Bus: used to transport control signals for controlling different devices.

Unlike a point-to-point connection, a bus can logically connect several peripherals over the same set of wires. Each bus defines its set of connectors to physically plug devices, cards or cables together.

Prepared by: Khurram Tanvir

6

CS203 HO#1

Example Test Questions Fill in the blanks 1. Digital instruction consists of two parts ____________ and ________________. 2. ________________ is a brain of computer. 3. Data path of CPU consists of two parts _______________ and ______________. Specify True or False 1. Special purpose registers can be changed by the user (True/False) 2. Registers are the fastest memory devices (True/False) 3. Cache is made of capacitors (True/False) Choose the best answer. The language which computer can actually understand is a. b. c. d.

C language Visual Basic .NET Machine Language Java

The set of all op-codes of a processor is called a. b. c. d.

Instruction set Machine set Program Software

Question: Explain the role of control unit in CPU. Describe with the help of figure.

Prepared by: Khurram Tanvir

7

CS203 HO#1

Related Documents