






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























Computer Organization & Assembly Languages Introduction
Defining a Computer System
Computer Architecture & Computer Organization Computer Architecture is like the blueprint of a house. It specifies the layout, rooms, and purpose of each space. Computer Organization is like the construction process: how bricks, wiring, plumbing, and materials are arranged to make the blueprint a reality.
Key Differences b/w Computer Architecture & Computer Organization Aspect Computer Architecture Computer Organization Definition Conceptual design and functional behavior of a computer system Physical implementation of components and their interconnections Focus Instruction set, addressing modes, data types, performance optimization Control signals, memory hierarchy, CPU registers, hardware wiring Perspective Programmer’s view – what the system can do Engineer’s view – how the system achieves it Examples RISC vs. CISC instruction sets, pipeline design, cache strategies Microarchitecture, bus systems, memory modules, ALU design Level of Abstraction High-level, abstract design Low-level, concrete implementation Design Stage Developed first, serves as a blueprint Comes later, realizing the architecture in hardware
CPU Structure
CPU Structure (cont.) ALU: Performs addition, subtraction, AND, OR, Comparisons Control Unit: Fetches, Decodes and Executes instruction Registers:
Example in Assembly (8086) MOV AX, 5 ; Load 5 into AX ADD AX, 3 ; Add 3 to AX Here, AX is a general-purpose register acting as an accumulator.
Instruction Cycle (Fetch–Decode– Execute)
1. Fetch - (^) The CPU retrieves the next instruction from memory (usually from the program counter, PC). - (^) The instruction is loaded into the Instruction Register (IR). - (^) The PC is updated to point to the next instruction.
Instruction Cycle (Fetch–Decode– Execute) (cont.)
Assembly Language Assembly Language is a low-level programming language that is close to machine code.
■Low-level language ⮚ (^) Each instruction performs a much lower- level task compared to a high-level language instruction ⮚ (^) Most high-level language instructions need more than one assembly instruction ■One-to-one correspondence between assembly language and machine language instructions ⮚ (^) For most assembly language instructions, there is a machine language equivalent ■Directly influenced by the instruction set and architecture of the processor
Comparisons with High-level Languages (cont.) Feature Assembly Language High-Level Language Level of Abstraction (^) Low-level, close to hardware High-level, closer to human language Ease of Learning (^) Difficult, requires hardware knowledge Easy, user-friendly syntax Execution Speed (^) Very fast (optimized, direct machine code) Slower (depends on compiler/interpreter) Control (^) Full control over hardware & memory Limited hardware control Portability (^) Not portable (machine dependent) Highly portable across platforms Development Time (^) Long (complex, detailed coding) Short (fast development with libraries) Use Cases (^) OS, device drivers, embedded systems Application software, web, enterprise apps
3 4 5 C version 1 0 2 0 20 40 60 80 100 Number of calls (in millions) Time (seconds) Multiplication time comparison on a 2.4-GHz Pentium 4 system ASM version