На чертеже представлена схема устройства дл контрол кода «2 из п (при ). Устройство ДЛИ контрол кода «2 из п содержит первый 1 и второй 2 пороговые блоки «2 из п, элемент НЕ 3 и элемент ИЛИ 4. Пороговый блок 1 содержит группу элементов И 5, группу элементов ИЛИ 6 и элемент ИЛИ 7, пороговый блок 2 - группу элементов И 8, группу элементов ИЛИ 9 и элемент ИЛИ 10. В группах элементов И 5 и ИЛИ 6 порогового блока 1 имеетс соответственно п-1 и п-2 двухвходовых элементов И и ИЛИ. Число элементов в груннах элементов И 8 и ИЛИ 9 в пороговом блоке 2 па единипу меньше (соответственно п-2 и п-3). Рассмотрим работу порогового блока 1. На выходе Zj i-то (, ..., п-1) элемента И 5 группы присутствует сигнал логической единицы, если одновременно выполн ютс следующие услови : значение (г-)-1)-го разр да Xi+i п-разр дного входного кода равно единице; в составе п-разр дного входного кода найдетс по крайней мере одна единица, расположенна левее (i+l)-ro разр да / . Таким образом, закон функционировани порогового блока 1 в части группы выходов Zi описываетс совокупностью логических функций Zi X,i(/Xi, (i l«-). k-i I Число возбужденных выходов Z, порогового блока 1 всегда на единицу меньше числа единиц, присутствующих в составе п-разр дного входного кода. Это происходит изза того, что крайн лева единица п-разр дного входного кода не проходит на соответствующий выход порогового блока 1, в отличие от всех последующих единиц этого кода. Аналогичным образом функционирует пороговый блок 2, поскольку он имеет одинаковую с пороговым блоком 1 структуру и отличаетс от него лишь на единицу меньщим числом входов и выходов. Пусть на вход устройства дл контрол кода «2 из п подаетс правильна кодова комбинаци (Xi, Xz, ..., Хп), т. е. комбинаци , содержаща единицы в двух позици х, а нули - в (п-2)Х позици х. Все оскодовые комбинации тальные 2 - 2 («-2) вл ютс неправильными. При этом в пороговом блоке 1 возбужденным оказываетс только один из выходов группы элементов И 5, в пороговом блоке 2 все выходы группы элементов И 8 наход тс в невозбужденном (нулевом) состо нии. В этом случае сигнал ощибки на выходе элемента ИЛИ 4 отсутстЁует, поскольку ий выходах элемента НЕ 3 и элемента ИЛИ 10 порогового блока 2 формируютс сигналы логического нул . Все неправильные п-разр дные кодовые комбинации можно разбить на два типа. К первому типу относ тс кодовых комбипаций, кажда из которых содержит к своем составе не более одной единицы. Таким образом, к первому типу относитс множество всех п-разр дпых унитарных кодов , а также комбинаци , состо ща из нулевых значений всех -входных логических переменных. К второму типу принадлежат /г-разр дные кодовые комбинации, содержащие в своем составе три единицы и более. При поступлении на вход устройства любой неправильной кодовой комбинации первого типа на выходе элемента НЕ 3 формируетс сигнал ощибки, который через элемент ИЛИ 4 проходит на выход устройства. Действительно , на выходе элемента НЕ 3 реализуетс логическа функци (H/)J Содержаща под знаком инверсии дизъюнкцию из попарных конъюнкций 2(п - 2)1 вида XiXj(), (i, , ..., п); т. е. функци FI обращаетс в единицу только при поступлении на вход устройства одной из неправильных кодовых комбинаций первого типа. , Если на вход устройства поступает одна из неправильных кодовых комбинаций второго типа, сигнал ошибки формируетс на выходе элемента ИЛИ 10 порогового блока 2. Действительно, на выходе этого элемента реализуетс логическа функци fz y состо ща из дизъюнктивно объе2 (л -3) диненных попарных конъюнкций вида ZjZj (), (i, , ..., п-1). Таким образом, функци FZ обращаетс в единицу, если в группе выходов порогового блока 1 находит с .не менее двух возбужденных выходов. Это возможно лищь в том случае, когда на вход устройства поступает «-разр дна кодова комбинаци , содержаща в своем составе не менее трех единиц. Предлагаемое устройство отличаетс от прототипа простотой, высокой степенью регул рности и посто нством анпаратурных затрат в расчетена один вход устройства. Эти качества устройства способствуют упрощению его изготовлени и проверки. Обща задержка распространени сигнала в устройстве не превыщает величины- (г+2)т, где т - врем задержки сигнала одним элементом И, ИЛИ, НЕ.The drawing shows a diagram of the device for monitoring the code "2 of n (at). The device DLI code control "2 of n contains the first 1 and second 2 threshold blocks" 2 of n, the element is NOT 3 and the element OR 4. The threshold unit 1 contains the group of elements AND 5, the group of elements OR 6 and the element OR 7, the threshold unit 2 - a group of elements AND 8, a group of elements OR 9 and an element OR 10. In the groups of elements AND 5 and OR 6 of the threshold block 1 there are, respectively, n-1 and p-2 two-input elements AND and OR. The number of elements in the soils of the elements of AND 8 and OR 9 in the threshold block 2 is one less (respectively, p-2 and p-3). Consider the operation of the threshold block 1. At the output Zj i -th (, ..., p-1) of the And 5 group of the group there is a signal of a logical unit, if the following conditions are fulfilled simultaneously: the value of (r -) - 1) -th bit Xi + i n-bit input code is one; the n-bit input code contains at least one unit to the left of the (i + l) -ro bit /. Thus, the law of functioning of threshold block 1 in the part of output group Zi is described by the set of logical functions Zi X, i (/ Xi, (il "-). Ki I The number of excited outputs Z, threshold block 1 is always one less than the number of ones present in This is due to the fact that the left-most unit of the n-bit input code does not pass to the corresponding output of threshold block 1, unlike all subsequent units of this code. Similarly, threshold block 2 functions because has about a structure different from threshold unit 1 and differs from it only by one in a smaller number of inputs and outputs. Let the correct code combination (Xi, Xz, ..., Xn), i.e. a combination containing units in two positions, and zeros in (p-2) X positions. All OCODE combinations 2-2 ("-2) are wrong. At that, only one of the outputs in the threshold block 1 is excited the group of elements And 5, in the threshold block 2 all the outputs of the group of elements And 8 are in the unexcited (zero) state they and. In this case, the error signal at the output of the OR 4 element is absent, since the outputs of the NOT 3 element and the OR 10 element of the threshold unit 2 generate logical zero signals. All irregular n-bit code combinations can be divided into two types. The first type includes code combinations, each of which contains no more than one unit to its composition. Thus, the first type includes the set of all n-bit unitary codes, as well as a combination consisting of zero values of all input logic variables. The second type consists of / r-bit code combinations containing three or more units. When any wrong code combination of the first type arrives at the device input, an error signal is generated at the output of the NOT 3 element, which passes through the OR 4 element to the output of the device. Indeed, at the output of the element NO 3, the logical function (H /) J is implemented. It contains the disjunction of pair conjunctions 2 (n - 2) 1 of the form XiXj (), (i, ..., p); i.e., the FI function is addressed to the unit only when one of the first type of incorrect code combinations arrives at the device input. If one of the wrong code combinations of the second type arrives at the input of the device, an error signal is generated at the output of the element OR 10 of the threshold block 2. Indeed, the logical function fz y consisting of a disjunctive volume of pair conjunctions is realized at the output of this element of the form ZjZj (), (i,, ..., p-1). Thus, the FZ function is inverted to unity if, in the output group, the threshold unit 1 finds no less than two excited outputs. This is possible only in the case when the input of the device receives an “-sign of the code combination containing at least three units. The proposed device differs from the prototype in its simplicity, a high degree of regularity, and the consistency of anapture costs in the calculated one input of the device. These qualities of the device help to simplify its manufacture and testing. The total delay of signal propagation in the device does not exceed the value of- (g + 2) t, where t is the delay time of the signal by one element AND, OR, NOT.