You are on page 1of 31

COM113 Computer Architecture&

Organisation
By
Maganda Evans Tabingwa
BIT, MSE, PhD-MIS (Cont..)
INTRODUCTION
 HI ALL

 WELCOME TO MY ONLINE COMPUTER ORGANISATION & ARCHITECTURE CLASS

 NAME:
 MAGANDA EVANS TABINGWA

 QUALIFICATIONS:
 BIT, MSE & PhD Student-MIS (Walden University)

 TEACHING EXPERIENCE:
 15 YEARS
TEACHING EXPERIENCE TRACK…
 DIGITAL LOGIC

 E-COMMERCE & E-BUSINESS

 SOTWARE SYSTEMS ENGINEERING

 COMPLEXITY & APPLIED SYSTEMS THINKING

 ARTIFICIAL INTELLIGENCE

 DECISION SUPPORT SYSTEMS

 MULTIMEDIA SYSTEMS

 E-COMMERCE

 ETC
MY PASSION
 SERVICE TO:

 GOD THE ALMIGHTY

 FAMILY

 PANAFRICANISM

 HUMANITY
MY PERSONAL WHY
 Tanya Innovations Africa & Tanya Innovations Academy

 YouTube

 Facebook

 Instagram

 Twitter

 www.tanyainnovations.com
Overview
General learning Outcomes for Employability,
Entrepreneurship & Ethical leadership
 Communication skills
 Collaboration & Teamwork
 Critical thinking skills
 Creativity and Design thinking
 Digital Literacy
 Learning how to learn
 Entrepreneurship
 Time Management
 Ethical Leadership
Specific learning Outcomes
Resources
 Electronic books

 Online MOOC

 Online Tutorial

 Summarized PowerPoint notes on the platform

 Weekly YouTube videos


TABLE OF CONTENTS FOR COM 113
WEEK CONTENT
Week 1
Week 2
Week 3
Week 4
Week 5
Week 6 Continuous Assessment Test One (CAT 1)
Week 7
Week 8
Week 9
Week 10
Week 11
Week 12 CAT2
Week 13
Week 14
Week 15
 ASSESSMENTS

 Continuous Assessment 1 =20%


 Continuous Assessment 2 =20%
 Final Exam =60%
Instruction Set Architecture
 Interface between your hardware and the software. The only way that you can interact with
the hardware is the instruction set of the processor.

 To command the computer, you need to speak its language and the instructions are the words
of a computer’s language and the instruction set is basically its vocabulary.

 ISA is the portion of the machine which is visible to either the assembly language
programmer or a compiler writer or an application programmer.

 It is the only interface that you have, because the instruction set architecture is the
specification of what the computer can do and the machine has to be fabricated in such a way
that it will execute whatever has been specified in your ISA.
ISA
 Let us assume you have a high-level program written in C which is independent of the architecture on
which you want to work.

 This high-level program has to be translated into an assembly language program which is specific to a
particular architecture

 Human like High level language cant be understood by computer which only understands machine
language of 1’s and 0’s.

 So this assembly language will have to be finely translated into machine language, object code which
consists of zeros and ones.

 So the translation from your high-level language to your assembly language and the binary code will have
to be done with the compiler and the assembler.
ISA Taxonomy

 ISA varies based on internal storage in a processor, ISA can be classified as


follows based on where operands are stored and whether named explicitly or
implicitly.
 Single accumulator organisation
 General register organisation
 Stack organisation
Features to Consider When Designing
ISA
 Types of instructions (Operations in the Instruction set)

 Types and sizes of operands

 Addressing Modes

 Addressing Memory

 Encoding and Instruction Formats

 Compiler related issues


Types of Instructions
 What are the various instructions that you want to support in the ISA

 The tasks carried out by a computer program consist of a sequence of small steps, such as;
 multiplying two numbers,
 moving a data from a register to a memory location,
 testing for a particular condition like zero,
 reading a character from the input device or
 sending a character to be displayed to the output device, etc..
Types of Instructions

 Data transfer instructions

 Data manipulation instructions

 Program sequencing and control instructions

 Input and output instructions


Data Transfer Instructions
 Data transfer instructions perform data transfer between the various storage places in the
computer system, viz. registers, memory and I/O.

 Since, both the instructions as well as data are stored in memory, the processor needs to read
the instructions and data from memory.

 After processing, the results must be stored in memory

 Therefore, two basic operations involving the memory are needed, namely;
 Load (or Read or Fetch) and
 Store (or Write).
Data Transfer Instructions…..

 The Load operation transfers a copy of the data from the memory to the processor
and the Store operation moves the data from the processor to memory.

 Other data transfer instructions are needed to transfer data from one register to
