public static String extendToMaxBitsSigned(String binaryString, int bitNumber){
		String ret = binaryString;
		boolean isNegative = (binaryString.length() == bitNumber && binaryString.charAt(0) == '1') ? true : false;
		if(binaryString.length() < bitNumber){
			for(int i = binaryString.length(); i < bitNumber; i++){
				ret = (isNegative) ? "1" + ret : "0" + ret;
			}
		}else{
			ret = binaryString.substring(binaryString.length() - bitNumber);
		}
		return ret;
	}