private static String padZeros(String binStr) {
		String retString = binStr;

		if (binStr.length() < 8) {
			int diff = 8 - binStr.length();
			for (int i = 0; i < diff; i++) {
				retString = "0".concat(retString);
			}
		}

		return retString;
	}
Adds zeros to the beginning of the binary string so it represents a full byte.

@param binStr
@return
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/util/InstructionSearchUtils.java