Изобретение относитс к вычислительной технике и может быть использовано в устройствах различного назн чени дл преобразовани пр мых кодо в дополнительные и обратные в системах счислени с основанием 2,3,...,М Известен преобразователь пр мого двоично-дес тичного кода в дополнительный двоично-дес тичный код, содержащий тетрады элементов НЕ, входы которых вл ютс входами преобразовател , суммирующие блоки, три группы элементов И, элемент ИЛИ и два элемента НЕ 1. Недостаток известного преобразова тел состоит в относительной узости функциональных возможностей, так как он реализует одну функцию преобразовани и только в одной (дес тичной) системе счислени , Наиболее близким к изобретению по технической сущности и .схемному построению вл етс преобразователь пр мого кода в дополнительньй, содер жащий группу элементов И и разр дный преобразователь, состо щий из элемен та ИЛИ-НЕ, элемента ИЛИ и триггера, причем 1 входов i-ro элемента И груп пы соединены с инверсными информационными входами i младших разр дов преобразовател 23Недостаток данного преобразовател заключаетс в относительной узости функциональных возможностей, так как он обеспечивает только одностороннее преобразование и только в одной системе счислени (двоичной). Целью изобретени вл етс расширение класса решаемых задач за счет реализации двустороннего преобразовани пр мого М-ичного кода в обратный и дополнительный. Поставленна цель достигаетс тем, что в преобразователе пр мого кода в пр мой, обратный и дополнительный код, содержащем группу из (n-l)-ro элемента И, где h - число разр дов входного кода, и h разр дных преобразователей, информа ционные входы и выходы которых вл ютс соответственно информационными входами и выходами преобразовател , вход переноса -го () разр дного преобразовател соединен с выходом (э-1)-го элемента И группы, входы которого соединены с группой первых двоичных информационных входов М-ичных разр дов с первого по 8I i-й преобразовател , (fi+1) вход i-ro элемента И соединен с первым управл кжим входом преобразовател , а каждый разр дный преобразователь содержит элемент НЕ, три группы по М элементов И и группу из М элементов ИЛИ, вькоды которых вл ютс информационными выходами разр дного преобразовател , второй управл кмций вход которого соединен с первыми входами элементов И первой группы, вторые входы которых соединены с соответствующими информационными входами разр дного преобразовател , третий управл ющий вход которого соединен с первыми входами элементов И второй и третьей групп, вторые входы которьпс соединены соответственно с выходом элемента НЕ и входом переноса разр дного преобразовател , информационный вход j-ro разр да которого () соединен с третьим входом (M+2-j)-ro элемента И второй группы и с третьим входом (M+1-j)-ro по модулю m элемента И третьей группы, выходы j-х элементов И первой, второй и третьей групп соединены с входами j-го элемента ИЛИ группы, вход переноса разр дного преобразовател соединен с входом элемента НЕ. На чертеже изображена функциональна схема одного разр да преобразовател кодов дл случа построени троичного преобразовател . На чертеже обозначено: h-e разр дные преобразователи 1, каждый из которых преобразует пр мой код в дополнительный и обратный в системах счислени с основанием М, управл ющие входы 2-4, информационные входы 5.1-5.W и выходы 6.1-6.М, вход переноса 7, перва , втора и треть группы элементов И 8-10, элемент НЕ 11,группа элементов ИЛИ 12,. группа элементов И 13. Преобразователь кодов работает следуницим образом. Пр мой код числа в системе счислени с основанием М подают на входы 5.1-5. М, на управл к цие входы 2-3. сигнал 1 или О, на управл кмций вход 4 - 1. При этом на выходах 6.1-6. М разр да происходит формиование пр мого кода, если на- вхое 2 - 1, а на входе 3 - О, и ополнительного или обратного, если на входе 2 - О, а на входе 3 1 . В последнем случае формирование происходит в зависимости от соето ни входовэлемента И 13 групцы. Если на его выходе сигнал 1, сраба тьгеают элементы И 10 и ИЛИ 12, форми рующие дополнительный код, если на его выходе - О, то срабатьгаают эле менты И 9 группы и элементы ИЛИ 12, формирующие обратный код. Пр мой код троичного числа равен 12200 (старший разр д слева), дополнительный - 10100, обратный - 10022. Каждую троичную цифру в виде набора 100, 010 или 001, эквивалентного 0,1 или 2 подают на входы соответствующих разр дов, на вход 2 - О, на входы 3, 4 - 1, что соответствует преобразованию пр мого кода в дополнительный . Элементы И 13 группы трех младших разр дов срабатывают, так как на их входах уровни 1, а элементы И 13 четвертого и п того закрывает О с входа третьего разр да. В соответствии с этим происходит формирование 68 дополнительного кода на выходах 6.16 .3 первых трех младших разр дов и обратного - на выходах четвертого и ПЯТОГО, т.е. кода 10100. Если на вход 4 подают О, то все разр ды формируют обратный код, поскольку на выходе элементов И 13 группы - О, а на выходе элементов НЕ 11 - 1. Аналогично пр(исходит обратное преобразование дополнительного и об- ратного кода в пр мой код. Положительный эффект, выражающийс в расширении функционапьньпс воз .можностей путем Двустороннего преобразовани пр мого кода в дополнительный и обратный (или наоборот), дает возможность примен ть предлагаемый преобразователь кодов как унифицированный узел в устройствах .различного назначени , что приводит к сокраш,ению объема оборудовани .The invention relates to computing and can be used in devices of various purposes for converting direct codes to additional and inverse in number systems with a base of 2,3, ..., M A known converter of a direct binary decimal code into an additional binary number is known. a tenth code containing tetrads of NOT elements whose inputs are converter inputs, summing blocks, three groups of AND elements, an OR element and two NOT elements 1. A disadvantage of the known converter is the relative narrowness of functional capabilities, since it implements one conversion function and only in one (decimal) number system, the closest to the invention in its technical essence and circuit construction is a direct code to additional converter, containing a group of elements AND and a bit converter consisting of an OR-NOT element, an OR element and a trigger, with 1 inputs of the i-ro element AND group being connected to the inverse information inputs of the i lower bits of the converter 23 The disadvantage of this converter is It is in the relative narrowness of the features, as it provides only one-way conversion and only one notation, (binary). The aim of the invention is the expansion of the class of tasks by implementing a two-way conversion of the forward M-ary code to the inverse and additional. The goal is achieved by the fact that in the direct code to direct, inverse, and additional code converters containing a group of (nl) -ro element AND, where h is the number of bits of the input code, and h bit converters, information inputs and the outputs of which are respectively the information inputs and outputs of the converter, the transfer input of the (th) bit converter is connected to the output of the (e-1) -th element AND group, the inputs of which are connected to the group of first binary information inputs of M-ary bits by 8I i-th conversion the caller, (fi + 1) input of the i-ro element AND is connected to the first control of the converter input, and each bit converter contains an element NOT, three groups of M AND elements and a group of M elements OR, which codes are information outputs of the a single converter, the second control unit whose input is connected to the first inputs of elements AND of the first group, the second inputs of which are connected to the corresponding information inputs of the bit converter, the third control input of which is connected to the first inputs of Both the second and third groups, the second inputs of which are connected respectively to the output of the element NOT and the transfer input of the bit converter, whose information input j-ro bit () is connected to the third input of (M + 2-j) -ro element AND of the second group and with the third input (M + 1-j) -ro modulo m of the element AND of the third group, the outputs of the j-th elements of the first, second and third groups are connected to the inputs of the j-th element of the OR group, the transfer input of the discharge converter is connected to the input element is NOT. The drawing shows a functional diagram of a single bit code converter for the case of building a ternary converter. In the drawing, there are: he bit converters 1, each of which converts the direct code to additional and inverse in number systems with a base M, control inputs 2-4, information inputs 5.1-5.W and outputs 6.1-6.M, transfer input 7, first, second and third group of elements AND 8-10, element NOT 11, group of elements OR 12 ,. the element group is And 13. The code converter works as follows. The direct code of the number in the number system with the base M is fed to the inputs 5.1-5. M, for control inputs 2–3. signal 1 or О, for control inputs 4 - 1. At the same time, at outputs 6.1-6. M bit occurs the formation of a direct code, if the input is 2 - 1, and at the input 3 - O, and additional or reverse, if the input 2 - O, and at the input 3 1. In the latter case, the formation takes place depending on the input element and the 13 groups. If at its output signal 1, the elements AND 10 and OR 12 form the additional code, if the output is O, then the elements of the 9th group and the OR elements 12, which form the reverse code, are triggered. The forward code of the ternary number is 12,200 (most significant bit to the left), the additional number is 10,100, the reverse is 10,022. Each 3-digit number in the form of a set of 100, 010, or 001, equivalent to 0.1 or 2, is fed to the inputs of the corresponding bits, to input 2 - O, to inputs 3, 4 - 1, which corresponds to the conversion of a direct code to an additional one. Elements And 13 of the group of three lower order bits work, since at their inputs there are levels 1, and elements 13 of the fourth and fifth close O from the input of the third bit. In accordance with this, the formation of 68 additional codes takes place at the outputs 6.16 .3 of the first three lower order bits and the reverse - at the outputs of the fourth and FIFTH, i.e. code 10100. If O is input to input 4, then all bits form a reverse code, since the output of elements of group 13 is O, and the output of elements NOT 11 is 1. Similarly, the reverse and additional direct code. The positive effect, which is expressed in expanding the functionality of the possibilities by bilaterally transforming the direct code into additional and inverse (or vice versa), makes it possible to apply the proposed code converter as a unified node in devices of various purposes, on leads to sokrash, eniyu equipment volume.
f.}f.}
S.3S.3