SAVINGS TIME EXECUTION PRIMA NUMBERS GENERATOR USING BIT-ARRAY STRUCTURE

Abstract—Prime number in growth computer science of number theory and very need to yield an tool which can yield an hardware storey level effectiveness use effi-ciency and Existing Tools can be used to awaken regular prime number sequence pattern, structure bit-array represent containing subdividing variables method of data aggregate with every data element which have type of equal, and also can be used in moth-balls the yielded number sequence. Prime number very useful to be applied by as bases from algorithm kriptografi key public creation, hash table, best algorithm if applied hence is prime number in order to can minimize collision (collisions) will happen, in determining pattern sequence of prime number which size measure is very big is not an work easy to, so that become problems which must be searched by the way of quickest to yield sequence of prime number which size measure is very big. Serial use of prosesor in seeking sequence prime number which size measure is very big less be efficient remember needing of computing time which long enough, so also plural use prosesor in seeking sequence of prime number will concerning to price problem and require software newly. So that by using generator of prime number use structure bit-array expected by difficulty in searching pattern sequence of prime number can be overcome though without using plural processor even if, as well as time complexity minimization can accessed. Execution time savings gained from the research seen from the research data, using the algorithm on the input Atkins 676,999,999. 4235747.00 execution takes seconds. While the algorithm by using an array of input bits 676,999,999. 13955.00 execution takes seconds. So that there is a difference of execution time for 4221792.00 seconds.


Introduction
The study of prime numbers has become part of one branch of mathematics, namely Number Theory [1]. Prime problem has become one of the subject of research conducted today [7]. Prime numbers are positive integers greater than one who has the right only two factors [2], namely the number 1 (one) and the number itself [3]. Numbers other than primes that have more than two factors and in addition to the number 1 (one) known as composite numbers [4]. Number 1 (one) is a special case, not including the prime or composite [17]. Although the numbers 1 (one) was once considered a prime (Goldbach 1742; Lehmer 1909; Lehmer 1914; Hardy and Wright 1979, pp. 11; Gardner 1984, pp. 86-87; Sloane and Plouffe 1995, pp. 33; Hardy 1999 , pp. 46), required special handling in many definitions and applications that include prime numbers, so the number 1 (one) is usually placed in a special class. Primalitas is a state in which a prime number, including [13]. The use of prime numbers is a serious problem in the development of computer science and number theory [5].
Prime number generator is a tool [6], which can generate the sequence patterns of regular prime numbers, bit-array structure is a grouping method of variables that contain data sets with each data element of the same type used in the storage of generated sequence numbers [7]. Computers today are digital computers [8], these computers only understand numbers 0 dan 1, all numbers can be represented by using the Bit (Binary digit) [20]. Prime numbers are useful for purposes such as may be applicable as the basis of the creation of public-key cryptography algorithm [9], an important part of the cryptographic system is factoring large numbers into prime numbers factor [10], there are still problems of determining the sequence of prime numbers of scale very large [11]. Another benefit of using prime numbers can be used in the hash table [12], hash table algorithm is best used when initialized with a prime number in order to min-imize collisions (collisions) is going to happen [18], in determining the sequence patterns of prime numbers is very large sekalanya is not a job easy [19], so this becomes a problem to be solved [14].
Thus by using bit-array structure is expected difficulties in the search for sequence patterns of prime numbers can be solved even without using multiple processors though [15]. So the execution time savings can be made.

Algorithm
Judging from the origins of his own he said the word algorithm has a strange history [16]. People just find the word algorithm, which means the process of arithmetic (calculation) using arabic numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Webster's New Word Dict, 1957). The linguist tried to find the origin of this word but the results are less satisfactory [20]. Finally, the historians of mathematics found the origin of the word is derived from the name of the author of the famous arab Abu Ja'far Muhammad ibn Musa al-Khuwarizmi. Al-Western Khuwarizmi be read Algorism. Al-Khuwarizmi wrote a book entitled The Book of Algebra WalMuqabala which means "The Book of restoration and reduction" (The Book of restoration and reduction). From the title of the book we also get the root word "Algebra" (Algebra).
In medieval abacus calculation by using algorism, so algorism better known as algiros (painfull) + arithmos (number). Change the word of the Algorithm Algorism arises because the word is often confused with Algorism Arithmetic [21], so the suffix became-sm-THM [24]. Because calculations with arabic numbers have become bisaa things, the words gradually fade algorithm is used as a method of calculation (computing) in general [22], thereby losing its original meaning [23]. In Indonesian, the word Algorithm is absorbed into algorithm.
The algorithm is the basic of all computer programming. Algorithm modern meaning [25]: as a recipe, process, method, technique, procedure, routine. According to Donald E Knuth algorithm must meet the following requirements: 1. Finiteness Algorithm to end (terminate) after doing some step process.

