SU1280615A1 - Versions of device for squaring binary numbers - Google Patents

Versions of device for squaring binary numbers Download PDF

Info

Publication number
SU1280615A1
SU1280615A1 SU843812942A SU3812942A SU1280615A1 SU 1280615 A1 SU1280615 A1 SU 1280615A1 SU 843812942 A SU843812942 A SU 843812942A SU 3812942 A SU3812942 A SU 3812942A SU 1280615 A1 SU1280615 A1 SU 1280615A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
input
counter
elements
pulse
Prior art date
Application number
SU843812942A
Other languages
Russian (ru)
Inventor
Михаил Алексеевич Дуда
Збышек Иванович Домбровский
Михаил Георгиевич Опаец
Original Assignee
Тернопольский Финансово-Экономический Институт
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 Тернопольский Финансово-Экономический Институт filed Critical Тернопольский Финансово-Экономический Институт
Priority to SU843812942A priority Critical patent/SU1280615A1/en
Application granted granted Critical
Publication of SU1280615A1 publication Critical patent/SU1280615A1/en

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

Изобретение относитс  к области вычислительной техники и позвол ет сократить врем  выполнени  операции возведени  в квадрат двоичных чисел в параллельном коде. Устройство по первому варианту содержит счетчик, сумматор, группу элементов И, два элемента ИЛИ, два элемента задержки и элемент НЕ. Устройство по второму варианту содержит счетчик, сумматор, группу элементов И, п ть элементов И, четыре элемента ИЛИ, элемент задержки и два триггера. Число, которое необходимо возвести в квадрат, записываетс  в счетчике. Затем на тактирующий вход устройства начинает поступать последовательность импульсов . Когда в счетчике будет нулевое с & число, в сумматоре сформирует значение квадрата числа. 2п.ф., 2 ил.The invention relates to the field of computer technology and allows to shorten the execution time of the operation of squaring binary numbers in a parallel code. The device in the first embodiment contains a counter, an adder, a group of AND elements, two OR elements, two delay elements, and an NO element. The device according to the second variant contains a counter, an adder, a group of elements AND, five elements AND, four elements OR, a delay element and two triggers. The number to be squared is recorded in the counter. Then, a pulse sequence begins to arrive at the clock input of the device. When the counter is zero with & the number in the adder will form the value of the square of the number. 2pf., 2 Il.

Description

kEffiafckEffiafc

Claims (2)

