Research Article

Fast Software Implementation of Serial Test and Approximate Entropy Test of Binary Sequence

Algorithm 1

Serial test.
Input: a binary sequence of length n. m is the bit length of subsequence.
Output: pass or not.
 Step 1: extend the sequence by appending the first bits to the end of the sequence
 Step 2: determine , , and and the frequency of all possible m-bit, -bit, and -bit subsequence, respectively.
 Step 3: compute , , and . . .
 Step 4: compute and . .
 Step 5: compute values. .
 Step 6: if and , the sequence passes the test. Otherwise, return not pass.