An operational amplifier simulation that I used to understand negative feedback. If the negative input (inverting) is connected to ground the op amp would act like a normal comparator. But when the negative input is connected to the output the op amp tries to reach a balance between the positive and negative inputs. Both of them cancel out and the input is exactly the same as the output. The gain is 1.