Ok guys, I can't understand a thing, how can I turn a sinusoidal wave into a square wave with an op-amp, for example watch this image:
If you pay attention, you can see in the bottom of the image a square signal that correspond to the sinusoidal signal,the square signal is 1 when the sin of the sine curve is growing up, and it 0 when the sin of the sinusoidal wave is decreasing, but how is possible do a thing like that with an op-amp? For example a circuit that can do a thing like that is the comparator, that compare the voltage, Value of an instant[0] with the voltage value of the following instant, and if the current value is higher than the previous quantised value. But for example let say that I have an op-amp, in the + gate, i put the signal, and in the - gate, I put the feedback of the op-amp, so for example if in the + gate I have 1v in the output of the op-amp i find the Vcc, but if I put the Vcc of the - gate(With the feedback) I have on it -5V, and the op-amp will stop working.So how can I do a stuff like that with an op-amp?