@Override
	public long getValue(ParserWalker walker) throws MemoryAccessException {
		long res = getInstructionBytes(walker);

		res >>= shift;
		if (signbit) {
			res = signExtend(res, bitend - bitstart);
		}
		else {
			res = zeroExtend(res, bitend - bitstart);
		}
		return res;
	}
A contiguous set of bits within instruction stream, interpreted
as an integer value
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/expression/TokenField.java