Word Bank - questions 1-6. Place the letter of the matching term in the space provided. (2 pts. each)

Similar documents
I. instruction J. instruction register K. label L. load M. load/store machine N. location counter (loc) O. MAR P. MDR

We will use the accumulator machine architecture to demonstrate pass1 and pass2.

Computer Internals ECE2036. Lecture 2. ECE2036 Computer Internals Spring / 12

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Chapter 2 Instruction Set Architecture

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e

The Assembly Language of the Boz 5

Processor design - MIPS

Chapter 04: Instruction Sets and the Processor organizations. Lesson 08: Processor Instructions - Part 1

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

This simulated machine consists of four registers that will be represented in your software with four global variables.

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

Instructions: Language of the Computer

Chapter 04: Instruction Sets and the Processor organizations. Lesson 18: Stack-based processor Organisation

Topic Notes: MIPS Instruction Set Architecture

Problem Set 1 Solutions

Compiling Techniques

Microcontroller Intel [Instruction Set]

COMPUTER ORGANIZATION & ARCHITECTURE

William Stallings Computer Organization and Architecture

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Computer Architecture and Organization. Instruction Sets: Addressing Modes and Formats

8051 Microcontrollers

SAM Architecture Reference (Revised)

General purpose registers These are memory units within the CPU designed to hold temporary data.

TABLE 9-1. Symbolic Convention for Addressing Modes. Register indirect LDA (R1) ACC M[ R1] Refers to Figure 9-4. Addressing mode. Symbolic convention

COMP MIPS instructions 2 Feb. 8, f = g + h i;

Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

Control Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary

Control Instructions

Computer Organization MIPS ISA

Computer Organization and Technology Processor and System Structures

Instruction Set Architecture. "Speaking with the computer"

Addressing Modes. Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack

MIPS Memory Access Instructions

CENG3420 Lecture 03 Review

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

16.1. Unit 16. Computer Organization Design of a Simple Processor

Teaching London Computing

1 Little Man Computer

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Digital System Design Using Verilog. - Processing Unit Design

CS232 Final Exam May 5, 2001

COMPUTER HARDWARE. Instruction Set Architecture

EE 3170 Microcontroller Applications

CSc 520 Principles of Programming Languages

2.2 THE MARIE Instruction Set Architecture

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language

Binghamton University. CS-140 Fall Pippin

CSc 453. Compilers and Systems Software. 18 : Interpreters. Department of Computer Science University of Arizona. Kinds of Interpreters

CS/COE1541: Introduction to Computer Architecture

Introduction to CPU architecture using the M6800 microprocessor

17. Instruction Sets: Characteristics and Functions

Course Administration

Computer Architecture

Expectations. Why learn Assembly Language? Administrative Issues. Assignments. CSC 3210 Computer Organization and Programming

LC-3 Architecture. (Ch4 ish material)

session 7. Datapath Design

Lecture 6 Assembly Programming: Branch & Iteration

Reconfigurable Computing Systems ( L) Fall 2012 Tiny Register Machine (TRM)

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

Instruction Sets: Characteristics and Functions Addressing Modes

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

EE 3170 Microcontroller Applications

Mark Redekopp, All rights reserved. EE 357 Unit 11 MIPS ISA

ARM Assembly Language. Programming

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

Computer Organisation CS303

Fundamentals of Computer Architecture. 8. Bringing It All Together The Hardware Engineer s Perspective

Chapter 4. The Processor. Computer Architecture and IC Design Lab

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Computer Organization II CMSC 3833 Lecture 33

THE MICROPROCESSOR Von Neumann s Architecture Model

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

Machine Language and Assembly Language

Assembler: Basics. Alberto Bosio October 20, Univeristé de Montpellier

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE. Debdeep Mukhopadhyay, CSE, IIT Kharagpur. Instructions and Addressing

CS 4200/5200 Computer Architecture I

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

8051 Overview and Instruction Set

Computer Organization CS 206 T Lec# 2: Instruction Sets

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

Lecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook)

ISA and RISCV. CASS 2018 Lavanya Ramapantulu

EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design

Condition Code Register. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

Chapter 16. Control Unit Operation. Yonsei University

