Binarization of input data