Computer Organization & Assembly Language

Comp 3350: Computer Organization & Assembly Language
HW # 7: Theme: Conditionals, Booleans, Loops

(All main questions carry equal weight. Credit awarded to only those answers for which work

has been shown.)

Draft a program that scans an array to determine the first even integer in an array. If a
value is found, the program should print “even integer found” its value and index. If no
even integer is found, the program should print “no even integer found.” Submit the
asm/list file and screenshots that shows the output of your code for the following
example arrays:
a. Array has all odd integers
b. Array has all even integers
c. Several arrays with a mix of odd and even integers positioned at different indices
2. Write a program which encodes any string using the XOR instruction. Test it using your
<first name last name> in the data segment to produce cipher text and then decode using
the program to get plain text. Use the last two digits of your student id as the key. Print
plane text from the data segment, print the cipher text, and then print the plain text upon
execution. Submit the asm/list file and screenshots that shows the output of your
code.
What are the strengths and weaknesses of this encryption method (25% of points,
Typewritten answer required)?
3. Write a program that gets its input from two sensors. If the values of the sensors differ
by no more than +/- 5, print “Agree”, otherwise, print “Disagree.” You can assume that
the values are integers. Additionally, if the values Agree and they are each more than 45,
print “Take Action”. Submit asm/list file and show screenshots of robust testing for
various inputs, including boundary conditions, in the closed interval (-90 … 90).
Comp

Category:

Description

Computer Organization & Assembly Language

Comp 3350: Computer Organization & Assembly Language
HW # 7: Theme: Conditionals, Booleans, Loops

(All main questions carry equal weight. Credit awarded to only those answers for which work

has been shown.)

Draft a program that scans an array to determine the first even integer in an array. If a
value is found, the program should print “even integer found” its value and index. If no
even integer is found, the program should print “no even integer found.” Submit the
asm/list file and screenshots that shows the output of your code for the following
example arrays:
a. Array has all odd integers
b. Array has all even integers
c. Several arrays with a mix of odd and even integers positioned at different indices
2. Write a program which encodes any string using the XOR instruction. Test it using your
<first name last name> in the data segment to produce cipher text and then decode using
the program to get plain text. Use the last two digits of your student id as the key. Print
plane text from the data segment, print the cipher text, and then print the plain text upon
execution. Submit the asm/list file and screenshots that shows the output of your
code. Computer Organization & Assembly Language.
What are the strengths and weaknesses of this encryption method (25% of points,
Typewritten answer required)?
3. Write a program that gets its input from two sensors. If the values of the sensors differ
by no more than +/- 5, print “Agree”, otherwise, print “Disagree.” You can assume that
the values are integers. Additionally, if the values Agree and they are each more than 45,
print “Take Action”. Submit asm/list file and show screenshots of robust testing for
various inputs, including boundary conditions, in the closed interval (-90 … 90).
Comp