When 2 bytes are added, the addition returns an int. Just cast theaddition back to a byte.x[i] = (byte)(x[i]+y[i]);