This type of encoder circuit is quite common, but the operation is perhaps often misunderstood. I have used an LM358, Dual OpAmp for the two input buffer stages, but even these could be eliminated and resistive filtering used. I used them since there are definite advantages to having them. By...