Definiteness
Every step of the algorithm must be appropriately defined and do not cause double meaning (ambiguous). Because it is actually the most appropriate way to write the algorithm is to use formal language (computer programming language).

Input
Each algorithm requires as input data to be processed. The algorithm does not require any input really not very useful because the number of cases that can be solved also limited.

Output
Each algorithm provides one or more of the output.

Effectiveness
Algorithm steps done in a reasonable time.
As the basis of computer programming [26], the algorithm describes the order of the steps necessary for solving problems (problem solving), which has a characteristic as follows: 1. Always have a termination / final step. 2. Each step is clearly stated and firmly. 3. Each simple step so that its performance in relation to the efficient time / make sense. 4. Gives the result (output), perhaps with one or no input

Algoritma Sieve Of Eratosthenes
Sieve of Eratosthenes is a classical algorithm for finding all prime numbers up to a specified N. Start with an array of integers that have not been stricken from 2 to N. The first integer that is not crossed 2, is the first prime numbers. Eliminate all the multiples of these primes. Repeat on the next integer that has not crossed out. Sieve of Eratosthenes algorithm is used as the basis for the writer to make a prime generator using bit array structure. Sequence of steps of the algorithm Sieve of Eratosthenes can be seen in the following explanation: 1. First of all, make a list of numbers from 2 up to a largest number which we denote by n. 2. Elimination or remove from the list of all numbers multiples of 2.
3. The next number not yet eliminated is of prime numbers. 4. Elimination or remove from the list of all numbers that are multiples of the numbers in the previous step. 5. Repeat step 3 and step 4 until the number is greater than the number remaining after step 5 is a prime number. This algorithm has time complexity O (n log log n). Version of this algorithm with the optimization process, such as wheel factorization, has a time complexity O (n). For example, here is an array in the first place: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  Next integer that has not crossed out is 3, then 3 is prime and we crossed out all the multiples of 3, such as 6, 9. 12, onwards.  is_prime if (n): is_prime (i) ← false, i (n 2 , n 2 + n, n 2 +2 n, ..., limit) for n in [2, limit]: is_prime if (n): print n limit = 1000000 sieve $ = string "P" with a long line prime = 2 repeat while prime2 <limit set of characters in the index of each multiples of prime numbers (numbers outside the * 1) in sieve $ becomes "n" prime = index of each "p" in the sieve $ end repeat

Pseudocode Sieve Of Eratosthenes
Algorithm used in determining deret of prime number to n of number determined by is Algorithm of Sieve Of Eratosthenes, presented in Pseudocode hereunder : Or more as simple as: Writer translate pseudocode of above becoming a program in Ianguage C

Pseudocode Sieve of Atkins
Algorithm of Sieve of Aktins to determine sequence of prime number to n of number determined to be presented in Pseudocode hereunder : Writer translate pseudocode of above becoming a program in Ianguage C / / Set limit limit ← 1000000 / / Set all the numbers with true is_prime (i) ← true, i [2, limit] for n in [2, √ limit]: is_prime if (n): is_prime (i) ← false, i (n 2 , n 2 + n, n 2 +2 n, ..., limit) for n in [2, limit]:

Result of Comparison
In execution of this attempt, is conducted by analysis of attempt start from input 10.000 up to 676.999.999. executed by using computer of single prosesor with specification ( Prosessor Intel Pentium III 601 MHZ, RAM 256 MB, Hardisk 20 GB, Operating system of Professional Microsoft windows XP,Service Pack 2). Is later then calculated by time executed, result of attempt second of visible program at tables in the following is

Conclusion
Conclusion which can be taken away from by result of attempt and analysis is : ▪ Structure of Bit-Array represent method subdividing of containing variable-variable of data aggregate with each;every its data element have is type to of equal, used in depository of sequence of number yielded ▪ By using structure of bit-array of difficulty in searching pattern of sequence of prime number which the scorpion very big can be overcome by using single prosesor, and can quicken time accessed ▪ Execution time savings gained from the research seen from the results of research, using the algorithm on the input Atkins 676,999,999. 4235747.00 execution takes seconds. While the algorithm by using an array of input bits 676,999,999. 13955.00 execution takes seconds. So that there is a difference of execution time for 4221792.00 seconds. Suggestion which can be given for the research hereinafter is suggested for the next research make an generator of prime number by using structure of array beet, and the Algorithm used by Algorithm of Sieve of atkins.