112 Изобретение относитс  к вычислительной технике и может быть использовано при построении специализированных вычислителей и функциональных преобразователей. Целью изобретени   вл етс  повышение быстродействи  путем сокращени  числа итерации формировани  приближенного значени  результата. На фиг.1 представ,ена функциональ на  схема устройства по первому варианту; на фиг.2 - функциональна  схема устройства по второму варианту Устройство дл  возведени  двоичны чисел в квадрат по первому варианту (фиг.1) содержит счетчик 1, сумматор 2, группу элементов И 3, первый элемент И 4, первый элемент ИЛИ 5, элемент ИЛИ 6, первый элемент 7 задержки, второй элемент задержки 8, элемент НЕ 9, второй элемент И 10, третий элемент И 11, тактовый вход 12 Устройство дл  возведени  двоичны чисел в квадрат повторому варианту (фиГо2) содержит счетчик 1, сумматор 2, группу элементов И 3, первый элемент И 4, первый элемент ИЛИ 5, второй элемент ИЛИ 6, первый элемент 7 задержки, тактовый вход 12, второй элемент И 13, третий элемент И 14, четвертый элемент И 15, п тый элемент И 16, первый триггер 17, второй триггер 18, третий элемент ИЛИ 19, четвертый элемент ИЛИ 20 и элемент НЕ 21. Устройство дл  возведени  двоичны чисел в квадрат по первому варианту функционирует следующим образом. В исходном состо нии сумматор 2 обнулен, а в счетчике 1 записано дво ичное число X, вследствие чего на выходе второго элемента ИЛИ 6 единичный сигнал. При этом на вход 12 устройства поступает импульсна  последовательность . С приходом первого импульса на вход 12 устройства в первом такте через первые элементы И 4 и ИЛИ 5 вычитаетс  единица из содержимого счетчика 1, Если,после первого такта в счетчике 1 находитс  нулевое число, то на выходе второго элемента ИЛИ 6 бу дет нулевой, а на выходе элемента НЕ 9 - единичный сигналы. При этом импульс с выхода первого элемента И проходит через первый элемент 7 за держки и во втором такте через трет 52 элемент И 11 прибавл ет единицу к содержимому сумматора 2, Если после первого такта в счетчике 1 находитс  не нулевое число, то на выходе второго элемента ИЛИ 6 остаетс  единичный, а на выходе элемента НЕ 9 - нулевой сигналы. При этом импульс с выхода первого элемента И 4 проходит через первый элемент 7 задержки и во втором такте через второй элемент И 10 открывает группу элементов И 3, через которую содержимое счетчика 1 передаетс  на вход второго слагаемого сумматора 2 со сдвигом на два разр да влево, т.е. учетверенное значение. Кроме того, импульс с выхода элемента И 10 проходит через второй элемент 8 задержки и в третьем такте через первьш элемент ШШ 5 вычитаетс  еще одна единица из содержимого счетчика 1. Аналогичные вычислени  провод тс  дл  каждого импульса, поступающего на вход 12 устройства. В момент, когда в счетчике 1 будет нулевое число, на выходе первого элемента ЮТИ 6 будет нулевой сигнал, вследствие чего поступление импульсов через первый элемент И 4, а следовательно, и процесс вычислени  прекрат тс . В результате в счетчике 1 будет нулевое число, а в сумматоре 2 - значение X . Устройство дл  возведени  двоичных чисел в квадрат по второму варианту функционирует следующим образом. В исходном состо нии сумматор 2 обнулен, а в первом триггере 17 и в счетчике 1 записано двоичное число Х, из которого самый младший разр д записан в первом триггере 17, а остальные старшие разр ды двоичного числа X записаны в счетчике 1. При этом если число , то на выходе четертого элемента ИЛИ 20 единичный сигнал. Второй триггер 18 находитс  в нулевом состо нии, вследствие чего на его инверсном выходе единичный сигнал. С приходом первого импульса на вход 12 устройства в первом такте через второй элемент И 13 вычитаетс  единица из числа X, записанного в первом триггере 17 и счетчике 1. Если дл  первого импульса после первого такта в счетчике 1 и первом триггере находитс  нулевое число, то на выходе четвертого элемента ИЛИ 20 будет нулевой, а на выходе эле3 мента HE 21 - единичный сигналы. Пр этом импульс с выхода второго элемента И 13 проходит через третий эл мент ИЛИ Т9, эле -1ент 7 задержки и в втором такте через п тый элемент И 16 прибавл ет единицу к содержимому сумматора 2. После второго такта процесс вычислени  прекращаетс . Если дл  первого импульса после первого такта в счетчике 1 и первом триггере 17 находитс  ненулевое чис ло, то на выходе четвертого элемент ИЛИ 20 остаетс  единичный, а на выходе элемента НЕ 21 - нулевой сигналы . При этом импульс с выхода вто рого элемента И 13 проходит через третий элемент ИЛИ 19, элемент 7 за держки и во втором такте через четвертый элемент И 15 открывает групп элементов И 3, через которую содержимое счетчика 1 и триггера 17 пере даетс  на группу входов сумматора 2 со сдвигом на два разр да влево, т. учетверенное значение. Кроме того, импульс с выхода четвертого элемента И 15 устанавливает второй триггер 18 в единичное состо ние, вследствие чего на его пр мом выходе возникнет единичный, а на инверсном выходе нулевой сигналы. Если после второго такта в счетчике 1 находитс  нулевое число, то на выходе второго элемента ИЛИ 6 нулевой сигнал и процесс вычислени  прекращаетс . Если дл  первого импульса после второго такта в счетчике 1 находитс  ненулевое число, то с приходом второго импульса на вход 12 устройства в первом такте через первые элементы И 4 и ИЛИ 5 вычитаетс  единица из содержимого счетчика 1. В случае, если дл  второго импульса после первого такта в счетчике 1 и первом триггере 17 находитс  нулевое число, то на выходе четвертого элемента ИЛИ 20 будет нулевой , а на выходе элемента НЕ 21 единичный сигналы. При этом импульс с выхода первого элемента И 4 проходит через третий элемент ИЛИ 19, элемент 7 задержки и во втором такте через п тый элемент И 16 прибавл ет единицу к содержимому сумматора 2. Если дл  второго импульса после первого такта в счетчике 1 и в .первом триггере 17 находитс  ненулевое число, ТОна выходе четвертого эле15 мента ИЛИ 20 остаетс  единичный, а на выходе элемента НЕ 21 - нулевой сигналы. При этом импульс с выхода первого элемента И 4 проходит через третий элемент ИЛИ 19, элемент 7 задержки и во втором такте через четвертый элемент И 15 открывает группу элементов И 3, через которую содержимое счетчика 1 и первого триггера 17 передаетс  на группу входов сумматора 2 со сдвигом на два разр да влево, т.е. учетверенное значение. Аналогичные вычислени  провод тс  дл  каждого следующего импульса, поступающего на вход 12 устройства. В момент, когда в счетчике 1 будет нулевое число, на выходе второго элемента ИЛИ 6 возникнет нулевой сигнал, вследствие чего поступление импульсов через первый элемент И 4, а следовательно , и процесс вычислени  прекратитс . В результате в сумматоре 2 будет значение х. Формула изобретени  1. Устройство дл  возведени  двоичных чисел в квадрат, содержащее сумматор, счетчик, группу элементов И, первый элемент И, первый элемент задержки и два элемента ИЛИ, причем тактовый вход устройства соединен с первым входом первого элемента И, выход которого соединен с входом первого элемента задержки и с первым входом первого элемента ИЛИ, выход которого соединен с входом вычитани  счетчика, выходы разр дов счетчика соединены с входами второго элемента ИЛИ, выход которого соединен с вторым входом церврго элемента И, отличающеес  тем, что, с целью повышени  быстродействи  путем сокращени  числа итерации формировани  приближенного значени  результата, в него дополнительно введены два элемента И, второй элемент задержки и элемент НЕ, причем выход второго элемента ИЛИ соединен с входом элемента НЕ, выход которого соединен с первым входом третьего элемента И, выход которого соединен с входом младшего разр да первого слагаемого сумматора, входы второго слагаемого которого соединены с выходами элементов И группы, первые входы которых объединены и соединены с выходом второго элемента И и входом второго элемента задержки, выход которого соединен с 51 вторым входом первого элемента ИЛИ, выход второго элемента ИЛИ соединен с первым входом второго элемента И, второй вход которого соединен с выходом рервого элемента задержки и с вторым входом третьего элемента И, выходы разр дов счетчика соединены со сдвигом на два разр да в сторону старших разр дов с вторыми входами элементов И группы. 112 The invention relates to computing and can be used in the construction of specialized calculators and functional converters. The aim of the invention is to increase speed by reducing the number of iterations in the formation of an approximate result value. Figure 1 presents, ena functional on the device in the first embodiment; 2 shows a functional diagram of the device according to the second embodiment. The device for raising binary numbers into a square according to the first embodiment (FIG. 1) comprises a counter 1, an adder 2, a group of elements AND 3, a first element AND 4, a first element OR 5, an element OR 6, the first delay element 7, the second delay element 8, the HE element 9, the second element AND 10, the third element AND 11, the clock input 12 The device for raising binary numbers into a square of the repeated version (fig.2) contains counter 1, adder 2, a group of elements And 3, the first element and 4, the first element OR 5, the second element OR 6, the first delay element 7, the clock input 12, the second element AND 13, the third element AND 14, the fourth element AND 15, the fifth element AND 16, the first trigger 17, the second trigger 18, the third element OR 19, the fourth element OR 20 and an element NOT 21. A device for raising binary numbers to a square in the first embodiment functions as follows. In the initial state, adder 2 is reset, and counter 1 contains the binary number X, as a result of which the output signal of the second element OR 6 is a single signal. In this case, the input of the device 12 receives a pulse sequence. With the arrival of the first pulse at the input 12 of the device in the first cycle, the first elements AND 4 and OR 5 subtract the unit from the contents of counter 1, If, after the first cycle, counter 1 has a zero number, then the output of the second element OR 6 will be zero, and at the output of the element NOT 9 - single signals. At the same time, the pulse from the output of the first element And passes through the first element 7 of the delay and in the second cycle through the third 52 elements And 11 adds one to the contents of the adder 2. If after the first cycle in the counter 1 there is not a zero number, then at the output of the second element OR 6 remains single, and the output of the element is NOT 9 - zero signals. At the same time, the pulse from the output of the first element 4 passes through the first delay element 7 and in the second cycle through the second element 10 opens a group of elements 3, through which the contents of counter 1 is transmitted to the input of the second term of the adder 2, shifted by two bits to the left, those. quadruple value. In addition, the pulse from the output of the element And 10 passes through the second element 8 of the delay and in the third cycle another element from the contents of the counter 1 is subtracted through the first element of the ШШ 5. Similar calculations are performed for each pulse entering the device 12. At the moment when the counter 1 will have a zero number, the output of the first element of UTI 6 will be a zero signal, as a result of which the flow of pulses through the first element I 4 and, consequently, the calculation process is also stopped. As a result, in the counter 1 there will be a zero number, and in the adder 2 - the value X. The device for squaring binary numbers according to the second variant functions as follows. In the initial state, adder 2 is reset, and in the first trigger 17 and in counter 1 there is written the binary number X, from which the least significant bit is recorded in the first trigger 17, and the remaining high bits of the binary number X are written in counter 1. If the number, then the output of the fourth element OR 20 is a single signal. The second trigger 18 is in the zero state, as a result of which there is a single signal at its inverse output. With the arrival of the first pulse at the input 12 of the device in the first clock, the second element And 13 subtracts one from the number X recorded in the first trigger 17 and the counter 1. If the first pulse after the first clock in the counter 1 and the first trigger is zero, then the output of the fourth element OR 20 will be zero, and at the output of the element HE 21 - a single signal. Next, the pulse from the output of the second element And 13 passes through the third element OR T9, the delay element 1-1 7, and in the second cycle through the fifth element And 16 adds one to the contents of adder 2. After the second cycle, the calculation process stops. If for the first pulse after the first clock cycle in the counter 1 and the first trigger 17 there is a nonzero number, then the fourth element OR 20 remains single, and the element 21 does NOT output zero signals. In this case, the pulse from the output of the second element AND 13 passes through the third element OR 19, the delay element 7 and in the second cycle through the fourth element 15 opens the groups of elements AND 3 through which the contents of counter 1 and trigger 17 are transferred to the group of inputs of the adder 2 with a shift of two digits to the left, that is, a quadruple value. In addition, the pulse from the output of the fourth element I 15 sets the second trigger 18 to the one state, as a result of which a single signal will appear at its direct output and a zero signal at the inverse output. If after the second clock cycle in counter 1 there is a zero number, then at the output of the second element OR 6 a zero signal and the calculation process is terminated. If for the first pulse after the second clock cycle in counter 1 there is a nonzero number, then with the arrival of the second pulse at the input 12 of the device in the first clock cycle, the first elements AND 4 and OR 5 subtract one from the contents of counter 1. In the case of the second pulse after the first one the clock in the counter 1 and the first trigger 17 is a zero number, then the output of the fourth element OR 20 is zero, and the output of the element is NOT 21 single signals. At the same time, the pulse from the output of the first element AND 4 passes through the third element OR 19, the delay element 7 and in the second cycle through the fifth element And 16 adds one to the contents of adder 2. If for the second pulse after the first cycle in counter 1 and c. the first trigger 17 is a non-zero number, then the output of the fourth element OR 20 remains single, and the output of the element HE 21 is a zero signal. In this case, the pulse from the output of the first element AND 4 passes through the third element OR 19, the delay element 7 and in the second cycle through the fourth element AND 15 opens a group of elements AND 3 through which the contents of counter 1 and the first trigger 17 are transmitted to the group of inputs of adder 2 a shift of two digits to the left, i.e. quadruple value. Similar calculations are performed for each next pulse arriving at the device input 12. At the moment when there is a zero number in counter 1, a zero signal will appear at the output of the second element OR 6, as a result of which the pulses flow through the first element 4 and, consequently, the calculation process stops. As a result, adder 2 will have the value x. Claim 1. Device for raising binary numbers into a square, containing adder, counter, AND group, first AND element, first delay element and two OR elements, moreover, the device clock input is connected to the first input of the first AND element, the output of which is connected to the input the first delay element and with the first input of the first OR element, the output of which is connected to the counter subtraction input, the discharge bits of the counter are connected to the inputs of the second OR element, the output of which is connected to the second input of the cervgo element AND, It is distinguished by the fact that, in order to increase speed by reducing the number of iterations to form an approximate result value, two AND elements, a second delay element and an NOT element are additionally introduced, the output of the second element OR is connected to the input of the element NOT, the output of which is connected to the first input the third element And, the output of which is connected to the input of the lower bit of the first term of the adder, the inputs of the second term of which are connected to the outputs of the elements of the And group, the first inputs of which are combined and connected The output of the second element AND and the input of the second delay element, the output of which is connected to the 51 second input of the first OR element, the output of the second OR element, is connected to the first input of the second And element, the second input of which is connected to the output of the third delay element and the second input of the third element And, the outputs of the bits of the counter are connected with a shift by two bits towards the higher bits with the second inputs of the AND elements of the group. 2. Устройство дл  возведени  двоичных чисел в квадрат, содержащее сумматор, счетчик, группу элементов И, первый элемент И, первый элемент задержки и два элемента ИЛИ, причем тактовый вход устройства соединен с первым входом первого элемента И, выход которого соединен с первым вхо дом первого элемента РШИ, выход которого соединен с входом вычитани  счетчика, выходы разр дов счетчика соединены с входами второго элемента ИПИ, выход которого соединен с вторым входом первого элемента И, о т личающеес  тем, что, с делью повьшени  быстродействи  путем сокращени  числа итерации формировани  приближенного значени  результата, в него дополнительно введены два три гера, два элемента ИЛИ, четыре элемента И и элемент НЕ, причем тактовьш вход устройства соединен с первым входом второго элемента И, выход которого соединен со счетным входом первого триггера, пр мой выход кото рого соединен с первьм входом треть его элемента И, выход которого сое5 динен с вторым входом первого элемента ИЛИ, второй вход третьего элемента И соединен с вторым входом второго элемента И и с инверсным выходом второго триггера, вход установки которого соединен с выходом четвертого элемента И, первый вход которого соединен с первым входом п того элемента И, второй вход которого через элемент НЕ соединен с вторым входом четвертого элемента И и третьим входом второго элемента И, выход которого соединен с первым входом третьего элемента ИЛИ, второй вход которого соединен с выходом первого элемента И, выход третьего элеМента ИЛИ через элемент задержки соединен с первым входом четвертого элемента И, выход которого соединен с первыми входами элементов И группы , выходы разр дов счетчика и пр мой выход первого триггера соединены с соответствующими вторыми входами элементов И группы, выходы элементов И группы соединены со сдвигом на два разр да в сторону старших разр дов с входами первого слагаемого сумматора , вход второго слагаемого которого соединен с выходом п того элемента И, вход элемента НЕ соединен с выходом четвертого элемента ИЛИ, первый и второй входы которого соединены с пр мым выходом первого триггера и выходом второго элемента ИЛИ соответственно, пр мой выход второго триггера соединен с третьим входом первого элемента И.2. A device for raising binary numbers into a square containing an adder, a counter, a group of elements AND, a first element AND, a first delay element and two OR elements, the clock input of the device connected to the first input of the first element AND whose output is connected to the first input the first element of the RSHI, the output of which is connected to the subtraction input of the counter, the outputs of the counter bits are connected to the inputs of the second element of the FPI, the output of which is connected to the second input of the first element I, which is related to the speed response By reducing the number of iterations to form an approximate result value, two three three Hera, two OR elements, four AND elements and an NOT element are added to it, and the device input is connected to the first input of the second element AND whose output is connected to the counting input of the first trigger, etc. my output is connected to the first input by a third of its element AND, whose output is connected to the second input of the first element OR, the second input of the third element AND is connected to the second input of the second element AND and to the inverse output the second trigger, the input of which is connected to the output of the fourth element And, the first input of which is connected to the first input of the fifth element And, the second input of which through the element is NOT connected to the second input of the fourth element And and the third input of the second element And whose output is connected to the first the input of the third element OR, the second input of which is connected to the output of the first element AND, the output of the third element OR through the delay element connected to the first input of the fourth element AND, the output of which is connected to the first inputs of the element Both the groups, the outputs of the bits of the counter and the direct output of the first trigger are connected to the corresponding second inputs of the elements of the group, the outputs of the elements of the group and are connected with a shift of two bits towards the higher bits with the inputs of the first term of the adder, the input of the second term of which is connected with the output of the fifth element AND, the input of the element is NOT connected to the output of the fourth element OR, the first and second inputs of which are connected to the direct output of the first trigger and the output of the second element OR, respectively, the direct output of the second second latch connected to the third input of the first element I. лl Д.D. Фие.Phie. Фиг. 2FIG. 2
SU843812942A 1984-11-10 1984-11-10 Versions of device for squaring binary numbers SU1280615A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU843812942A SU1280615A1 (en) 1984-11-10 1984-11-10 Versions of device for squaring binary numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU843812942A SU1280615A1 (en) 1984-11-10 1984-11-10 Versions of device for squaring binary numbers

