Generalization Learning in a Perceptron with Binary Synapses