public BigInteger toBigInteger(int n) {
		BigInteger res = new BigInteger(1, vals);
		if (n < length()) {
			res = res.shiftRight((length() - n) * 8);
		}
		else {
			res = res.shiftLeft((n - length()) * 8);
		}
		return res;
	}
Decode the values array into a {@link BigInteger} of length {@code n} bytes

<p>
The array is either truncated or zero-extended <em>on the right</em> to match the requested
number of bytes, then decoded in big-endian format as an unsigned value.

@param n the number of bytes (left-to-right) to decode
@return the decoded big integer
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyPatternBlock.java