Publications (1)

Publication Number Publication Date
SU1280615A1 true SU1280615A1 (en) 1986-12-30

Family

ID=21146925

Family Applications (1)

Application Number Title Priority Date Filing Date
SU843812942A SU1280615A1 (en) 1984-11-10 1984-11-10 Versions of device for squaring binary numbers

Country Status (1)

Country Link
SU (1) SU1280615A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 675421, кл. G 06 F 7/38, 1977. Авторское свидетелхтство СССР № 999047, кл. С 06 F 7/552, 1980. *

Similar Documents

Publication Publication Date Title
SU1280615A1 (en) Versions of device for squaring binary numbers
SU1162040A1 (en) Digital accumalator
SU1111154A1 (en) Multiplying device
SU1140117A1 (en) Device for extracting square root
SU1113799A1 (en) Device for extracting square root
SU911521A1 (en) Digital function generator
SU1171782A1 (en) Adder-subtracter
SU1319028A1 (en) Digital pulse repetition frequency multiplier
SU1277387A2 (en) Pulse repetition frequency divider
SU877529A1 (en) Device for computing square root
SU1765839A1 (en) Binary number multiplier
SU1596322A1 (en) Device for squaring binary numbers
SU1660173A1 (en) Counter with checking
SU517999A1 (en) Voltage Converter to Bit Code Coding
SU1140118A1 (en) Device for calculating value of square root
RU1829031C (en) Accumulating adder
SU746520A1 (en) Variable priority device
SU1115051A1 (en) Device for calculating squared number
SU1405050A1 (en) Device for computing inverse value of normalized binary fraction
SU1437877A1 (en) Device for smoothing signals
SU790346A1 (en) Pulse counter
SU614444A1 (en) Digital integrator storage
SU1043636A1 (en) Device for number rounding
SU1302320A1 (en) Shift register
SU1061264A1 (en) Counter