
Computer Architecture
Faculty of Computer Science & Engineering - HCMUT
Chapter 2
Instructions: Language of the
Computer
Binh Tran-Thanh
thanhbinh@hcmut.edu.vn

Objectives
8/13/2021 Faculty of Computer Science and Engineering 2
Compiler
swap(int v[], int k){
int temp;
temp =v[k];
v[k]=v[k+1];
v[k+1]=temp;
}
Assembler
swap: multi $2, $5, 4
add $2, $4, $2
lw $15, 0($2)
lw $16, 4($2)
sw $16, 0($2)
sw $15, 4($2)
jr $31
00000000101000100000000100011000
00000000100000100001000000100001
10001101111000100000000000000000
10001110000100100000000000000100
10101110000100100000000000000000
10101101111000100000000000000100
00000011111000000000000000001000

Abstract layer of ISA
▪Coordination of many levels (layers) of abstraction
8/13/2021 Faculty of Computer Science and Engineering 3
Application (ex: browser)
I/O systemProcessor
Digital Design
Circuit Design
Instruction Set
Architecture
Datapath & Control
transistors
Memory
Operating
System
(Mac OSX)
Hardware
Software
Assembler
Compiler

Von Neumann Architecture
▪Stored program concept
▪Instruction category
▪Arithmetic
▪Data transfer
▪Logical
▪Conditional branch
▪Unconditional jump
8/13/2021 Faculty of Computer Science and Engineering 4
Memory unit
Central
Processing Unit
outputinput
Control unit
ALU

Harvard architecture
8/13/2021 Faculty of Computer Science and Engineering 5
Data memory
Input/
output
ALU
Control unit Instruction
memory

