The most efficient format for a computer, or to output in hex/octal/binary/base64, is probably to store your number as uint32_t
. (If you ever are called upon to roll your own bignum library on some mainframe from the ’70s that supports modern C++ but not this timean exact 32-bit type, feel free to ask for an update.) This is half as fast as it theoretically might be on a 64-bit machine, but makes it much, much easier to get the high bits of multiplication than if you tried to use 64-bit words.