You've posted the same question in two other forums out there too 8O
I'll help you, but maybe not in the way you want.
My personal opinion is that you won't get much response on this. There is two reasons for this.
First of all, the topic field does't contain one word about microwind software. I've never used it, so I cannot help you on that one. And by reading your question, I cannot get any information if the problem of you relate to software or how to design a comparator in general.
Second. This I think is the most important reason: Based on the content of your post, it seems that you have done little or no research yourself in order to find it out. I consider your question as a request for solving the entire task. If this is school work, you'll gain nothing from that.
Given that you've posted this three different places on the net and the poor representation of the problem, I assume you're a student who is in short of time doing your homework. I'm I right?