Added 'z_bin_to_non_neg_int'