     bignum* host_c = (bignum*) calloc(NUMBER_OF_TESTS, sizeof(bignum));
 
     // generate random numbers for the tests
-    start_random_number_generator();
-    for (int i = 0; i < NUMBER_OF_TESTS; i++)
-    {
-        generate_random_bignum(host_a[i]);
-        generate_random_bignum(host_b[i]);
-    }
-    stop_random_number_generator();
+    generate_operands(host_a, host_b);
 
+    check_results(host_c, host_a, host_b);
+
+    free(host_a);
+    free(host_b);
+    free(host_c);
+}
+
+void execute_normal_addition_on_device()
+{
     // device operands
     bignum* dev_a;
     bignum* dev_b;

    cudaMemcpy(dev_b, host_b, NUMBER_OF_TESTS * sizeof(bignum),
               cudaMemcpyHostToDevice);

    test_kernel<<<1, 1>>>(dev_c, dev_a, dev_b);

    // copy results back to host
    cudaMemcpy(host_c, dev_c, NUMBER_OF_TESTS * sizeof(bignum),


#define NUMBER_OF_TESTS ((unsigned long int) 1e4)

void generate_operands(bignum* host_a, bignum* host_b);
void check_results(bignum* host_c, bignum* host_a, bignum* host_b);
void execute_normal_addition_on_device();
__global__ void normal_addition(bignum* dev_c, bignum* dev_a, bignum* dev_b);

int main(void)
{
    printf("Testing PTX\n");

    // host operands
    bignum* host_a = (bignum*) calloc(NUMBER_OF_TESTS, sizeof(bignum));
