Presentation is loading. Please wait.

Presentation is loading. Please wait.

Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.

Similar presentations


Presentation on theme: "Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students."— Presentation transcript:

1 Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students

2 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 1 / 9 Basic Computer Organization  The 5 Classic Components of a Computer  The Basic Hardware/Software Interface  The Stored-Program Concept IT Students

3 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 2 / 9 RISC & CISC  Reduced Instruction Set Computer ●The storage concept (32 bits): ♦ Registers (R1, R2 … R31) ♦ Memory ●Arithmetic operations: ♦ Simple ♦ Limited to registers  Complicated Instruction Set Computer ●IA-32 IT Students

4 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 3 / 9 Instructions  Assembly Language Instruction: Perform:a = b + c ADDa, b, c; a  b + c What are ‘a’, ‘b’ and ‘c’?  Sequence of Instructions: Perform: a = (b + c) – (d + e) IT Students

5 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 4 / 9 Memory Operands  Data Transfer Instructions ●Memory Address (Location) ●Slower than registers  Load and Store Instructions 0 1 2 Memory IT Students

6 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 5 / 9 Constant Operands  Memory Operands Perform a = b + 4  Immediate Operands Memory b 4 21 22 IT Students

7 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 6 / 9 Memory Access  Height and Width 1 KB 4 KB  Address & Data 16 Locations  1 K Locations  1 M Locations   Read & Write Memory 4 3 0 1 21 22 1024 8 bit 1 KB IT Students

8 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 7 / 9 Stored Program Architecture Instructions (Program) Operands (Data) Memory 1024 x 32 OpcodeOperands Binary Operand IT Students

9 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 8 / 9 Memory Organization  Byte Access  Word Access 20 Byte 21 Byte 20 Byte Byte Byte Byte 24 Byte Byte Byte Byte 20 Byte Byte 22 Byte Byte IT Students

10 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 9 / 9 Instruction Representation  Instruction Format  Machine Language & Machine Code Sequence of instructions OpcodeOperands ADD R1, R2, 47 5 1 2 2F 01010001001000101111 5 1 2 2 F Assembly Language Machine Language IT Students

11 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 2

12 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 2 Exercise 1  Write an assembly language program to perform a+2b where ‘a’ and ‘b’ are stored in R1 and R2.  Write an assembly language program to swap two locations at memory addresses 10 and 20.  Rewrite the following program to run faster: SUB R1, R1, R1 INC R1 ADD R2, R3, R1  A memory has 4 bits of address and 4 bits of data. Determine the total number of bits inside it. IT Students

13 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 2 Exercise 2  Determine the value of R1: LD R1, M [ 43 ]  Write the assembly instruction at 44.  Assuming 8-bit registers, determine the value of R1: Load Immediate R1, Binary ‘11110010’ Arith Shift Right R1  Assuming i and j are integers, R1= i and R2 = j, write the C- language statement for: Compare R1, R2 Jump Equal Label_1 Clear R1 Label_1: Clear R2 IT Students 4000100011010001010000000100010000 4410110001000110100001001000010001 Opcode Operand 1 Operand 2 Operand 3 Add (= B1)Reg (5 bits) Add (= B2)Reg (5 bits) Constant


Download ppt "Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students."

Similar presentations


Ads by Google