You could chose delta manually. The smaller it is, the more you would approximate the step function.



 Mr.Bank:

Is there any way to create only 0s and 1s?


Yes, with a threshold (step function), but then you would get zero gradients, as the derivative of the step function would be the delta function, which has only a valid value at x=0 (if the step is there and not shifted).