String getRepresentation(BigInteger bigInt, Settings settings, int bitLength) {

		int format = getFormatSettingsDefinition().getFormat(settings);
		boolean padded = PADDING.isPadded(settings);

		boolean negative = bigInt.signum() < 0;

		if (negative && (!isSigned() || (format != FormatSettingsDefinition.DECIMAL))) {
			// force use of unsigned value
			bigInt = bigInt.add(BigInteger.valueOf(2).pow(bitLength));
		}

		String valStr;
		int nominalLen;

		switch (format) {
			default:
			case FormatSettingsDefinition.HEX:
				valStr = bigInt.toString(16).toUpperCase() + "h";
				nominalLen = (bitLength + 3) / 4;
				break;
			case FormatSettingsDefinition.DECIMAL:
				return bigInt.toString(10);
			case FormatSettingsDefinition.BINARY:
				valStr = bigInt.toString(2) + "b";
				nominalLen = bitLength;
				break;
			case FormatSettingsDefinition.OCTAL:
				valStr = bigInt.toString(8) + "o";
				nominalLen = (bitLength + 2) / 3;
				break;
		}

		if (padded) {
			// +1 to account for format suffix char
			valStr = StringFormat.padIt(valStr, nominalLen + 1, (char) 0, true);
		}
		return valStr;
	}
Get integer representation of the big-endian value.
<p>
Does not handle CHAR format, use
{@link StringDataInstance#getCharRepresentation(DataType, byte[], Settings)}

@param bigInt BigInteger value with the appropriate sign
@param settings integer format settings (PADDING, FORMAT, etc.)
@param bitLength number of value bits to be used from bigInt
@return formatted integer string
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractIntegerDataType.java