The principe of comparator of two numbers it's to compare the digits with same power and starting with the must powerful to less power.
For this circuit the power of digit of the numbers going from up to down, Less to more power.
#--Green LED: the down number
#--Blue LED: the up number
#--Red LED: equal numbers