Comparing numbers

Numbers are compared to check which one is higher/smaller than the others. Following things are checked to know that a number is greater or smaller:

If the number of digits in the numbers are different. The number having more digits is greater and the other is smaller.

• For example, among the two numbers 324 and 22, 324 is higher as it has more number of digits. 22 has lower number of digits, hence it is smaller.
• For example, among 221, 34, 1356, 222, 45225, 45225 is the highest and 34 is the lowest.

If the number of digits is equal then the digit at the highestplace is compared.

• If the digits at the highest place are different, the higher value is larger number and the lower value is the smaller number.
• For example, among 235 and 643, the number of digits are same but digit at highest (here hundreds) place, is 2 and 6. Since 6 is higher than 2, hence 643 is higher and 235 is smaller.
• If the digits at the highest place are equal, then the next higher place is compared and so on.
•  For example, among 235 and 245, the number of digits and digit at highest place are same so digit at 2nd highest (tens) place is compared. Since 4 is higher than 3, hence 245 is higher and 235 is smaller.
• For example, among 267542, 267894 and 267843, the number of digits and digits at 4 highest places are same (for 2nd and 3rd number) so digit at 5th highest place is compared. Since 9 is higher than 4, hence 267894 is higher than 267843 and 267542.