Functions for calculations with arbitrary length integers and bitsets
