private BigInteger getBigIntegerValue(MemBuffer buf, boolean isSigned, Settings settings) {
		if (effectiveBitSize == 0) {
			return BigInteger.ZERO;
		}
		try {
			BigInteger big = buf.getBigInteger(0, storageSize, false);
			BigInteger pow = BigInteger.valueOf(2).pow(effectiveBitSize);
			BigInteger mask = pow.subtract(BigInteger.ONE);
			big = big.shiftRight(bitOffset).and(mask);
			if (isSigned && big.testBit(effectiveBitSize - 1)) {
				big = big.subtract(pow);
			}
			return big;
		}
		catch (Exception e) {
			// ignore
		}
		return null;
	}
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