Doubt in compare

when we wrote comparing a and b, return a<b;
in the output it showed comparing 2(a) and 1(b), but 2 is not less than 1, so how does this work?