public static double getBitErrorRate(boolean bitsSent[], boolean bitsReceived[]) {
		double bitErrorRate = 0;
		int countBits = bitsSent.length;
		
		try {
			for (int i = 0; i < countBits; i ++) {
				bitErrorRate += (Math.abs(((bitsSent[i]) ? 1 : 0) - ((bitsReceived[i]) ? 1 : 0)) % 2);
			}
		} catch (IndexOutOfBoundsException e) {
			System.out.println(e.toString());
		}
		
		bitErrorRate /= countBits;
		
		return bitErrorRate;
	}