Analog to 1-channel Digital Converter
Typically you'd use a comparator for this. Or you could make a transistor version with a long-tailed pair. 

A Schmitt-trigger would be a nice solution for a 0 to 5V input:


(Source)

But you pointed to an op-amp circuit...

Here's the idea. An opamp as a comparator with logic output.



It's worth reading through ADI's application note on that (source for the picture).

Their Conclusion is accurate in my opinion and worth bearing in mind:

"In conclusion, although op amps are not designed to be used as comparators, there are, nevertheless, many applications where the use of an op amp as a comparator is a proper engineering decision.
It is important to make an educated decision to ensure that the op amp chosen performs as expected"