I need to get the lowest 31 bits of some integer, that is bigger than standard 32 bit int.

Either getting an 32 bit int with the lowest 31 bits of the large integer, or getting a filled bytearray from the large integer will suffice.

In c# I would use BigInt and .toByteArray - is there something similar in c++11 (I am a noob in c++)?