function F=add_errors(filename,bit_err_locations)

fid = fopen([filename '.bin'],'r');
F=fread(fid,'ubit1');
F(bit_err_locations) = mod(F(bit_err_locations)+1,2);
fclose(fid);


