1. Definition of prime numbers: A positive integer number N > 1 is said to be a
ID: 3841614 • Letter: 1
Question
1. Definition of prime numbers: A positive integer number N > 1 is said to be a prime number if N mod(k) / 0 only for k = 1 and k = N.
Definition of a pair-wise odd sequence: An infinite pair of numbers
(2N + 1, 2N + 3); N = 1, 2, 3, ....
Definition of pair- wise prime Numbers: Those number pairs in the above sequence where both numbers are prime.
Examples: (3,5), (5,7), (11, 13), ...
a. Write an Assembly Language algorithm which checks an arbitrary pair-wise numbers to determine if they are a pair-wise prime numbers.
b. From the algorithm, write an Assembly Language program to determine if
(3335787, 3335789) is a pair-wise prime numbers.
2. The Fibonacci Numbers The Fibonacci numbers is a sequence of integer numbers generated as follows:
Step 1: Start with 0,1
Step 2: The next number is generated by adding the last 2 numbers: 0,1,1 .
Step 3: To generate the next number, continue by adding the last 2 numbers:
0,1,1,2,3,5, 8, 13, 21, ....
Write an assembly language program that will generate a sequence N Fibonacci numbers.
Explanation / Answer
Fibonacci numbers in Assembly langaguage
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.