SU1140118A1 - Device for calculating value of square root - Google Patents

Device for calculating value of square root Download PDF

Info

Publication number
SU1140118A1
SU1140118A1 SU833644704A SU3644704A SU1140118A1 SU 1140118 A1 SU1140118 A1 SU 1140118A1 SU 833644704 A SU833644704 A SU 833644704A SU 3644704 A SU3644704 A SU 3644704A SU 1140118 A1 SU1140118 A1 SU 1140118A1
Authority
SU
USSR - Soviet Union
Prior art keywords
register
adder
bit
inputs
triggers
Prior art date
Application number
SU833644704A
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 SU833644704A priority Critical patent/SU1140118A1/en
Application granted granted Critical
Publication of SU1140118A1 publication Critical patent/SU1140118A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ КВАДРАТНОГО КОРНЯ, содержащее счетчик циклов и сумматор, отличающеес  тем, что, с целью сокращени  аппаратурных затрат, устройство содержит регистр сдвига и регистр результата, содержащий п триггеров (гдеП- разр дность регистра ) , информационные входы триггеров регистра результата соединены с выходом переноса сумматора, тактовый вход 4-го триггера регистра результата A device for calculating a square root, containing a cycle counter and an adder, characterized in that, in order to reduce hardware costs, the device contains a shift register and a result register containing n triggers (where the register register triggers are connected to the output transfer of the adder, clock input 4th trigger register result

Description

90 11 Изобретение относитс  к вычислительной технике и может быть приме- йене дл  аппаратурной реализации опе рации вычислени  квадратного корн . Известно устройство дл  вычислеНИН корн , содержащее счетчик циклов дешифратор со схемами объединени  на выходе,два регистра сдвига и параллельный сумматор, причем выходы счет чика циклов подключены к входам дешифратора , выходы которого через схе мы объединени  подсоединены к соответствующим разр дам регистра, выходы которого соединены с входами сумматора, выход триггера знакового разр да сумматора соединен с входом дешифратора. Наиболее близким к предлагаемому  вл етс  устройство дл  вычислени  квадратного корн , содержащее счетчи циклов, дешифратор и коммутатор, выход которого соединен с информационными входами сумматора, выход знакового разр да которого соединен с пер вым входом блока управлени , первый выход которого подключен к управл ющему входу коммутатора, а второй выход блока управлени   вл етс  выходо результата устройства, первый и второй входа синхронизации устройства . соединены с входом счетчика циклов и входом управлени  сумматора и  вл ют с  одновременно вторым и третьим вхо дами блока управлени . Недостатком известных устройств,  вл ютс  значительные аппаратурные затраты. Цель изобретени  - сокращение аппаратурных затрат. Поставленна  цель достигаетс  тем что устройство дл  вычислени  квадра ного корн , содержащее счетчик циклов и сумматор, содержит регистр сдвига и регистр результата, содер-. жащий (1 триггеров (где h - разр дность регистра), информационные входы триггеров регистра результата сое динены с выходом переноса сумматора, тактовый вход i -го тдетгера регистра результата ( i 3,и ) соединен с входом установки -нул  (i-2)-ro три гера регистра результата и с выходом -го разр да счетчика циклов, тактовые входы первого и второго триггеров регистра результата соединены с выходами соответственно первого и второго.разр дов-счетчика цик лов, выход (1 + 1)-го разр да которого 82 соединен с входами установки нул  ()-ro и триггеров регистра результата, выходы триггеров регистра результата соединены соответственно с разр дными входами первого слагаемого сумматора, (И+1)-й разр дный вход первого слагаемого которого соединен с шиной логической единицы устройства , разр дные входы второго слагаемого сумматора соединены соответственно с разр дными выходами регистра сдвига, разр дные входы которого соединены с выходами разр дов сумматора . На фиг. 1 представлена блок-схема устройства дли вычислени  квадратного корн } ,на фиг. 2 - схема регистра. Устройство (фиг. 1) содержит счетчик 1 циклов, регистр 2 результата, сумматор 3 и регистр 4 сдвига. Регистр 2 (фиг. 2) содержит триггеры 5, вход 6 установки нул  и информационный вход 7. I Дл  вычислени  квадратного корн  из числа, содержащего л двоичных разр дов, с П-разр дной точностью кольцевой счетчик 1 циклов, регистр 2, сумматор 3 и регистр 4 сдвига должны иметь по (Л+1) разр дов. Вычисление квадратного корн  осуществл етс  следующим образом. Подкоренное выражение заноситс  в регистр 4 сдвига. В исходном состо нии в старшем (левом) разр де (П+1) кольцевого счетчика 1 циклов записана единица, а в старшем разр де (г) + 1) регистра 4 сдвига - ноль. Единица из разр да (п+1) счетчика 1 переписываетс  в (n-tD-e разр ды регистра 2, а в остальных разр дах регистра 2 записаны нули, кроме старшего (левого) разр да (п+1), в котором всегда записана единица. Сначала вычисл ют квадратный корень из старших двух цифр подкоренного выражени . Дл  этого с помощью сумматора 3 производитс  сложение содержимого регистра 2 и содержимог о регистра сдвига 4. Если на выходе сумматора 3 образуетс  сигнал переноса (единица), то перва  цифра корн  равна единице, если сигнала переноса нет,то она равна нулю. Дл  получени  второй цифры корн  производитс  сдвиг кольцевого счетчика 1щклов 1 на один разр д вправо . При этом перва  цифра кору  за31140190 11 The invention relates to computing and can be used for the hardware implementation of the square root calculation operation. It is known a device for computing a root, containing a cycle counter for a decoder with output combining circuits, two shift registers and a parallel adder, with the outputs of the counting loop connected to the inputs of the decoder, the outputs of which through the combining circuit are connected to the corresponding registers, the outputs of which are connected to the inputs of the adder, the trigger output of the sign bit of the adder is connected to the input of the decoder. Closest to the present invention is a device for calculating a square root, containing cycle counters, a decoder and a switch, the output of which is connected to the information inputs of the adder, the output of which is a sign bit connected to the first input of the control unit, the first output of which is connected to the control input of the switch and the second output of the control unit is the output of the device, the first and second synchronization inputs of the device. connected to the input of the cycle counter and the control input of the adder and are simultaneously with the second and third inputs of the control unit. A disadvantage of the known devices are significant hardware costs. The purpose of the invention is to reduce hardware costs. This goal is achieved by the fact that the device for calculating the square root, which contains a cycle counter and an adder, contains a shift register and a result register, containing. storing (1 flip-flops (where h is the register size), information inputs of the flip-flops of the result register are connected to the transfer output of the adder, the clock input of the i th timing register of the result register (i 3, and) is connected to the setup input —noted (i-2) -ro three registers of the result register and with the output of the th digit of the cycle counter, the clock inputs of the first and second triggers of the result register are connected to the outputs of the first and second digits of the cycle counter, the output of which (1 + 1) th 82 is connected to the inputs of the zero setting () -ro and triggers register result, the outputs of the result register triggers are connected respectively to the bit inputs of the first term of the adder, (AND + 1) -th bit input of the first term of which is connected to the bus of the logical unit of the device, the bit inputs of the second term of the adder are connected respectively to the bit outputs of the shift register The bit inputs of which are connected to the outputs of the bits of the adder. In Fig. 1 is a block diagram of a device for calculating the square root}, in Fig. 1. 2 - register scheme. The device (Fig. 1) contains a counter of 1 cycles, a result register 2, an adder 3, and a shift register 4. Register 2 (Fig. 2) contains triggers 5, input 6 sets zero and information input 7. I To calculate the square root of a number containing 1 binary bits, with a P-bit accuracy, the ring counter 1 cycles, register 2, adder 3 and shift register 4 must have at (L + 1) bits. The calculation of the square root is carried out as follows. The root expression is entered in shift register 4. In the initial state, in the senior (left) bit (P + 1) of the ring counter of 1 cycles, one is recorded, and in the highest bit (d) + 1) of the 4 shift register - zero. The unit of the bit (n + 1) of counter 1 is rewritten into (n-tD-e bits of register 2, and the remaining bits of register 2 contain zeros, except for the senior (left) bit (n + 1), in which always the unit is calculated. First, the square root of the upper two digits of the root-expression is calculated. To do this, add the contents of register 2 and the contents of shift register 4 using adder 3. If the transfer signal (unit) is formed at the output of adder 3, the first digit of the root is unity, if there is no transfer signal, then it is equal to zero. and the second digit of the root shifts the ring counter 1 by 1 by one bit to the right. In this case, the first digit of the bark is 311101

носитс  в обратном коде в п-и разр д регистра 2, а единица из Ц-го разр да счетчика 1 переписываетс  в (П-2)-й разр д регистра 2. Если перва  цифра корн  - единица, то в сум- j маторе 3 сформирован остаток, который переписываетс  в регистр 4 сдвига , если цифра корн  - ноль, подкоренное выражение, записанное в регистре 4, остаетс  без изменени . ю Затем производитс  сдвиг регистра 4 на один разр д влево.is in reverse code in the register bit 2 and the unit of the T-bit bit of the counter 1 is rewritten in (П-2) -y bit of the register 2. If the first digit of the root is one, then in the sum of the j 3 a remainder is formed which is rewritten into shift register 4, if the root number is zero, the root expression written in register 4 remains unchanged. Then, the register is shifted 4 by one bit to the left.

Далее процесс вычислени  выполн етс  как и дл  первойЦИФРЫ корн .Further, the calculation process is performed as for the first FIG.

После получени  второй цифры кор- tj н  производитс  сдвиг кольцевого счетчика 1 циклов на один разр д вправо. В (п-1).-й разр д регистра 2 записываетс  втора  цифра корн . Единица из (п-1)-го разр да счетчика 1 пере- 20 писываетс  в (п-З)-й разр д регистра 2 . Затем производитс  сдвиг регистра 4 на один разр д влево и определ етс  треть  цифра корн .After receiving the second digit of the code-tj n, the ring counter of 1 cycles is shifted by one bit to the right. In (n-1).-Th register bit 2, the second digit is recorded. The unit of the (n-1) -th bit of the counter 1 is written to the (n-3) -th bit of the register 2. Then, register 4 is shifted one digit to the left and the third digit of the root is determined.

После выполнени  п циклов в реги- 25 .стре 2 будет записан результат вычислени  квадратного корн  в обратном коде.After completing n cycles in register 25 .stre 2, the result of calculating the square root in the inverse code will be written.

Пример вычислени  квадратного корн  из числа 0,101010,3QAn example of calculating the square root of the number 0.101010.3Q

Исходное состо ние кольцевого ггчетчика 1 циклов; 1000000. 1-й циклП+1 П П -1 П-2 п-З п-4 П-5The initial state of the ring g-meter 1 cycles; 1,000,000. 1st CycleP + 1 P P -1 P-2 PZ P-4 P-5

Регистр 4: 010 10 10Register 4: 010 10 10

Регистр 2: . 1 1 1 О О О ОRegister 2: 1 1 1 О О О О О

Сумматор 3: 001 10 1 ОTotalizer 3: 001 10 1 O

На выходе переноса сумматора 3 единица . После выполнени  суммировани  содержимых регистров 4 и 2 произ-40 водитс  сдвиг кольцевого счетчика циклов на один разр д вправо. При этом формируетс  код: 0100000. Остаток из сумматора 3 переписываетс  в регистр сдвига 4. После этого произ- 45 водитс  сдвиг регистра 4.At the output of the transfer of the adder 3 unit. After performing the summation of the contents of registers 4 and 2, the loop ring counter is shifted by one digit to the right. A code: 0100000 is formed. The remainder of the adder 3 is rewritten into shift register 4. After this, register shift 4 is performed.

2-й цикл2nd cycle

Регистр 4: 0110100Register 4: 0110100

Регистр 2: 1011000Register 2: 1011000

Сумматор 3:0001100 Adder 3: 0001100

На выходе переноса сумматора 3 единица . После суммировани  произво184At the output of the transfer of the adder 3 unit. After the summation of production

дитс  сдвиг счетчика 1. При этом формируетс  код: 0010000.The counter is shifted to 1. The code is: 0010000.

Остаток,из сумматора 3 переписываетс  в регистр 4 сдвига. После этого производитс  сдвиг регистра 4.The remainder of adder 3 is written to shift register 4. Thereafter, register shift 4 is performed.

3-й цикл.3rd cycle.

Регистр А: 0011000Register A: 0011000

Регистр 2: 1001100Register 2: 1001100

Сумматор 3: 1100100 На выходе переноса сумматора 3 ноль . После суммировани  производитс  сдвиг счетчика 1. При этомформируетс  код: 0001000. Содержимое регистра сдвига 4 не измен етс . После этого производитс  сдвиг регистра 4 4-й цикл.Adder 3: 1100100 At the output of the transfer of the adder 3 zero. After summation, the counter is shifted 1. This forms the code: 0001000. The contents of shift register 4 remain unchanged. Thereafter, register shift 4 is performed. 4th cycle.

Регистр 4: 0110000 Регистр 2: 1001110Register 4: 0110000 Register 2: 1001110

Сумматор 3: 1 1 1 1 1 1 ОTotalizer 3: 1 1 1 1 1 1 О

На выходе переноса сумматора 3 ноль . После суммировани  производитс  сдвиг счетчика 1. При этом формируетс  код: 0000100. После этого производитс  сдвиг регистра 4.At the output of the transfer of the adder 3 zero. After summation, the counter 1 is shifted. A code: 0000100 is generated. After this, the register 4 is shifted.

5-й цикл.5th cycle.

Регистр 4: 1100000Register 4: 1,100,000

Регистр 2: 1001111Register 2: 1001111

Сумматор 3:0101111 На выходе переноса сумматора 3 единица . После суммировани  производитс  сдвиг счетчика П. При этом формируетс  код: 0000010. Остаток из сумматора 3 переписываетс  в регистр сдвига 4. После этого производитс  сдвиг регистра 4. 6-й цикл.Adder 3: 0101111 At the output of the transfer of the adder 3 unit. After summation, the counter is shifted. In this case, the code is formed: 0000010. The remainder of the adder 3 is written to the shift register 4. After this, the register 4 is shifted. 6th cycle.

Регистр 4: 101 1 1 10 Регистр 2: 1001101.Register 4: 101 1 1 10 Register 2: 1001101.

Сумматор 3: О 1 О 1 О 1 1 На выходе переноса сумматора 3 единица . После суммировани  производитс  сдвиг счетчика 1, При этом формируетс  код: 0000001.Adder 3: O 1 O 1 O 1 1 At the output of the transfer of the adder 3 unit. After summation, the counter 1 is shifted. A code is generated: 0000001.

Дл  вычислени  квадратного корн  3 числа, содержащего двоичные разр ды , сп -разр дной точностью требуетс  И циклов.To calculate the square root of 3 numbers containing binary bits, sp-bit precision requires AND cycles.

В предлагаемс  устройстве сокращены аппаратурные затраты.The proposed device reduces hardware costs.

П-1P-1

ЯI

/7-4/ 7-4

a-Ja-j

fl-3fl-3

UkUk

п-2p-2

П-1P-1

пP

П5A5

л-4l-4

ЛЗLZ

Фиг.22

Claims (1)

УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ КВАДРАТНОГО КОРНЯ, содержащее счетчик циклов и сумматор, отличающееся тем, что, с целью сокращения аппаратурных затрат, устройство содержит регистр сдвига и регистр результата, содержащий η триггеров (где П- разрядность регистра) , информационные входы триггеров регистра результата соединены с выходом переноса сумматора, тактовый вход (-го триггера регистра результатта (1=3,и) соединен с входом установки нуля (*-2)-го триггера регистра результата и выходом <-го разряда счетчика циклов, тактовые входы первого и второго триггеров регистра результата соединены с выходами соответственно первого и второго раз- . рядов счетчика циклов, выход (п+1)го разряда которого соединен с входами установки нуля (П”1)~го и η-го триггеров регистра результата, выходы триггеров регистра результата соединены соответственно с разрядными входами первого слагаемого сумматора (п+1)-й разрядный вход первого слагаемого которого соединен с шиной логической единицы устройства, разрядные входы второго слагаемого соединены соответственно с разрядными выходами регистра сдвига, разрядные входы которого соединены с выходами разрядов сумматора.DEVICE FOR CALCULATING A SQUARE ROOT, containing a cycle counter and an adder, characterized in that, in order to reduce hardware costs, the device contains a shift register and a result register containing η triggers (where P is the bit capacity of the register), the information inputs of the triggers of the result register are connected to the output adder transfer, the clock input of the (th trigger of the result register (1 = 3, and) is connected to the zero setting input of the (* -2) th trigger of the result register and the output of the <th digit of the cycle counter, clock inputs of the first and second o triggers of the result register are connected to the outputs of the first and second rows of the cycle counter, the output of the (n + 1) th category of which is connected to the inputs of setting the zero (П ”1) ~ th and ηth triggers of the result register, the outputs of the register triggers the result are connected respectively to the bit inputs of the first term of the adder (n + 1) th bit input of the first term of which is connected to the bus of the logical unit of the device, the bit inputs of the second term are connected to the bit outputs of the shift register, bit dnye whose inputs are connected to outputs of the adder bits. 0Ζ/Ζ. /0Ζ / Ζ. / 1 1140118 21 1140118 2
SU833644704A 1983-09-27 1983-09-27 Device for calculating value of square root SU1140118A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU833644704A SU1140118A1 (en) 1983-09-27 1983-09-27 Device for calculating value of square root

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU833644704A SU1140118A1 (en) 1983-09-27 1983-09-27 Device for calculating value of square root

Publications (1)

Publication Number Publication Date
SU1140118A1 true SU1140118A1 (en) 1985-02-15

Family

ID=21082687

Family Applications (1)

Application Number Title Priority Date Filing Date
SU833644704A SU1140118A1 (en) 1983-09-27 1983-09-27 Device for calculating value of square root

Country Status (1)

Country Link
SU (1) SU1140118A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР № 239665, кл. G 06 F 7/552, 1969. 2. Авторское свидетельство СССР № 877529, кл. G 06 F 7/552, 1979 (прототип). *

Similar Documents

Publication Publication Date Title
SU1140118A1 (en) Device for calculating value of square root
SU1280624A1 (en) Device for multiplying the floating point numbers
SU1283756A1 (en) Device for calculating value of square root
SU734669A1 (en) Converter of proper binary fraction into binary-decimal fraction and integer binary-decimal numbers into binary numbers
SU734678A1 (en) Number adding device
SU930689A1 (en) Functional counter
SU877529A1 (en) Device for computing square root
SU544960A1 (en) Square root extractor
SU1136151A1 (en) Multiplying device
SU1115045A1 (en) P-ary position code-to-binary code translator
SU1012245A1 (en) Multiplication device
SU1157541A1 (en) Sequential multiplying device
SU1401448A1 (en) Apparatus for implementing boolean symmetrical functions
SU669354A1 (en) Modulo three adder
SU1016780A1 (en) Device for decimal number multiplication
SU674018A1 (en) Adder
SU479111A1 (en) A device for simultaneously performing arithmetic operations on a set of numbers
SU960807A2 (en) Function converter
SU1280615A1 (en) Versions of device for squaring binary numbers
SU1554143A1 (en) Binary-coded decimal code-to-binary code converter
SU491946A1 (en) Root degree extractor
SU1287145A1 (en) Computing cell
SU1275432A1 (en) Multiplying device
SU1420600A1 (en) Function computing device
SU1667061A1 (en) Multiplication device