SU1084798A1 - Device for calculating modulo n remainder for given number - Google Patents

Device for calculating modulo n remainder for given number Download PDF

Info

Publication number
SU1084798A1
SU1084798A1 SU823517317A SU3517317A SU1084798A1 SU 1084798 A1 SU1084798 A1 SU 1084798A1 SU 823517317 A SU823517317 A SU 823517317A SU 3517317 A SU3517317 A SU 3517317A SU 1084798 A1 SU1084798 A1 SU 1084798A1
Authority
SU
USSR - Soviet Union
Prior art keywords
adder
binary
bit
bits
term
Prior art date
Application number
SU823517317A
Other languages
Russian (ru)
Inventor
Владимир Леонидович Кабанов
Original Assignee
Предприятие П/Я В-2189
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Предприятие П/Я В-2189 filed Critical Предприятие П/Я В-2189
Priority to SU823517317A priority Critical patent/SU1084798A1/en
Application granted granted Critical
Publication of SU1084798A1 publication Critical patent/SU1084798A1/en

Links

Landscapes

  • Error Detection And Correction (AREA)

Abstract

УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ ОСТАТКА ПО МОДУЛЮ ОТ ЧИСЛА, содержащее сумматор по модулю, о т л и.ч аю щ е е с   тем, что, с целью уменьшени  объема оборудовани , сумматор по модулю содержит ( TIN - 1) двоичных сумматоров, где щ - разр дность модул , причем первый двоичный сумматор содержит ( Л « t - 1) разр дов ( - разр дность контролируемого числа), разр дность каждого последующего двоичного сумматора на единицу меньше разр дности предьщу- щего двоичного сумматора, вход пер вого слагаемого каждого ч -го разр да первого двоичного сумматора A DEVICE TO CALCULATE THE REMAIN ON A MODULE FROM A NUMBER, containing a modulo adder, that is, with the aim of reducing the amount of equipment, the modulo adder contains (TIN - 1) binary adders, where ni - modulus, the first binary adder contains (L «t - 1) bits (- the number of the controlled number), the size of each subsequent binary adder is one less than the size of the previous binary adder, the input of the first term of each h is first bit of the first binary adder

Description

