CS1104 – Computer Organization
PART 2: Computer Architecture
Textbook: Computer Organization by Hamacher,
Vranesic and Zaky. McGrawHill. I shall mention
which parts of this book should be read.
I shall provide slides and some notes. Please go
through these too.
Instructor: Samarjit Chakraborty,
Office: S14 #06-04. Phone: 6874 7997.
Office hours: Thursdays 12 to 2 pm. Please come
and see me if you have questions/doubts
There will be tutorials and assignments as before.
Only 2 labs for this part on October 20 & 27.
Mid-term test on Oct 29, Wednesday
Why study this course?
The prospective software engineer, writing a
• Why should I declare variable “x” to be an integer rather
than floating point?
• Should I use array or linked-list as my data structure?
• Should I use multiplication, or implement it as repeated
The embedded systems programmer developing
code for a Palm Zire 71 or Sony Clie or a
• How is the memory of this device organized? What
instructions are supported?
• I need to program it in assembly language!!
Why study this course?
The prospective computer/hardware engineer (say
working at Intel and developing the future Pentium
• Needs to have a strong background in Computer
- Basic understanding of how a computer works and what is
its internal organization
- Foundation for more advanced courses
- Necessary for hardware engineers as well as for all kinds
of software developers
This course is about…
Desktop computing: Programs with
integer and floating point data
types, no regard for code size and
Servers: Database, file server, web
and time-sharing applications for
many users. Integer and string
operations more important than
Embedded computing: Values cost,
power and code size. Floating point
operations might be restricted to
Cost/Performance/Power/Size Tradeoffs!!! 5
The global picture
Instruction set Memory organization I/O system
Datapath & Control
Digital Design PART 1
Program to Execution: The Flow
Program in Link multiple
High-level language machine-language programs
(C, Pascal, etc) to one program
Load program into
into assembly language
to machine language
Processor Memory Devices
Representing instructions in computer:
Add R0, R1, R2 means R2 R0 + R1
0 17 18 8 0 32
000000 10001 10010 01000 00000 100000
6 bits 5 bits 5 bits 5 bits 5 bits 6 bits
op rs rt rd shamt funct
Basic Source Destination Shift
operation Operand register amount
variants of the op field
The Clock Fetch
Everything in one clock cycle OR
each step in one cycle? Instruction
Pipeline instruction execution? Decode
The Memory Operand
How much time does it take to Fetch
How is it organized? Cache? Execute
How many buses? Avoid bus Result
conflicts … Store