This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: For each remaining problem, (1) draw a flowchart , and (2) write a sequence of LC3 instructions. All tasks can be done using only ADD, AND, NOT, and BR instructions. 2. (25 pts flowchart, 15 pts instructions) Find the maximum of the values in R0 and R1, and write it into R2. Do not change R0 or R1. (NOTES: To compare two numbers, subtract one from the other and see if the result is negative, zero, or positive. To subtract, add the negative of the second number. To create the negative of a number, flip the bits and add +1.) ECE 109 Spring 2010 Name:__________________________________________ Section:______________________ Feb 2225, 2010 3 3. (25 pts flowchart, 15 pts instructions) Shift the value in R0 to the left by n bits, where n is the value stored in R1. Assume that n is a value between 0 and 15. (NOTE: To shift a value to the left by one bit, add the value to itself.)...
View
Full
Document
This note was uploaded on 04/18/2010 for the course ECE 109 taught by Professor Bradley during the Spring '08 term at N.C. State.
 Spring '08
 Bradley

Click to edit the document details