Re: gain of comparator
Hi huangjw.
First of all, I can't understand why you calculate the gain of a comparator. In recent years, nobody uses conventional opamps as comparators, it's a waste of power. Usually designers implement a preamp as the first stage and a positive feedback in the second stage. because the goal of comparator is to resolve a digital output which is vdd or vss. Even for reducing the DC power consumption, there are some structures called "Dynamic Comparators", I really recommend you to read some papers by Sumanen about this category (its available in IEEE explore). However, If you still want to use simple Opamps, with more power consumption and lower speed, you should use e.g. a 2-stage opamp with a large DC gain and use it in an open loop manner to have a comparator behavior.
Regards,
EZt