Question: A prime number has no factors besides 1 and itself. Do the following.
a. Write a program to determine whether a positive integer N is prime. In terms of N, what is the worst-case running time of your program?
b. Let B equal the number of bits in the binary representation of N. What is the value of B?
c. In terms of B, what is the worst-case running time of your program?
d. Compare the running times to determine whether a 20-bit number and a 40-bit number are prime.