Chapter 7 Central Processor Unit (S08CPUV2)

Introduction to Computers - Chapter 4

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Transcription:

CpSc 2310 Exam 1 Spring 2012 Name: Word Bank - questions 1-6. Place the letter of the matching term in the space provided. (2 pts. each) A. accumulator machine B. address C. assembler D. ALU E. CPU F. direct addressing G. immediate addressing H. indirect addressing I. instruction J. instruction register K. label L. load M. load/store machine N. location counter (loc) O. MAR P. MDR Q. memory R. opcode S. pseudo-op T. program counter (PC) U. stack machine V. store 1. a symbolic name in an assembly language program that is used to access data or as a branch target 2. an assembly language statement that doesn't generate a machine instruction but instead acts as a directive to the assembler 3. an instruction that will make a copy of the value in a specified memory word and place it into the accumulator (or other register) 4. a register in the CPU that contains the address of the memory word from which the next instruction will be fetched 5. the unit within a computer that performs the arithmetic and logical computations (it has no registers) 6. a machine design that contains a register file and for which the arithmetic and logic instructions identify these registers as sources and destinations rather than memory locations 7. a mnemonic name in an assembly language program or a number in an executable that identifies the operation 8. the basic unit of work in a program, which is composed of an opcode and possibly one or more operands. 9. a register in the bus interface unit that contains the address of the memory word that should be read or written. 10. addressing mode in which the instruction holds the address of a memory word which contains the data which is to be accessed Give the power of ten that corresponds to these prefixes. (2 pts. each) 11. nano 12. tera 13. milli 14. micro

15. For the accumulator machine, the load instruction operated as follows: load(x) => "acc = memory[x];" Suppose we want to implement a load indirect instruction as follows: loadi(x) => "acc = memory[memory[x]];" For the following data and code, fill in the data value for place and below that fill in the trace of the accumulator contents. The data starts at address 0. (10 pts.) word(five,5) // symbolic location "five" contains 5 word(ten,10) // symbolic location "ten" contains 10 word(place,ten) // symbolic location "place" contains label(start) load(ten) sub(ten) load(place) loadi(place) // acc =

16. On the right hand side, give the symbol table produced by the first pass of the assembler for the following accumulator machine program. (15 pts.) word(a,10) word(b,25) word(c, 0) label(alpha) load(a) sub(b) bge0(finished) label(finished) end(alpha) 17. Is the reference to "a" in the load instruction above a forward or backward reference? (2 pts.) 18. The opcodes for the, load, sub, store, and bge0 instructions are 0, 50, 30, 60, and 75, respectively. On the right hand side give the executable file produced by the second pass of the assembler for the following accumulator machine program. (20 pts.) word(a,10) word(b,25) word(c, 0) label(alpha) load(a) sub(b) bge0(finished) label(finished) end(alpha)

accumulator machine instruction set opcode address operation name machine action --------- ---------- ------------------- ------------------- ---- stop execution div addr divide acc = acc/memory[addr] mul addr multiply acc = acc*memory[addr] sub addr subtract acc = acc-memory[addr] add addr add acc = acc+memory[addr] load addr load acc = memory[addr] store addr store memory[addr] = acc ba addr branch always pc = addr blt0 addr branch on less than if acc<0 then pc = addr ble0 addr branch on less than or equal if acc<=0 then pc = addr beq0 addr branch on equal if acc==0 then pc = addr bne0 addr branch on not equal if acc/=0 then pc = addr bge0 addr branch on greater than or equal if acc>=0 then pc = addr bgt0 addr branch on greater than if acc>0 then pc = addr print addr print display contents of memory[addr] 16. Write a sequence of instructions that implements the following statement in assembly language for the accumulator machine. You do not have to provide a data section for a, b, and c. Make sure your program computes the values based on the order of precedence of operators. (10 pts) c = a + 2 * b / 5;

19. Write code that implements the following program segment in assembly language for the accumulator machine. (15 pts.) Write your answer on the paper provided. value = 1; Assume this data section: while( value <= 10 ){ word(one,1) value = 2*value; word(ten,10) } word(value,0) (You can add others, as needed.)