R1 and R2 are pull-up resistors which were necessary because the used quad comparator had open-collector outputs. If you have a comparator with output resistors, you can leave them out.