Available for Windows, macOS and Linux, bitcount is a utility that can be used to count the number of 0 and 1 bits in a random byte stream generated by a SwiftRNG device for quality verification.

An ideal generator will produce an equal amount of 0 and 1 bits over a period of time; however that is rarely achievable when using real random number generators.

The following command demonstrates how to count ones and zeros for 75,000 random blocks (about 1.2 GB) retrieved from a SwiftRNG Pro device (one block equals to 16,000 bytes):

sudo bitcount 75000 0

This could result in the following output:

------------------------------------------------------------------------------
--- A program for counting 1's and 0's bits retrieved from SwiftRNG device ---
------------------------------------------------------------------------------

SwiftRNG device number 0 open successfully

*** downloading random bytes and counting bits, post-processing: none, embedded correction: none ***
retrieved 9600000000 total bits, 0's bit count: 4799991110, 1's bit count: 4800008890, 
0's arithmetic mean: 0.499999074

In the output shown above you will notice a discrepancy between 0’s and 1’s counts. The generator produced more 1’s bits than 0’s bits, however that discrepancy is small and can be ignored.

A new bitcount-cl utility is available four counting 0’s and 1’s bits in a random byte stream that is generated by a cluster of multiple SwiftRNG devices.