another or from/to I/O devices and the processor.
Data Manipulation Instructions
 They perform operations on data and indicate the computational capabilities for the processor.

 These operations can be arithmetic operations, logical operations or shift operations

 Arithmetic operations include addition (with and without carry), subtraction (with and without
borrow), multiplication, division, increment, decrement and finding the complement of a number.

 The logical and bit manipulation instructions include AND, OR, XOR, Clear carry, set carry, etc.
Similarly, you can perform different types of shift and rotate operations.
Sequential flow of instructions
 instructions that are stored in consequent locations are executed one after the other.

 program sequencing and control instructions that help you change the flow of the program

 Add instruction in a program loop, as shown below:


 Move N, R1
 Clear R0
 LOOP Determine address of “Next” number and add “Next” number to R0
 Decrement R1
 Branch > 0, LOOP
 Move R0, SUM
 The loop is a straight-line sequence of instructions executed as many times as needed
Branch instructions

 This type of instruction loads a new value into the program counter.

 As a result, the processor fetches and executes the instruction at this new address,
called the branch target, instead of the instruction at the location that follows the
branch instruction in sequential address order.

 The branch instruction can be conditional or unconditional


Branch instructions….

 An unconditional branch instruction does a branch to the specified address


irrespective of any condition.

 A conditional branch instruction causes a branch only if a specified condition is


satisfied. If the condition is not satisfied, the PC is incremented in the normal way,
and the next instruction in sequential address order is fetched and executed.
Input and Output Instructions

 Input and Output instructions are used for transferring information between the
registers, memory and the input / output devices.

 It is possible to use special instructions that exclusively perform I/O transfers, or


use memory – related instructions itself to do I/O transfers.
INSTRUCTION FORMATS
Instruction Formats Instruction
 Refers to form in which information is presented to  Made up of a combination of an
the processor.
 Operation Code and some way of
 The number of bits in the instruction is divided into specifying an:
groups called fields.
 Operand most commonly by its
 The most common fields found in instruction formats
 Location or
are;
 address in memory.
1. An operation code field that specifies the operation to be
performed. The number of bits will indicate the number of
operations that can be performed.

2. An address field that designates a memory address or a


processor register. The number of bits depends on the size
of memory or the number of registers.  Instruction Formats can be
 Fixed
3. A mode field that specifies the way the operand or the  Variable
effective address is determined. This depends on the
number of addressing modes supported by the processor.
Interpreters and Compilers
 Compilers and Interpreters:
 Software that assists in the conversion of high-level languages (human
understandable) into codes that computers can understand called machine codes
(binary systems).

 Compilers and Interpreters are types of system software

 A language processor that converts a program written in high-level language into


machine language, entire program at once, is called a compiler

 A language translator that converts a high-level language program into a machine


language program, one line at a time, is referred to as an interpreter.
Compiler & Interpreter ……

 Compiler  Interpreter
 A compiler scans whole program and  Is much slower than compiler because
then check it for syntactic and semantic scan and translate only one statement of
error, once the code is checked for errors, the program at a time. Therefore,
it is converted into an object code. Then, interpreters convert the source code into
it can be processed by the machine to machine code during the execution of the
perform the corresponding task. program.

 The common programming languages  The programming languages that use


that use compiler are C, C++, C#, etc. interpreters are Perl, Ruby, Python,
METLAB, etc

 Object code: Compilers convert the


source code to object code.  Object code: Interpreters do not convert
the source code into object code.
Compiler & Interpreter ……

Compiler…. Interpreter….
 Takes less execution time hence preferred for  Takes more execution time hence not
production. preferred for production. It is ideal for use in
a programming and development
environment.
 Compilers that translate source code to
machine code target specific operating systems
and computer architectures.  An interpreter is highly useful for scripting
and other small programs since it reads and
 Some compilers can translate source code into then executes code in a single process. As a
another high-level programming language, result, it’s frequently seen on Web servers that
rather than machine code or byte code (Referred run a lot of executable scripts. It’s also used
to as transpiler,transcompiler, source-to-source during the development stage of software to
translator or it might go by another name. For test small bits of code one at a time rather
example, a developer might use a transpiler to than compiling the entire program each time.
convert COBOL to Java.
Compiler & Interpreter ……

 Compiler  Interpreter
 Errors detected:  Errors detected:
 Compiler can check syntactic and  Interpreter checks the syntactic errors only
semantic errors in the program

simultaneously
Size:
 Size:
 Compiler are smaller in size.
 Compiler are larger in size.
Flexibility:
 Flexibility:
Interpreters are flexible
 Compilers are not flexible.

You might also like