Изобретение относитс  к вычислительной технике и может быть исполь зовано дл  свертки чисел по. модулю. Известно устройство дл  выделени  остатка по переменному модулю, содержащее регистры числа и модул , дешифраторы числа и модул , коммутатор и шифратор и Недостатком данного устройства  вл етс  большой объем аппаратуры коммутатора и шифратора. Наиболее близким по технической сущности  вл етс  преобразователь двоичного кода в код по модулю, содержащий сумматор по модулю, К шифраторов m разр дов (tT п , И - раз р дность двоичного кода, К р ) входной регистр, вход которого  вл  етс  входом устройства, выходы вход ного регистра подключены к входам соответствующих шифраторов, выходы шифраторов подключены к соответствую щим входам сумматора по модулю l2j, Недостатком преобразовател   вл ютй  значительные аппаратурные за раты на реализацию шифраторов при переменном значении модул . Цель изобретени  - уменьшение объема аппаратуры. Поставленна  цель достигаетс  тем, что в устройстве дл  вычислени остатка по модулю от числа, содержа щем сумматор по модулю, сумматор по модулю содержит ( JYi - t) двоичных сумматоров, где т - разр дность моду л , причем первый двоичньй сумматор содержит ( ,п + ryi - 1) разр дов (П разр дность контролируемого числа), разр дность каждого последзпощего дв&ичного сумматора на единицу меньше разр дности предшествующего двоич ного сумматора, вход первого слагаемого каждого i-го разр да первого двоичного сумматора (О i : И - 2) соединен с ( i + 1)-м разр дом контролируемого , числа, вход первого слагаемого калщого j -го разр да (h - 14 i М + m - 2) первого двоичного сумматора соединен с шиной нулевого сигнала, вход первого слагаемого каждого k-го разр да -го двоичного Сумматора (I Kfcim- 1, + + ГЯ Р) соединен с выходом суммы (k + 1)-го разр да (f - 1)-го двоич ного сумматора, первые входы второго слагаемого каждого двоичного сумматора соединены с соответствующим разр дом входа кода модул  устройст98 , входы переноса каждого двоичного на сумматора соединены с шиной единичного потенциала, выход суммы нулевого разр да каждого р-го двоичного сумматора (1 1 ) - 1) соединен с вторыми входами второго слагаемого , р - X разр дов всех двоичных сумматоров , выход суммы каждогоS-го разр да последнего двоичного сумматора (,Г)- 1) соединен с вторыми входами второго слагаемого ( VY1 + 5 - 1)-х разр дов двоичных сумматоров,, выходы суммы ( Hi - г)-х разр дов последнего двоичного сумматора (О 1 w - 1)  вл ютс  выходом устройства. За счет входной логики в цепи второго слагаемого сумматоры реализуют функцию двоичного вычитани , где вычитаемое управл етс  значением соответствующего разрг да кода основани . Реализаци  этой функции и организаци  св зей мелщу входами и выходами сумматоров обеспечивает алгоритм целочисленного делени  двоичного числа на значение основани , причем деление осуществл етс  со стороны мпадших разр дов в сторону старших . Прин ты следующие обозначени : А исходное число; р - модуль Ал Od - соответственно цела  часть и остаток от делени  , на р, число А  вл етс  результатом указанного алгоритма целочисленного делени  и определ етс  выражением - О (р -) А А. где (f(p) - функци  Эйлера основани  k - натуральное число, величина которого определ етс  длиной гшгоритма. В двоичном исчислении, при разр дности исходного числа А, значение разр дов числа А с П-го и старше определ ютс  только зн(ачени ми разр дов второго слагаемого выражени  (1). При разр дности модул  т группа из m последовательных разр дов кода второго слагаеиого однозначно определ ет остаток и может буть исользована дл  организации модульньк ействий. При ограничении алгоритма разр дностью ( + т в разр дах с п -го по П+Ш-Й образуетс  остаток сА , кодированный группой из m последователь ных разр дов элемента двоичного баз са, имеющего вид - 1 (р -ОС) R(ot) На чертеже представлена функциональна  схема устройства, предназначенного дл  вычислени  четырех по ледовательных разр дов кода R (о(,) по любому нечетному 4-разр дному мо дулю от 12-разр дного двоичного числа. В идентификации логических элементов использованы стандартные обозначени . Устройство содержит двоичные сум маторы 1 - 3 и сумматор 4 по модулю Входные и выходные значени  предполагаютс  двоично-кодированными и обозначены: исходное двоичное число ... модуль , причем мпадший разр д модул  предполагаетс  всегда единичным (PQ 1) .код остатка г,} Г fj, В схеме используютс  одноразр дные сумматоры с входной логикой в цепи второго слагаемого. Входна  ло гика обеспечивает выполнение логической функции штрих Шеффера от других переменных. Одноразр дные сумматоры соединены в три двоичньк сумматора: первый- - 15-разр дный, второй - 14-разр дный, третий - 13раэр днь . За счет инверсии в логической функции и сигнала переноса в нулево разр д каждый из сумматоров реализуThe invention relates to computing and can be used to convolve numbers by. module. A device for allocating the remainder in a variable module is known, which contains the number and module registers, the number and module decoders, the switch and the encoder, and the disadvantage of this device is the large amount of switch and encoder hardware. The closest in technical essence is a converter of a binary code into a modular code containing a modulo adder, K encoders m bits (tT n, AND is the binary code resolution, K p) the input register, whose input is the device input, the inputs of the input register are connected to the inputs of the respective encoders, the outputs of the encoders are connected to the corresponding inputs of the modulo l2j modulator. The disadvantage of the converter is significant hardware costs for implementing the encoders for a variable value of the module. The purpose of the invention is to reduce the volume of equipment. The goal is achieved by the fact that in a device for calculating the modulo residue of a number containing a modulo adder, the modulo adder contains (JYi - t) binary adders, where t is the modulus size and the first binary adder contains (, + ryi - 1) bits (P the size of the controlled number), the size of each post-secondary two & egg accumulator is one less than the size of the previous binary adder, the input of the first term of each i-th bit of the first binary adder (O i: And - 2) connected to (i + 1) -th bit controlled, numbers, the input of the first term of each j-th bit (h - 14 i M + m - 2) of the first binary adder is connected to the zero signal bus, the input of the first term of each k-th bit of the second binary adder (I Kfcim- 1, + + ГЯ Р) is connected to the output of the sum of (k + 1) -th bit (f - 1) -th binary adder, the first inputs of the second term of each binary adder are connected to the corresponding input of the module code of the device, transfer inputs each binary on the adder is connected to a single potential bus, the output of the sum of zero ra the p of each p-th binary adder (1 1) - 1) is connected to the second inputs of the second term, p - X bits of all binary adders, the output of the sum of each S-th digit of the last binary adder (, G) - 1) is connected to The second inputs of the second term (VY1 + 5 - 1) of the bits of the binary adders, the outputs of the sum (Hi - g) of the bits of the last binary adder (O 1 w - 1) are the output of the device. Due to the input logic in the circuit of the second term, the adders realize the function of binary subtraction, where the deductible is controlled by the value of the corresponding base code release. The implementation of this function and the organization of links to the scrapping of the inputs and outputs of the adders provides an algorithm for dividing the binary number by the base value, and the division is performed from the leading bits to the higher bits. The following notation is taken: And the original number; p - module Al Od - respectively, the integral part and the remainder of division, by p, the number A is the result of the specified integer division algorithm and is defined by the expression - O (p -) A A. where (f (p) is the Euler function of the base k is a positive integer whose value is determined by the length of the algorithm.In binary terms, when the initial number A is wider, the value of the digits of number A from Nth and older are determined only by the values (the values of the second term of expression in (1). bits modulate a group of m consecutive bits of the second-slot code It uniquely identifies the remainder and can be used to organize modularities. When the algorithm is limited by the size (+ m in bits from the nth to n + nk, the remainder is formed, coded by a group of m consecutive bits of the binary base element Ca, having the form - 1 (p -OC) R (ot) The drawing shows a functional diagram of a device designed to calculate the four successive bits of the code R (o (,) on any odd 4-bit modulus from a 12-bit one binary number. Standard identification is used to identify logic elements. The device contains binary summs 1 - 3 and adder 4 modulo. Input and output values are assumed to be binary-coded and are denoted: initial binary number ... module, with the lowest bit of the module being assumed to be always single (PQ 1). Residue code r,} Г fj, The circuit uses single-digit adders with input logic in the circuit of the second term. The input logic provides the execution of the Schaeffer dash logic function of other variables. One-bit adders are connected to three binary adders: the first is a 15-bit, the second is a 14-bit, and the third is 13 days. Due to the inversion in the logic function and the signal transfer to the zero bit, each of the adders realizes

о|ц Ofl а, Qg От Об 05 04 -i оo | q Ofl a, Qg From Ob 05 04 -i o

чОк piC3iepia,2 pidn , p.cxgp aVpiOife p, zOrt pioJa PJ«;, piolo PICK; pjo paoV p2afa PzOj joo рзОп ,. ргаюрэадрэабрзау РзД4 i ČC piC3iepia, 2 pidn, p.cxgp aVpiOife p, zOrt pioJa PJ ;, piolo PICK; pjo paoV p2afa PzOj joo rzOp,. regrayadraabrzau Rzd4 i

aj, а,5 а, а,,, о, а«, ag а,, а ад 04 а, aj, a, 5 a, a ,, a, o, a “, ag a ,, a hell 04 a,

Значение 3,5 а aj, а  вл етс  кодом остатка Г; 2 The value of 3.5 a is aj, and is the residual code G; 2

Предлагаемое устройство позвол ет примен ть дл  своего пост- ,The proposed device allows the use of its post,

роени  однотипные, элементы и обеспечивает значительную экономию аппаратуры по сравнению с прототипом. ет функцию двоичного вычитани , Уменьшаемыми  вл ютс  дл  первого сумматора - первое слагаемое, дл  второго - значени  выходов суммы, начина  с выхода первого разр да, первого сумматора, дл  третьего - .. значени  выходов суммы, начина  с выхода первого разр да, в,торого сумматора . Вычитаемым  вл етс  двоичное значение, определ емое логическим умножением двух переменных. Первой переменной  вл ютс  значени  разр дов двоичного числа, у котороiro значение нулевого разр да равно а., значение первого разр да равно I значению нулевого выхода первого сумматора , значение второго разр да равно значению нулевого выхода втоporo сумматора, значение третьего и последующих разр дов равно значе ни м выходов третьего сумматора, начина  с нулевого разр да. Второй переменной  вл етс  значение разр дов кода модул , причем дл  первого сумматора - значение р, дл  второг го - Ру, дл  третьего - Р. Работа устройства заключаетс  в вычислении разности между уменьшаемым первого сумматора и сзгммой вычитаемых всех трех сумматоров, при этом значени  старших разр дов вычитаемых определ ютс  реализацией функции вычитани  в младших разр дах. Обознача  а, значение первой переменной вычитаемого, где i - соответствует нумерации св зей по функцио|нальной схеме, алгоритм работы имеет видIt is the same type, elements and provides significant savings in equipment compared to the prototype. There is a binary subtraction function. The first addend is decremented for the first adder, the sum of the output of the first one, the first adder for the second, the third adder, for the third is the value of the total output, starting with the first one, second adder. A subtractive is a binary value determined by the logical multiplication of two variables. The first variable is the value of the bits of the binary number, where the value of the zero bit is a., The value of the first bit is equal to I the value of the zero output of the first adder, the value of the second bit is equal to the value of the zero output of the second poro adder the values of the outputs of the third adder, starting with a zero bit. The second variable is the value of the code bits of the module, the value of p for the first adder, Py for the second, and P. the third for device operation. The device consists in calculating the difference between the first adder and the subtracted all three adders, The bits of the subtractable are determined by the implementation of the subtract function in the lower bits. The designation a, the value of the first variable of the subtracted, where i - corresponds to the numbering of the links according to the functional scheme, the operation algorithm has the form

Claims (1)

УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ ОСТАТКА ПО МОДУЛЮ ОТ ЧИСЛА, содержащее сумматор по модулю, отличающееся тем, что, с целью уменьшения объема оборудования, сумматор по модулю содержит ( Тй - 1) двоичных сумматоров, где щ - разрядность модуля, причем первый двоичный сумматор содержит ( ,П + гъ - 1) разрядов ( in - разрядность контролируемого числа), разрядность каждого последующего двоичного сумматора на единицу меньше разрядности предыдущего двоичного сумматора, вход пер- 1вого слагаемого каждого ч -го разряда первого двоичного сумматора (04ΐί η' -2) соединен с ( i + 1)-м разрядом 1 контролируемого числа, вход первого слагаемого каждого -го разряда (П - 14 j 4 η + щ - 2) первого двоим- ; кого сумматора соединен с шиной нулевого сигнала, вход первого слагаемого каждого к-го разряда £ -го двоичного сумматора (К С < щ - 1, 0 έ ki n + η) -β) соединен с выходом суммы ( к + 1)-го разряда (Е -1)-го двоичного сумматора, первые входы второго слагаемого каждого двоичного сумматора соединены с соответствующими разрядами входа кода модуля устройства, входы переноса каждого двоичного сумматора соединены с шиной единичного потенциала, выход суммы нулевого разряда каждого р-го двоичного сумматора (16р< И -1) соединен с вторыми входами второго слагаемого р - х разрядов всех двоичных сумматоров, выход суммы каждого^ -го разряда последовательного двоичного сумматора (1 Б < ηDEVICE FOR CALCULATING THE RESIDUAL MODULE FROM THE NUMBER, containing a modulo adder, characterized in that, in order to reduce the amount of equipment, the modulo adder contains (Ty - 1) binary adders, where u is the bit capacity of the module, and the first binary adder contains (, rb + n - 1) bits (in - bit number controlled), each successive bit binary adder at one less than the bit preceding binary adder, one input of the first term per- each h -th bit of the first binary adder (04ΐί η '-2) coupled with (i + 1) th discharge controlled number 1, the input of the first term each -th bit (n - j 14 4 η + u - 2) of the first dvoim-; of the adder connected to the zero signal bus, the input of the first term of each kth digit of the ith binary adder (K C <n - 1, 0 έ ki n + η) -β) is connected to the output of the sum of (k + 1) the discharge of the (E -1) -th binary adder, the first inputs of the second term of each binary adder are connected to the corresponding bits of the code input of the device module, the transfer inputs of each binary adder are connected to the unit potential bus, the output of the zero-bit sum of each r-th binary adder (16р <And -1) is connected to the second inputs of the second term p - x bits of the binary adders, the sum output of each serial binary adder ^ -th bit (B 1 <η - 1) соединены с вторыми входами второго слагаемого (+ 5 — 1) разрядов всех двоичных сумматоров, выходы суммы (,п -J* )-х разрядов последнего двоичного сумматора (0 4 Л 4 w ~-- 1) are connected to the second inputs of the second term (+ 5 - 1) bits of all binary adders, the outputs of the sum of (, n -J *) -th bits of the last binary adder (0 4 Л 4 w ~ - - 1) являются выходом устройства/- 1) are the output of the device / SU n„ 1084798SU n „1084798
SU823517317A 1982-12-03 1982-12-03 Device for calculating modulo n remainder for given number SU1084798A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU823517317A SU1084798A1 (en) 1982-12-03 1982-12-03 Device for calculating modulo n remainder for given number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU823517317A SU1084798A1 (en) 1982-12-03 1982-12-03 Device for calculating modulo n remainder for given number

Publications (1)

Publication Number Publication Date
SU1084798A1 true SU1084798A1 (en) 1984-04-07

Family

ID=21037669

Family Applications (1)

Application Number Title Priority Date Filing Date
SU823517317A SU1084798A1 (en) 1982-12-03 1982-12-03 Device for calculating modulo n remainder for given number

Country Status (1)

Country Link
SU (1) SU1084798A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР № 928359, кл. G 06 F 11/08, 1980. 2. Авторское свидетельство СССР № 902013, кл. G 06 F 5/02, 1980 (прототип). *

Similar Documents

Publication Publication Date Title
GB1390385A (en) Variable length arithmetic unit
SU1084798A1 (en) Device for calculating modulo n remainder for given number
JPS5447539A (en) Digital binary multiplier circuit
GB867191A (en) Improvements in apparatus for converting data in a first number system to one in a different number system, and more particularly for binary to decimal conversion, and vice versa
SU1095169A1 (en) Translator from binary-coded decimal code to binary code
SU809154A1 (en) Polyadic-to-sidual class code converter
SU1541596A1 (en) Division device
SU1478212A1 (en) Divider
SU1283979A1 (en) Binary-coded decimal code-to-binary code converter
SU1536510A1 (en) Binary coded decimal code-to-binary code converter
SU572781A1 (en) Radix converter of binary-decimal numbers into binary numbers
SU860055A1 (en) Converter of bcd numbers in 4,2,2,1 code to binary numbers
SU1397919A1 (en) Device for forming modulo remainders
SU1020834A1 (en) Walsh spectrum digital analyzer
SU798800A1 (en) Binary-decimal- to-binary code converter
SU482739A1 (en) Accumulator
GB2056143A (en) Signal processing
SU864274A1 (en) Digital orthogonal function generator
SU802962A1 (en) Dividing device
SU732852A1 (en) Position code to large base code converter
SU734678A1 (en) Number adding device
SU1506544A1 (en) Threshold logical element
SU1057971A1 (en) Analog/digital incrementing multiplier
SU822174A1 (en) Converter of direct binary-decimal code into complementary binary-decimal one
SU1282117A1 (en) Dividing device