‹ back to Computer Architecture

LectureComputer Architecture · 13 October 2015

Computer Architecture. Lecture 1

What is all this course about ? 

We have already studied this programming. Why again ? 

Why Assembly ? Why not C++ or C # or Pascal? 

What is Computer 

Input OutPut 

Memory 

Processor 

What is difference between organization and assembly 

Understanding Basics of Buses 

Q. Hey how this data is transferred b/w these blocks 

Understanding Basics of Addresses 

Activity time 

Understanding basics operations 

Hey there is a big problem. 

Understanding basic of Registers 

Accumulator Register 

Pointer/Index/Base Register 

Flags / Program Status Word Register 

Program Counter / Instruction Pointer 

What is all this course about ?

This course gives us a insight how does a computer works. How does this computer really thinks and process different commands. The course is oriented in practical manner. We will be lookin at IBM and interl processor. And we will doing lot of programming

We have already studied this programming. Why again ?

Well in previous programming we were using high level languages, which do no let us allow to look at insight of computer operations. However in this course ASSEMBLY helps us allow to understand the basic level operations of computer.

Why Assembly ? Why not C++ or C # or Pascal?

All over the world compilers are available in different languages and with different syntax. However it is not possible for us to understand all the languages and compiler.

So basically we need to understand that all these compiler TRANSLATE the codes into assembly instruction and then request computers to process it

What is Computer

A Computer can be considered as a basic block of three things

1. Input / out Put

2. Processor

3. Meemory

Input OutPut

As the name suggests the input and output lets the computer interface with the external world. They help the computer to respond sense and perform actions, and tha further using the other two blocks it can save or process the data , to provide a particular out put

Memory

Memory is used to store data or to provide data to “PROCESSOR”.

Processor

Processor process the data (READ)

Process must be enable to pinpoint the exact data to be read or processed

Process must be enable to transfer data

Processor must be able to write data

Exercise time 1.1

Name the Basics components of computer
List the key words for I/O devices
List the key words for Processor
List the key words for Memory

Name some Input Output devices

What is difference between organization and assembly

The organization is the view of computer design from user point of view (software), whereas architecture is designer point of view (hardware)

Example

Let’s say we have multiplier in a processor. Let see how it is approached in architecture and organizational view.

Organizational Viewà Hey there is a multiplier, just give it input and get out put

Architecture point of view à Oh!! We need to build a hardware processor, so a user can use it

Understanding Basics of Buses

Q. Hey how this data is transferred b/w these blocks

Well for carrying out a particular operation, first we need to ask memory, where particular data is stored. This is done by processor, by sending the “Address” OD particular data stored in a particular memory. This data is travelled via wires “collectively” known as Bus, or in our particular case, it is called address bus.

Hence a bus is group of signals

Similarly once the address of a particular data is identified, we know need a bus that can carry that data and forward it to processor and from processor to memory. Hence called data bus

Similarly there is a group of signals, which inform us what operations to carry out and how to control the process, and is called control bus. The control bus inform that either processor wants to read (data flow from memory à bus) or either want to write (processoràmemory)

Exercise time 1.2

What are busses? Name them. Draw the block diagram to connect the buses

Understanding Basics of Addresses

Activity time

Ask your friend who cannot read Urdu, to pick a book for you (marked red) from an Urdu book shelf, and give it to you. After you have read it, ask it to place in the shelf marked with black arrow

Hence we will need to tell him two number. The shelf number (vertical) and number of book (horizontal)

· The addresses also work in same manner. We need to inform the addresses to memory (in a stack) in vertical and horizontal (size of address, normally 8 bit)

· The memory can be said to divide into cell.

· The address bus generate a binary number, which gives us information of memory cell, and its size.

· Hence the size of data bus and memory width should be equal.

Understanding basics operations

Let’s say processor want to add. Here we need to understand what operand is. Operand is that data element on which operation is carried out. So if we are adding two numbers we need two operands

Hey there is a big problem. As per previous discussion, processor can only read from one memory cell and if we want to add two numbers. We need two operands. But we know that our processor can only read from one memory cell. So the question is, how can it carry put operations on two operands

We all know that at one time we can access data only from one memory cell. But in carrying most operations we need two memory locations (like addition, subtractions). In this case, the processor store data of first memory cell in its own memory, called “Register (scratch pad ram)” and then carries out the operation using data stored in register and the data stored second memory cell.

Every processor have limited registers as compared to memory. Some companies name them as r0, r1, r2 or A, B, C etc.

Understanding basic of Registers

Although different manufactures name their registers independently. We were have a look at Intel architecture regarding their registers.

Accumulator Register

Function

1. Mathematical and logical operations are carried out in this register

2. Example add, subtract, or gate

3. The 8 bit processor means the accumulator is also 8 bit

Pointer/Index/Base Register

1. Stores addresses not data

2.An index register in a computer’s CPU is a processor register used for modifying operand addresses during the run of a program

Questions Why we need to store addresses

Well let’s sat we declare an array of 10 bits. In memory 10 consecutive addresses will be given to this array. Now using a for loop we want to set them equal to zero.

In this case we do not need to know the data inside memory. All we do is, that we give the address of first memory location to processor and ask processor to over write the “0” in memory location. Than second third and so on

Flags / Program Status Word Register

Flag register can be of 8 bit 16 bit or 32 bit. Each bit in this flag represents or show some separate information.

Let’s have a look at 8 bit flag register

C O P D Z I A S

Now let’s have a look at a particular flag. We will discuss other flags later in this course

C= Carry Flag

Let’s say we add two numbers

1100

1111

First published on fatsup.wordpress.com ↗