Say you have 1 bit comparator and making comparation between A and B
A |
B |
A>B |
A<B |
A=B |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
Now see..
with 1 bit we get 4 encodings...2^2n
for A = B we get 2 encodings… which is 2^n
A > B and A< B will always have an equal number of encodings..observe the table above.
therefore just divide everything by 2.
All encodings after removing A = B ….
now encodings for A<B or A>B will be → (2^2n – 2^n)/ 2
put 8 in place of n… (2^2*8 – 2^8) / 2
2^8(2^8 - 1) / 2
2^7(255) – > 255 x 2^7