Introduction to Computing Systems (3rd Exam). 1.[5] Suppose R1 contains an integer x and R2 contains another integer y. Please write an instruction which.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Chapter 5 The LC-3.
LC-3 Computer LC-3 Instructions
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
Introduction to Computing Systems (2nd Exam). 1. [15] Complete a truth table (inputs: A, B, C; output: D) for the transistor-level circuit shown in Figure.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
Overview The Operate Instructions - ADD, AND, NOT The Data Movement Instructions - Load, Load Address, Store Example Using Operate & Data Movement The.
Some thoughts: If it is too good to be true, it isn’t. Success is temporary. It is hard work to make it simple. Knowing you did it right is enough reward.
Overview Review Trap Instruction Program in LC-3 machine language Use LC-3 Simulator.
CSS 372 Oct 2 nd - Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture.
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.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
State Machines Used to Design Sequential Circuits.
Introduction to Computing Systems (4th Exam). 1.[10] Please convert each machine language instruction to its assembly language counterpart. –
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
Introduction to Computers -3rd exam- 授課教授:李錫智. Q1 What will the web page look like if the user type 100 、 20 in the numberbox1 、 numberbox2 respectively?
Computer Architecture and the Fetch-Execute Cycle
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Computer Systems Organization
火雨辰 homeWork1.
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
Home Assignment 5 Assigned. Deadline 2016 March 2, Wednesday.
Introduction to Computing Systems and Programming The LC-2.
INTRODUCTION TO COMPUTERS
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
1 Bits, Bytes, Binary & Hex CIS TAG ▪ Byte Bit.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
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 6 Programming Adapted from slides provided by McGraw-Hill Companies Inc., modified by professors at University of Wisconsin-Madison.
System Calls & Arithmetic
CSCI206 - Computer Organization & Programming
Loading a Single Byte There are two instructions that load a byte from a memory address. The instructions differ in how the 8-bit byte is put into the.
Addendum to Chap 2 and Chap 3
Chapter 5 The LC-3.
Introduction to Computer Engineering
THE sic mACHINE CSCI/CMPE 3334 David Egle.
asum.ys A Y86 Programming Example
LC-3 Details and Examples
Introduction to Assembly Chapter 2
CSCI206 - Computer Organization & Programming
ECE 3430 – Intro to Microcomputer Systems
Chapter 5 The LC-3.
Main memory.
An Ultimate RISC Processor for Space Applications
Solutions Chapter 2.
Instruction and Control II
MIPS Instruction Encoding
Introduction to Computer Engineering
MIPS Instruction Encoding
TRAP Routines Subroutines Privileged Instructions
Introduction to Assembly Chapter 2
Sequencing, Selection, and Loops in Machine Language
CS334: Memory _ Mars simulator Lab 4(part2-2)
CSCI-N 100 Dept. of Computer and Information Science
MARIE: An Introduction to a Simple Computer
Laws of Exponents: Multiplication.
MIPS Arithmetic and Logic Instructions
Instruction execution and ALU
Chapter 6 Programming.
CS 111 – Sept. 16 Machine language examples Instruction execution
CS444/544 Operating Systems II Virtual Memory
Chapter 5 The LC-3.
Presentation transcript:

Introduction to Computing Systems (3rd Exam)

1.[5] Suppose R1 contains an integer x and R2 contains another integer y. Please write an instruction which puts x+y in R or

2.[5] Suppose R3 contains an integer x. Please write an instruction which puts x-1 in R

3.[5] Please write an instruction which puts zero in R XXX100000

4.[5] Suppose R5 contains xFFFF. Please write an instruction to change the contents of R5 to xFFF or

5.[5] Suppose there is an integer x stored at memory location x30F6. We want to read x into R4 by executing an instruction placed at memory location x30E6. What is this instruction?

6.[5] Suppose there is an instruction placed at memory location x413E. After the instruction is executed, the PC is loaded with x4120 if the condition code Z = 1. What is the instruction located at x413E?

7.[5] Suppose R2 contains xAFAF. We want R2 to contain x5050 after an instruction is executed. What is the instruction?

8.[5] Suppose there is an instruction placed at x30F8. After the instruction is executed, the contents of R2 will be stored at memory location x30F4. What is the instruction located at x30F8?

9.[5] What does the following instruction do? R5 R5 + 1

10.[5] What does the following instruction do? R7 0

11.[5] What happens if the following instruction, located at x507B, is executed? Jump to x5001 or PC is loaded with x5001

12.[5] What happens if the following instruction, located at x7679, is executed? PC is loaded with x767A or the next instruction to be executed is at x767A

13.[5] What does the following instruction do? R2 (R6)’

14.[5] Suppose xABAB, xCDCD, xEFEF are stored at memory locations x3FC7, x3FC8, and x3FC9, respectively. If the instruction is located at x4019, what will the contents of R3 be after the execution of this instruction? R3 xCDCD

15.[5] If memory location x4018 contains the following instruction: What will the contents of R6 be after the execution of this instruction? R6 x4016

16.[5] Suppose the instruction is in x4A1B, the contents of x49E8 is x1120,and the contents of x1120 is x7654. What will the content of R3 be after the execution of this instruction? R3 x7654

17.[5] Suppose R1 contains xF0F0 and R2 contains x2345. What will the contents of x2362 be after the execution of the following instruction? [x2362] xF0F0

18.[5] Suppose R2 contains xABCD. What will R2 contain after the execution of the following instruction? R2 x5432

19.[5] Please write an instruction to move the value in R2 into R

20.[5] What happens if the following instruction is executed? Will execute this instruction forever