Computer Architectures
-
Upload
ahmad-bilal -
Category
Documents
-
view
5 -
download
1
description
Transcript of Computer Architectures
![Page 1: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/1.jpg)
Computer Architecture :Lecture 2
![Page 2: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/2.jpg)
Understanding Basics of Addresses
• 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
![Page 3: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/3.jpg)
Understanding Basics of Addresses
• Hence we will need to tell him two number. The shelf number (vertical) and number of book (horizontal)
![Page 4: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/4.jpg)
Understanding Basics of Addresses
1. The addresses also work in same manner. We need to inform about the addresses to memory (in a stack) in vertical and horizontal (size of address, normally 8 bit)
2. The memory can be said to divide into cell.3. The address bus generate a binary number,
which gives us information of memory cell, and its size.
• Early processors used a wire for each bit of the address width. For example, a 16-bit address bus had 16 physical wires making up the bus.
![Page 5: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/5.jpg)
The big problem
• 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
![Page 6: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/6.jpg)
The 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
![Page 7: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/7.jpg)
What an Idea Sir jee
• 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.
![Page 8: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/8.jpg)
Understanding basic of Registers
![Page 9: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/9.jpg)
• Although different manufactures name their registers independently. We here have a look at general architecture regarding the registers Accumulator Register Pointer/Index/Base Register Flags / Program Status Word Register
![Page 10: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/10.jpg)
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
![Page 11: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/11.jpg)
Pointer/Index/Base Register
• . Stores addresses not data• An index register in a computer's CPU is a
processor register used for modifying operand addresses during the run of a program,
![Page 12: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/12.jpg)
Why we need to store addresses
![Page 13: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/13.jpg)
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.
![Page 14: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/14.jpg)
Instruction Groups
• We all know that computer works with the help of instructions. We have divided the different instructions in different groups, for better understanding. Their name are as follow:- Data Movement instructions Arithmetic / Logic Instructions\ Program Control Instruction Special instructions
![Page 15: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/15.jpg)
• 1Data Movement instructions a. Deals with data movement from memory to processor or
processor to memory b. Deal with movement from register to register or from
register to memory / processor• 2. Arithmetic / Logic Instructions
a. Deals with mathematical function ( + , – multiply ) or logical functions (and, Xor)
• 3. Program Control Instruction a. We know normally the instructions are carried out one by
one (consecutively) . However some times we do not need to run consecutive instruction. For these purposes , such commands are use (You man like to think about command “if”)
• 4. Special instructions a. They are used to force processor to change its behavior
as per our will
![Page 16: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/16.jpg)
DATA MOVEMENT Instructions
• a. Deals with data movement from memory to processor or processor to memory
• b. Deal with data movement from register to register or from register to memory / process
![Page 17: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/17.jpg)
Arithmetic / Logic Instructions
• a. Deals with mathematical function ( + , – multiply ) or logical functions (and, Xor)
Add ax,1234 Add 1234 with ax
Add bx,ax add ax to bx
Add bx,[1212] add data from address and add it to bx
![Page 18: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/18.jpg)
Program Control
• a. We know normally the instructions are carried out one by one (consecutively) . However some times we do not need to run consecutive instruction. For these purposes , such commands are use (You man like to think about command “if”)
Cmp ax,0 compare ax with 0
Jne 1234 jump if not equal to the instruction
and mov at address 1234
![Page 19: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/19.jpg)
Special Instruction
Cli disable interrupts
![Page 20: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/20.jpg)
Special instructions
• . They are used to force processor to change its behavior as per our will
Cli disable interrupts
![Page 21: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/21.jpg)
The First Commercial Success : Study Case
• Model : IBM PC• Reason : Easily available platform , and free
software available to program• Processor: IAPX88 (Intel Advance Processor 88)• This was the first processor that was implanted on a
IBM system. It was the first commercial success. Later on intel released IAPX 38086
• IAPX88 was a 16 bit microprocessor.• Intel created 4 bit processors , however the first 8 bit
processor by intel was 8080. Later on a advance version 8085 was introduced, which was 8 bit processor but had more computational power as compared to its ancestors
• The 8088 had a 1 MB memory , which was a big achievement. The first IBM Machine had 4.1 Mhz , which was considered a high speed.
![Page 22: Computer Architectures](https://reader030.fdocuments.us/reader030/viewer/2022032515/563db808550346aa9a8fee3b/html5/thumbnails/22.jpg)
Register Architecture