The HEF4585BT is a 4-bit Magnitude Comparator that compares two 4-bit words, A and B and determines whether A is greater than B, A is equal to B or A is less than B. Each word has four parallel inputs (A0 to A3 and B0 to B3) with A3 and B3 being the most significant inputs. Three outputs are provided: A greater than B (QA >B), A less than B (QA <B) and A equal to B (QA = B). Three expander inputs (IA >B, IA <B and IA = B) allow cascading of the devices, to compare 8, 12, 16 bits without external gates. To operate a single device or a device in the least significant position in a cascaded chain, the expander inputs are connected as follows, IA = B = IA >B = high and IA <B = low. All other cascaded devices have IA = B and IA <B connected to QA = B and QA <B respectively of previous (less significant) device in the chain, while input IA>B is connected to a high. Operation is not restricted to pure binary code, the devices will work with any monotonic code.