Timeline for How to use comparator functions of 74LS181?
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 27, 2018 at 17:47 | comment | added | blixel | So it must be the case that "Subtract mode" is only available for Active Low Inputs and Outputs (when the Cn pin is set low)? I had a chance to try some things on my board again, and yeah ... I give up with the comparator stuff. The A=B output does not go HIGH no matter what I do. If it did work, then based on what the datasheet says, I'm guessing that the A=B output can be used in combination with the Cn+4 output to determine if A is equal to B, or if A is greater than B, or if A is less than B. But with the A=B output always off, I can't see any logic to the output I'm getting. | |
Oct 27, 2018 at 16:53 | comment | added | The Photon | @blixel, for what it's worth I agree this is not the most transparent data sheet in the world. Back when this was written, I think they expected you to just work it out from the logic diagram if you had any questions. | |
Oct 27, 2018 at 16:46 | comment | added | blixel | I just like things to be clear and unambiguous. And there's nothing in the datasheet that says "Subtract mode is the same as A minus B minus 1." Anyway, thanks for the responses and I'll get back to the actual hardware to try this out as soon as I can. | |
Oct 27, 2018 at 15:17 | comment | added | The Photon | @blixel I quoted the relevant paragraph from the data sheet in my answer. | |
Oct 27, 2018 at 14:27 | comment | added | blixel | ... When the "Mode Select" inputs are set to LHHL (or 0110), the ALU calculates A-B-1. This is called the "subtract mode".... OK, I can't find this in the datasheet, so I'm not sure how you knew that, but thanks. Is it only true for that one subtraction, or is it true for A minus 1, AB minus 1, and so on? Where did you find this? | |
Oct 27, 2018 at 8:50 | comment | added | Jules | Re why A-B-1 ... Another reason is that if you cascade the chips to work on more than 4 bits, you need to know whether you're working on the least significant bits (in which case you need to add 1 when negating B) or not (in which case you don't) to implement A-B. | |
Oct 27, 2018 at 5:51 | history | edited | The Photon | CC BY-SA 4.0 |
added 350 characters in body
|
Oct 27, 2018 at 5:45 | history | answered | The Photon | CC BY-SA 4.0 |