Question: Assembly help asm # 2 and #3 would be helpful please in assembly language Given a signed array of bytes, X, of unknown length. If
Assembly help
asm
# 2 and #3 would be helpful please in assembly language
-
Given a signed array of bytes, X, of unknown length. If Z is an array representing the continuing product of the array values, define Z and compute its value. E.g. if X = {-1,-2,-3,-4,-5,-6} then Z = {-1,2,-6,24,-120,720}.
- A prime number is a number divisible by itself and 1 only. Given a doubleword unsigned value in X. Write a program that will set the byte variable Prime = 1 if X is prime, and 0 otherwise.
- Given an unsigned byte X. If X is even divide it by 2. If it odd multiply it by 3 then add 1. Collatz theorizes that all numbers must converge to 1 (no one has proved it yet, but they tested all numbers up beyond 10^10 and they all work). Write a program that will count how many steps before the number reaches 1 (1 step is when divide by 2 or when you multiply by 3 then add 1).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
