Vector Operations and Indexing Competency: C5 Lecture no. 20.

Slides:



Advertisements
Similar presentations
Etter/Ingber Arrays and Matrices. Etter/Ingber One-Dimensional Arrays 4 An array is an indexed data structure 4 All variables stored in an array are of.
Advertisements

The simple built-in data types of the C language such as int, float, - are not sufficient to represent complex data such as lists, tables, vectors, and.
Microprocessors.
Central Processing Unit
MIPS assembly. Review  Lat lecture, we learnt  addi,  and, andi, or, ori, xor, xori, nor,  beq, j, bne  An array is stored sequentially in the memory.
1 System Calls (TRAPS) and Subroutines Patt and Patel Ch. 9.
ARITHMETIC LOGIC SHIFT UNIT
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
9/20/6Lecture 3 - Instruction Set - Al1 Exception Handling (2)
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Overview The Operate Instructions - ADD, AND, NOT The Data Movement Instructions - Load, Load Address, Store Example Using Operate & Data Movement The.
Lecture 14: Review Intro to IT COSC1078 Introduction to Information Technology Lecture 14 Revision and Review James Harland
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Translating high level language into machine code
Chap 4 & 5 LC-3 Computer LC-3 Instructions Chap 4 Homework – due Monday October 27 Chap 5 Homework – due Wednesday October 29 Project 2 Designs (Working.
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
1 CS Programming Languages Random Access Machines Jeremy R. Johnson.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
A Simple Tour of the MSP430. Light LEDs in C LEDs can be connected in two standard ways. Active high circuit, the LED illuminates if the pin is driven.
DAT2343 Accessing Services Through Interrupts © Alan T. Pinck / Algonquin College; 2003.
Chapter 1 Basic Structure of Computers. Chapter Outline computer types, structure, and operation instructions and programs numbers, arithmetic operations,
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
Array Cs212: DataStructures Lab 2. Array Group of contiguous memory locations Each memory location has same name Each memory location has same type a.
Microprogrammed Control Unit Control Memory Sequencing Microinstructions Microprogram Example Design of Control Unit Microinstruction Format.
Execution of an instruction
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Lec 5 Basic Computer Organization
© Mike Stacey 2008 Single Chip Microcontrollers 7765J Mount Druitt College of TAFE Lesson 3 Arrays in ASM, Bubble Sort algorithm.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
M. Mateen Yaqoob The University of Lahore Spring 2014
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
Memory Addressing Techniques. Immediate Addressing involves storing data in pairs with immediate values register pairs:
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 8.
Instruction.
COMMON BUS SYSTEM Registers The registers in the Basic Computer are connected using a bus This gives a savings in circuitry over complete connections between.
PHY 201 (Blum)1 Stacks Based in part on material from Chapters 4 & 5 in Computer Architecture by Nicholas Carter.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
CS501 Advanced Computer Architecture
Computer Science 210 Computer Organization
More variants of Turing Machines
System Programming and administration
Symbol Hex Code Description I=0 I=1
Computer Science 210 Computer Organization
Computer Organization and Design
BASIC COMPUTER ORGANIZATION AND DESIGN
Microcomputer Programming
Computer Science 210 Computer Organization
BASIC COMPUTER ORGANIZATION AND DESIGN
The Processor and Machine Language
LC-3 Details and Examples
Computer Science 210 Computer Organization
Systems Architecture I (CS ) Lecture 1: Random Access Machines
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Instruction and Control II
Topic 6 LC-3.
مفهوم الموازنة العامة المقدمة
Chapter 9 TRAP Routines and Subroutines
Accessing Services Through Interrupts
Sequencing, Selection, and Loops in Machine Language
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
Chapter 7 Assembly Language
The Stored Program Computer
A Top-Level View Of Computer Function And Interconnection
Systems Architecture I (CS ) Lecture 1: Random Access Machines
CPSC 171 Introduction to Computer Science
Presentation transcript:

Vector Operations and Indexing Competency: C5 Lecture no. 20

Vector Operations An ordered sequence of data items is known as Vector. Vector base address: Starting address of vector. Vector operation: Reading a vector of data items from input unit and storing in memory starting from a specified address.

Reading a Vector Reading a vector of 20 data items and storing it in memory with vector base address 300.

Indexed Addressing STORE R2, R5, SA R5 – Index Register. R2 – Data read is stored in this register. SA – starting address of the vector. Effective Address(EA) = SA + C(R1)

Symbolic Program LDIMMR1, 20; Load R1 with 20 LDIMMR5, 0; Initialize R5 to zero LOOP: INPR2; Read data from input device INCR5; Increment R5 STORER2, R5, 299; Indexed address as two registers are used. BCTR1, LOOP; C(R1)<- C(R1) – 1. If (C(R1) > 0) goto LOOP HALT