# Lecture - 2 - References Computer Science 230H The...

This preview shows pages 1–3. Sign up to view the full content.

Computer Science 230H Instructions: Language of the Computer (Using MIPS) Prepared by Michael Jack - Fall 2007 ISA 2 References The information and figures for the following slides were prepared from the following source: – Patterson, D., and Hennessy J., Computer Organization and Design, 3rd edition, 2005 ISA 3 Introduction To command a computer’s hardware, you must speak its language. The words of a computer language are called instructions , and its vocabulary is called an instruction set . Computer languages are fairly similar – once you learn one, it is easy to pick up others. – All computers are constructed from hardware technologies based on similar underlying principles. – There are a few basic operations that all computers must provide. By learning how to represent instructions, you will also discover the secret of computing: the stored-program concept . – Stored-program concept is the idea that instructions and data of many types can be stored in memory as numbers, leading to stored program computer. The chosen instruction set comes from MIPS. – MIPS microprocessors are found in products from ATI Technologies, Broadcom, Cisco, NEC, Nintendo, Silicon Graphics, Sony, Texas Instruments, and Toshiba, among many others. ISA 4 Operations of the Computer Hardware Every computer must be able to perform arithmetic. The following MIPS assembly language notation instructs the computer to add the two variables b and c and to put their sum in a . add a, b, c This notation is rigid in that MIPS arithmetic instruction: Performs only one operation Must always have exactly three operands Operand order is fixed (destination first) E.g. suppose we want to place the sum of variables b , c , d , and e , into variable a . The following sequence of instructions adds the four variables: add a, b, c // The sum of b and c is placed in a. add a, a, d // The sum of b, c, and d is now in a. add a, a, e // The sum of b, c, d, and e is now in a. It takes 3 instructions to take the sum of four variables.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
ISA 5 Operations of the Computer Hardware Unlike other programming languages, each line of this language can contain at most one instruction and comments always terminate at the end of a line. The natural number of operands for an operation like addition is 3: – The two numbers being added together and a place to put the sum Requiring every arithmetic instruction to have exactly 3 operands conforms to the philosophy of keeping the hardware simple. Design principle 1
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/14/2010 for the course COMPUTER S COIS-3030 taught by Professor Hircock during the Spring '10 term at Trent University.

### Page1 / 5

Lecture - 2 - References Computer Science 230H The...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online