@Override
	public String getRepresentation(MemBuffer buf, Settings settings, int length) {
		if (bitSize == 0) {
			return "";
		}
		AbstractIntegerDataType primitiveBaseDataType = getPrimitiveBaseDataType();
		boolean isSigned = primitiveBaseDataType.isSigned();
		BigInteger big = getBigIntegerValue(buf, isSigned, settings);
		if (big == null) {
			return "??";
		}
		DataType dt = baseDataType;
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		if (dt instanceof Enum) {
			return ((Enum) dt).getRepresentation(big, settings, effectiveBitSize);
		}
		AbstractIntegerDataType intDT = (AbstractIntegerDataType) dt;
		if (intDT.getFormatSettingsDefinition()
				.getFormat(settings) == FormatSettingsDefinition.CHAR) {
			if (big.signum() < 0) {
				big = big.add(BigInteger.valueOf(2).pow(effectiveBitSize));
			}
			int bytesLen = BitFieldDataType.getMinimumStorageSize(effectiveBitSize);
			byte[] bytes = DataConverter.getInstance(buf.isBigEndian()).getBytes(big, bytesLen);

			return StringDataInstance.getCharRepresentation(this, bytes, settings);
		}

		return intDT.getRepresentation(big, settings, effectiveBitSize);
	}
Clone this bitfield to a new datatype manager.  This may change the effective bit
size and storage size of the resulting datatype based upon the data organization
of the specified dtm.
@param dtm target datatype manager
@return new instance or same instance of dtm is unchanged.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/BitFieldDataType.java