Question: Comp 3350: Computer Organization & Assembly Language HW # 7: Theme: Conditionals, Booleans, Loops (All main questions carry equal weight. Credit awarded to only those

 Comp 3350: Computer Organization & Assembly Language HW # 7: Theme:

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.) 1. Draft a program that scans an array to determine the first positive EVEN number in the array. If a positive value is found, the program should print "positive even number found" and the value. If no positive EVEN value is found in the array, the program should print "no positive even number found." Submit list file and show the runs for the following data items: a. all negative even values b. all positive odd values c. mixed negative and positive values which are odd and even (two different examples with odd and even numbers at different indices) Write a program which encodes any string using the XOR instruction. Test it using your in the data segment to produce cipher text and then decode using the program to get plain text. Use the last three digits of your student id as the key. Prin plane text from the data segment, print the cipher text, and then print the plain text upon execution. What are the strengths and weaknesses of this encryption method? Can you think of another way doing such encryption? What are the strengths and weaknesses of your method? 2. 3. Implement the following two pseudo-codes in assembly language (assume signed numbers). Declare Apple and Pear as word sized variables. Test the program for input data sets listed below and print values assigned to Apple and Pear. Submit list file and show output for all input data sets. A. if( (cx-bx) AND (cx >= val! ) ) Apple 1; Apple = 0; Pear 1 Pear = 0; Else B. if ( (bx-cx) OR (cx>= vall) ) Else 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.) 1. Draft a program that scans an array to determine the first positive EVEN number in the array. If a positive value is found, the program should print "positive even number found" and the value. If no positive EVEN value is found in the array, the program should print "no positive even number found." Submit list file and show the runs for the following data items: a. all negative even values b. all positive odd values c. mixed negative and positive values which are odd and even (two different examples with odd and even numbers at different indices) Write a program which encodes any string using the XOR instruction. Test it using your in the data segment to produce cipher text and then decode using the program to get plain text. Use the last three digits of your student id as the key. Prin plane text from the data segment, print the cipher text, and then print the plain text upon execution. What are the strengths and weaknesses of this encryption method? Can you think of another way doing such encryption? What are the strengths and weaknesses of your method? 2. 3. Implement the following two pseudo-codes in assembly language (assume signed numbers). Declare Apple and Pear as word sized variables. Test the program for input data sets listed below and print values assigned to Apple and Pear. Submit list file and show output for all input data sets. A. if( (cx-bx) AND (cx >= val! ) ) Apple 1; Apple = 0; Pear 1 Pear = 0; Else B. if ( (bx-cx) OR (cx>= vall) ) Else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!