ел ate
СПSP
4 Изобретение относитс к автоматик и вычислительной технике и может быт использовано в информационно-измерительных систем1ах и устройствах дискретной автоматики. Целью изобретени вл етс упрощение устройства. НаЧертеже приведена функциональна схема предлагаемого устройства. Устройство содержит элементы 1 и 2 поразр дного сравнени , триггеры 3 и 4, элементы И-НЕ 5 и 6, входы 7 и 8 первого и второго сравниваемых чисел, вход 9 синхронизации, вход 10 сброса, выход 11. Предлагаемое устройство работает следующим образом. Сравниваемь1е числа А и В с информационных входов 7 и 8 устройства синхронно поступаюту в последовател ном коде, начина состарших разр дов , на входы элемента 1 пора;зр днаго сравнени , на выходе которого определ етс перва ненулева разность между старшими разр дами сравниваемых чисел, котора фиксируетс как результат сравнени А/В на триггере 3 по сигналу синхронизации , поступающему на шину 9. На выходе триггера 3 фop a pyeтc сигнал, разрешающий прохождение иьтульсов через элемент И-НЕ 6. Триггеры 3 и 4 устанавливаютс по шине 10 перед каждым сравнением в Исходное состо ние. В зависимости от логического уровн сигнала на информационном: входе триггера 4 в мо мент переключени триггера 3 (перва ненулева разность с старших разр дах чисел А и в) тр иггер 4 устанавливаетс по перепаду сигнала триггера 3 в состо ние, противоположное логическому уровню сигнала на его информационном.входе (на входе 7 устройства ). Таким образом, на входе элемента 2 поразр дного сравнени после первой ненулевой разности чисел А и В фиксируютс уровни сигналов разного логического состо ни , т.е. на выходе элемента 2 поразр дного сравнени присутствует сигнал логической 1 (при положительной логике элементной базы). При этом, если после первой ненулевой разности число А больше или меньше числа В на единицу, то на входах элемента И-НЕ 5 имеютс уровни логической 1, соотвптственно логического О на входе элемента И-НЕ 6, т.е. выходной сигнал отсутствует. В случае, если число А больше или меньше числа В ролее, чем на единицу, в какомлибо разр де сравниваемых чисел после фиксации первого неравенства А/В, начина со старших разр дов, на один из входов элемента И-НЕ 5 поступит сигнал логического О. Это приводит к тому, что на выходе элемента И-НЕ 6 в соответствующем разр де сравниваеь 1х числе А и В по вл етс сигнал отличи Э1их чисел более, чем на единицу. ДпЯ сравнени чисел А и В с некоторой допустимой погрешностью длительность сигнала установки триггеров 3 и 4 в исходное состо ние формируют таким образом, что разрешение срабатывани их составл ет необходимое число разр дов сравнени чисел А и В в соответствии с требуемой допустимой погрешностью сравнени .4 The invention relates to automation and computing and can be used in information-measuring systems and discrete automation devices. The aim of the invention is to simplify the device. The drawing shows a functional diagram of the proposed device. The device contains elements 1 and 2 of the same comparison, triggers 3 and 4, elements AND-NOT 5 and 6, inputs 7 and 8 of the first and second compared numbers, synchronization input 9, reset input 10, output 11. The proposed device works as follows. The numbers A and B are compared with the information inputs 7 and 8 of the device synchronously received in the sequential code, beginning with the old bits, to the inputs of the element 1, it is time; the comparison comparison, the output of which determines the first nonzero difference between the higher bits of the numbers being compared, which is detected as a result of a comparison of A / B on trigger 3 by a synchronization signal received on bus 9. At the output of trigger 3, fop a peak is a signal that permits the passage of pulses through the AND – NE element 6. Triggers 3 and 4 are installed on bus 10 before each by comparison to Baseline. Depending on the logical level of the signal at the informational: input of the trigger 4 at the moment of switching of the trigger 3 (the first nonzero difference from the higher bits of the numbers A and b), tr trigger 4 is set by the difference of the trigger signal 3 to the state opposite to the logical level of the signal informational input (input device 7). Thus, at the input of element 2 of a one-bit comparison, after the first non-zero difference of the numbers A and B, the levels of signals of different logical states are fixed, i.e. at the output of element 2 of bitwise comparison, there is a signal of logical 1 (with positive logic of the element base). Moreover, if after the first non-zero difference the number A is greater or less than the number B by one, then at the inputs of the element AND-NOT 5 there are levels of logical 1, respectively logical O, at the input of element AND-NOT 6, i.e. no output signal. If the number A is more or less than the number B of more than one, in some discharge of the compared numbers after fixing the first A / B inequality, starting with the higher bits, the logical O signal will be sent to one of the inputs of the AND-NOT element 5 This leads to the fact that at the output of the element AND-NOT 6 in the corresponding bit by comparing 1x the number A and B, a signal appears that distinguishes these numbers by more than one. By comparing the numbers A and B with a certain permissible error, the duration of the signal for setting the flip-flops 3 and 4 to the initial state is formed in such a way that the resolution of their operation is the required number of digits for comparing the numbers A and B in accordance with the required permissible comparison error.