This document discusses computer system architecture and the different levels of a computer system. It begins by defining a computer and machine language, which consists of binary instructions. It then describes different levels of a computer from the digital logic level up to the problem-oriented language level. These levels include the microarchitecture, instruction set architecture, operating system, and assembly language levels. The document also discusses the relationship between hardware and software and how the boundary between them has blurred over time with the addition of new levels. It concludes with exercises about machine language, interpretation vs. translation, multilevel machines, and differences between two-level and six-level machines.
Introduction to ArtificiaI Intelligence in Higher Education
Computer System Architecture Lecture Note 1: introduction
1. Computer System Architecture
CSC 203 1.5
Computer System Architecture
Budditha Hettige
Department of Statistics and Computer Science
University of Sri Jayewardenepura
1
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.php
3. Computer System Architecture
What is Computer?What is Computer?
• Is a machine that can solve problems for
people by carrying out instructions given to it
• The sequence of instructions is call Program
• The language machine can understand is call
machine language
3Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
4. Computer System Architecture
What is Machine Language?What is Machine Language?
• Machine language(ML) is a system of instructions and
data executed directly by a computer's Central Processing
Unit
• The codes are strings of 0s and 1s, or binary digits (“bits”)
• Instructions typically use some bits to represent
– Operations (addition )
– Operands or
– Location of the next instruction.
4Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
5. Computer System Architecture
Machine Language contd..Machine Language contd..
• Advantages
– Machine can directly access (Electronic circuit)
– High Speed
• Disadvantages
– Human cannot identify
– Machine depended
(Hardware depended)
5Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
6. Computer System Architecture
More on MachinesMore on Machines
• Machine defines a language
– Set of instructions carried out by the machine
• Language defines by the machine
– Machine executing all the program, writing in the
language
Machine LanguageLanguageLanguageLanguage
6Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
7. Computer System Architecture
Two Layer (Level) MachineTwo Layer (Level) Machine
• This machine
contains only New
Language (L1) and
the Machine
language (LO)
Virtual Machine (L1)
Machine Language (L0)
Translate/
Interpreter
MachineMachine
Virtual
Machine
(L1)
Machine
Language
(L0)
7Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
8. Computer System Architecture
Translation (LTranslation (L11 →→ LL00))
1. Replace each instruction written in L1 in to LO
2. Program now execute new Program
3. Program is called compiler/ translator
8Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
10. Computer System Architecture
Multi Level MachineMulti Level Machine
10Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
High-level Language Program (C, C++)
Assembly Language Program
Machine Language
12. Computer System Architecture
Six-Level MachineSix-Level Machine
• Computer that is designed up to the 6th level of computer
architecture
12Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
13. Computer System Architecture
Digital Logic LevelDigital Logic Level
• The interesting objects at this level are gates;
• Each gate has one or more digital inputs (0 or 1)
• Each gate is built of at most a handful of
transistors
• A small number of gates can be combined to
form a 1-bit memory, which can store a 0 or 1;
• The 1-bit memories can be combined in groups
of, for example, 16, 32 or 64 to form registers
• Each register can hold a single binary number
up to some maximum;
• Gates can also be combined to form the main
computing engine itself.
13Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
14. Computer System Architecture
Microarchitecture levelMicroarchitecture level
• A collection of 8-32 registers that form a local
memory and a circuit called an ALU
(Arithmetic Logic Unit) that is capable of
performing simple arithmetic operations;
• The registers are connected to the ALU to form
a data path over which the data flow;
• The basic operation of the data path consists of
selecting one or two registers having the ALU
operate on them;
• On some machines the operation of the data
path is controlled by a program called a
microprogram, on other machine it is
controlled by hardware.
14Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
16. Computer System Architecture
Instruction Set Architecture LevelInstruction Set Architecture Level
• The ISA level is defined by the
machine’s instruction set
• This is a set of instructions carried
out interpretively by the
microprogram or
hardware execution sets
16Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
17. Computer System Architecture
Operating System LevelOperating System Level
• Uses different memory organization, a new set of
instructions, the ability to run one or more
programs concurrently
• Those level 3 instructions identical to level 2’s
are carried out directly by the microprogram (or
hardwired control), not by the OS;
• In other words, some of the level 3 instructions
are interpreted by the OS and some of the level 3
instructions are interpreted directly by the
microprogram;
• This level is hybrid
17Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
18. Computer System Architecture
Assembly Language LevelAssembly Language Level
• This level is really a symbolic form
for the one of the underlying
languages;
• This level provides a method for
people to write programs for levels 1,
2 and 3 in a form that is not as
unpleasant as the virtual machine
languages themselves;
• Programs in assembly language are
first translated to level 1, 2 or 3
language and then interpreted by the
appropriate virtual or actual machine;
• The program that performs the
translation is called an assembler.
18Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
19. Computer System Architecture
Between Levels 3 and 4Between Levels 3 and 4
• The lower 3 levels are not for the
average programmer – Instead they
are primarily for running the
interpreters and translators needed
to support the higher levels;
• These are written by system
programmers who specialise in
developing new virtual machines;
• Levels 4 and above are intended for
the applications programmer
• Levels 2 and 3 are always
interpreted, Levels 4 and above are
usually, but not always, supported
by translation;
19Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
20. Computer System Architecture
Problem-oriented Language LevelProblem-oriented Language Level
• This level usually consists of
languages designed to be used by
applications programmers;
• These languages are generally called
higher level languages
• Some examples: Java, C, BASIC,
LISP, Prolog;
• Programs written in these languages
are generally translated to Level 3 or
4 by translators known as compilers,
although occasionally they are
interpreted instead;
20Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
21. Computer System Architecture
Multilevel Machines: HardwareMultilevel Machines: Hardware
• Programs written in a computer’s true machine language (level 1)
can be directly executed by the computer’s electronic circuits (level
0), without any intervening interpreters or translators.
• These electronic circuits, along with the memory and input/output
devices, form the computer’s hardware.
• Hardware consists of tangible objects:
– integrated circuits
– printed circuit boards
– Cables
– power supplies
– Memories
– Printers
• Hardware is not abstract ideas, algorithms, or instructions.
21Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
22. Computer System Architecture
Multi level machine SoftwareMulti level machine Software
• Software consists of algorithms (detailed instructions
telling how to do something) and their computer
representations-namely, programs
• Programs can be stored on hard disk, floppy disk, CD-
ROM, or other media but the essence of software is the set
of instructions that makes up the programs, not the physical
media on which they are recorded.
• In the very first computers, the boundary between hardware
and software was crystal clear.
• Over time, however, it has blurred considerably, primarily
due to the addition, removal, and merging of levels as
computers have evolved.
• Hardware and software are logically equivalent
22Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
23. Computer System Architecture
The Hardware/Software BoundaryThe Hardware/Software Boundary
• Any operation performed by software can also be
built directly into the hardware;
• Also, any instruction executed by the hardware
can also be simulated in software;
• The decision to put certain functions in hardware
and others in software is based on such factors as:
– Cost
– Speed
– Reliability and
– Frequency of expected changes
23Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php
24. Computer System Architecture
ExercisesExercises
1. Explain each of the following terms in your
own words
– Machine Language
– Instruction
1. What are the differences between
Interpretation and translation?
2. What are Multilevel Machines?
3. What are the differences between two-level
machine and the six-level machine
24Budditha Hettige http://www.dscs.sjp.ac.lk/~budditha/index.php