hw3b-jyng-tkruip

hw3b-jyng-tkruip - number input would be in line. Part 2....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Justin Ng Tom Kruip Ics 10 1/27/11 Homework Assignment 3 Part 1. a) Register A contains the values of : [0, 7, 9]. b) The program prints out the data that was stored from register A: 9. c) The program takes an input of a list of numbers and compares the numbers. The largest number in the list is stored and is printed out in the output at the end of the program. d) Line 6 in the program is not needed. Removing this line in the program would save a little bit of computer time, but the result of removing the line does not alter the final output. If, for example, the largest number is compared with itself, the equal indicator would turn on, and the number would be copied again into register A. The extra copying would not influence the program’s main objective and after that input line, the next
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: number input would be in line. Part 2. a) Output from the program will be: My Name is: Sherlock My Name is: Sherlock My Name is: Sherlock b) Memory Location 4 is never used as the comparison indicator for less than never turns on in the program with the source provided. c) The only circumstances are if the operand at line 10 is not zero. If the operand at line 10 is not zero, the comparison indicator for less than can be activated with the comparison in the source. d) If the first input line is a negative number, this would be the only instance of the branch instruction in memory location 4 would actually be called upon....
View Full Document

This note was uploaded on 04/20/2011 for the course ICS 10 taught by Professor Stasio during the Spring '04 term at UC Irvine.

Page1 / 2

hw3b-jyng-tkruip - number input would be in line. Part 2....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online