Course Solutions Uncategorized (Solved) : Converty C Style Pseudocode Assembly Language Please Collatz Conjecture Receives 8 Bit Hex Q27195593 . . . .

(Solved) : Converty C Style Pseudocode Assembly Language Please Collatz Conjecture Receives 8 Bit Hex Q27195593 . . . .

 

Can you converty the C-style pseudocode into Assembly languageplease.

Collatz Conjecture
receives an 8-bit HEX number through command line parameter
outputs a sequence of numbers according to Collatz Conjecture

From https://en.wikipedia.org/wiki/Collatz_conjecture

The conjecture is that no matter what value of n, the sequencewill always reach 1.

In modular arithmetic notation, define the function f asfollows:
f(n+1) = n/2, if n==0 (mod 2)
f(n+1) = 3n+1, if n==1 (mod 2)

this corresponds to the following C style pseudocode:
printf(“number = %dn”,number)
while(number != 1)
{
step++
if(number % 2)
number = 3*number + 1
else
number /= 2
printf(“number = %dn”,number)
}
printf(“Total Steps: %dn”,steps)

where number = n and steps counts the number of steps forthe
sequence to converge to 1
___________________________________________
Using the

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : T Points Integrate Function X Triangular Region Vertices 1 0 2 0 2 1 Triangular Region Ve Q28685005(Answered) : T Points Integrate Function X Triangular Region Vertices 1 0 2 0 2 1 Triangular Region Ve Q28685005

<p><img alt="tó points) Integrate the function (x,)over the triangular region with vertices (1, 0), (2, 0), and (2, 1). triangular region with vertices (1, 0)," src="https://d2vlcm61l7u1fs.cloudfront.net/media%2F829%2F829c4e18-c734-4abf-9f49-5770f19e023d%2FphpKDuyJd.png" style="height:1024px;width:768px;" aria-describedby="j1t"/></p>tó points) Integrate