I'm experimenting with the 74LS181 ALU (see here if you like), and it is going well, but I am unable to figure out how to use the A=B, A>B, and A<B comparator functions.
The datasheet states, "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. (That is the point after all.) Also, I'm not sure what it means by "...when the unit is in the subtract mode." There is no such mode on this chip.
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<B." That sounds nice, but it doesn't explain HOW to do this. Do I have to send the A=B output signal into another logic gate along with the Cn+4 output signal in order to get a result?
What I am hoping to achieve is to have a simple set of output LED's which I will label A=B, A>B, and A<B such that when I have a 0 on the A inputs and a 0 on the B inputs, then the A=B LED will be lit. And when I have a 1 on the A inputs and a 0 on the B inputs, then the A>B LED will be lit. Likewise for A<B.
This chip is pretty nice ... though a bit quirky at times in my opinion 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? But otherwise it provides quite a few useful logic functions into a single chip, so I'd like to figure out this comparator thing.