Ⓐ

GMP Integer Storage

GMP integers are stored in compact form, starting with a variable byte code
*Reality check: a single byte VBC represents numbers up to 63, 63 bytes of storage represents over 500 bits, or numbers ranging up to ±10150, aka sufficient.
indicating the number of bytes used to represent the integer, followed by the value with most significant byte first. The most significant bit
*of the first, most significant, byte
indicates the sign of the stored integer: set is negative. The sign bit is not included in the value of the integer. When necessary, a zero value most significant byte is prepended to achieve the required sign bit.

Rational fractions are stored as two integers, with two variable length byte encoded sizes: the first telling the size of the remaining size code plus the size of both integers
*aka total bytes remaining in the object, as is standard for all variable sized data items
followed by a variable byte encoded size of the numerator storage, followed by the numerator and denominator.