How to use comparator functions of 74LS181?
I'm not sure what it means by "...when the unit is in the subtract mode." There is no such mode on this chip.


There certainly is:


When the "Mode Select" inputs are set to LHHL (or 0110), the ALU calculates A-B-1. This is called the "subtract mode".


  "The comparator output (A=B) of the device goes HIGH when all four function outputs (not F0 to not F3) are HIGH and can be used to indicate logic equivalence over 4 bits when the unit is in the subtract mode."
  
  This is rather confusing.  If I'm comparing A and B, I would think the A=B output would go HIGH any time A was equal to B.


So if you calculate A - B - 1, what result do you get when A = B?

You get -1, which is represented by all \$\rm \overline{F}\$ bits being high.

So the chip is providing exactly the behavior you say you expect.


  Further into the same paragraph, it says, "The A=B signal can also be used with the Cn+4 signal to indicate A>B and A


It's explained in the very next paragraph:

The Function Table lists the arithmetic operations that are
performed without a carry in. An incoming carry adds a one to
each operation. Thus, select code LHHL generates A minus B
minus 1 (2s complement notation) without a carry in and
generates A minus B when a carry is applied. Because
subtraction is actually performed by complementary addition
(1s complement), a carry out means borrow; thus a carry is
generated when there is no underflow and no carry is
generated when there is underflow.


If A &lt; B, then A - B - 1 will produce underflow, which will result in the carry bit not being asserted. If A > B then there will be no underflow and the carry bit will be asserted. 


  For example, why is it A minus B minus 1 as opposed to just A minus B? What good is A minus B minus 1?


Because this is easier to compute with the absolute minimal number of transistors. 

In two's complement, A - B is the same as \$\rm A + \overline{B} + 1\$. So A-B-1 is just inverting B and adding to A. 

And, as the quotation above says, you can get just A-B by asserting the Carry-in bit while doing the A-B-1 operation.