In designing logic circuit, it is sometimes necessary to compare values of two digital data. In this case, creating your own magnitude comparator can cause you more logic IC and can consume more time and money. This magnitude comparator IC might help you. It can compare two 4-bit data but can be cascaded to other magnitude comparator. It is the 7485 IC.
This 7485 magnitude comparator is one of my favorite logic ICs. This IC helped me a lot in my school projects specially on digital electronic games like chess, fight combat, etc. I usually use this chip in declaring the winner of having a higher score.
Here is a sample circuit.
A demo video of the magnitude comparator simulation using Proteus Isis 7 (Download Proteus here)