You can use subtraction for that + a zero flag.
Zero flag basically checks whether or not the output is all zeros.
After doing A-B
1. IF zero flag is on and cout is on, then A=B
2. IF zero flag is off and cout is on, then A>B
3. IF zero flag is off and cout is off, then A<B
Its as simple as that. Hope this helps.
Zero flag basically checks whether or not the output is all zeros.
After doing A-B
1. IF zero flag is on and cout is on, then A=B
2. IF zero flag is off and cout is on, then A>B
3. IF zero flag is off and cout is off, then A<B
Its as simple as that. Hope this helps.