SU1591008A1 - Device for computing logarithms of numbers - Google Patents

Device for computing logarithms of numbers Download PDF

Info

Publication number
SU1591008A1
SU1591008A1 SU884480360A SU4480360A SU1591008A1 SU 1591008 A1 SU1591008 A1 SU 1591008A1 SU 884480360 A SU884480360 A SU 884480360A SU 4480360 A SU4480360 A SU 4480360A SU 1591008 A1 SU1591008 A1 SU 1591008A1
Authority
SU
USSR - Soviet Union
Prior art keywords
input
output
switch
register
adder
Prior art date
Application number
SU884480360A
Other languages
Russian (ru)
Inventor
Viktor E Zolotovskij
Roald V Korobkov
Original Assignee
Taganrogskij Radiotech Inst
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 Taganrogskij Radiotech Inst filed Critical Taganrogskij Radiotech Inst
Priority to SU884480360A priority Critical patent/SU1591008A1/en
Application granted granted Critical
Publication of SU1591008A1 publication Critical patent/SU1591008A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Description

Изобретение относится к вычислительной технике и может быть использовано для. аппаратного вычисления логарифма числа. Цель изобретения - расширение функциональных возможностей за счет вычисления логарифмов чисел с плавающей запятой. Поставленная цель достигается тем, что устройство содержит вход 1 мантиссы аргумента, вход 2 сигнала запуска, блок 3

управления, первый коммутатор 4, первый регистр 5, блок 6 памяти опорных значений, второй коммутатор 7. четвертый коммутатор 8, третий коммутатор 9, умножитель 10, группу 11 элементов НЕ, первый сумматор 12, второй регистр 13, выход 14 мантиссы результата, выход 15 готовности результата, вход 16 порядка аргумента, блок 17 памяти значений порядка, первый сдвигатель 18, второй сумматор 19, третий регистр 20, пятый коммутатор 21, второй сдвигатель 22, блок 23 анализа мантиссы, выход 24 порядка результата. Блок 3 управления содержит триггер, элемент И и тактовый вход, счетчик, блок памяти и выходы блока управления. Блок 23 анализа мантиссы содержит группу элементов ИСКЛЮЧАЮЩЕЕ ИЛИ, элемент НЕ, первую группу элементов ЗАПРЕТ, вторую группу элементов ЗАПРЕТ, группу элементов ИЛИ, вход и выход. Устройство вычисляет ненормализованные значения порядка и мантиссы аргумента, затем нормализует их.3 ил.

ГУ

Фиг.1

3

1591008

4

Изобретение относится к вычислительной технике и может быть использовано для аппаратного вычисления логарифма числа.

Цель изобретения - расширение функциональных возможностей за счет вычисления логарифмов чисел с плавающей запятой.

На фиг.1 представлена схема устройства для вычисления логарифмов чисел с плавающей запятой; на фиг.2 - схема блока управления; на фиг.З - схема блока анализа мантиссы.

Устройство содержит вход 1 мантиссы аргумента, вход 2 сигнала запуска, блок 3 управления, первый коммутатор 4, первый регистр 5, блок 6 памяти опорных значений, второй 7, четвертый 8 и третий 9 коммутаторы, умножитель 10, группу 11 элементов НЕ, первый сумматор 12, второй регистр 13, выход 14 мантиссы результата, выход 15 готовности результата, вход 16 порядка аргумента, блок 17 памяти значений порядка, первый сдвигатель 18, второй сумматор 19, третий регистр 20, пятый коммутатор 21, второй сдвигатель 22, блок 23 анализа мантиссы и выход 24 порядка результата.

Блок 3 управления содержит триггер 25, элемент И 26, тактовый вход 27, счетчик 28, блок 29 памяти и выходы 30.

Блок 23 анализа мантиссы содержит группу 31 элементов ИСКЛЮЧАЮЩЕЕ ИЛИ, элемент НЕ 32, первую 33 и вторую 34 группы элементов ЗАПРЕТ, группу 35 элементов ИЛИ, вход 36 и выход 37.

Устройство работает следующим образом.

Аргумент представлен в виде числа с плавающей запятой

X = Μχ· 2Пх.

Для отыскания логарифма числа в устройстве вычисляется порядок ненормализованного результата

Пу = [ 1од2 (I ΠχΙ 1п2) ] и ненормализованная мантисса

Му=-^1п2 + -±*1пМх.

2пу 2Пу

Полученный результат нормализуется.

На вход 1 подается мантисса аргумента Мх. Коммутатор 4, настроенный сигналом А1, пропускает Мх на вход регистра 5. По сигналу С1 Мх записывается в регистр 5. Одиннадцать старших разрядов Мх (величина Χι) поступают на адресные входы блока 6 памяти, Коммутатор 7, настроенный сигналами А2, пропускает на первый вход умножителя 10 величину — . Коммутатор 9,

настроенный сигналами АЗ, пропускает на второй вход умножителя 10 величину Мх.

Умножитель 10, управляемый сигналами С2, .1

СЗ, С4, формирует произведение Υ—Мх , Х1

которое проходит через коммутатор 4 и записывается в регистр 5. Одновременно сформированная в блоке 6 памяти величина ΙηΧι проходит через коммутатор 8, настроенный сигналами А4, сумматор 12 и по сигналу С5 записывается в регистр 13. На этом первый цикл завершается. Число Υ имеет следующий вид:

Υ = 1,00... ООУгУмл ,

10 нулей

где Уг - .11 старших разрядов за массивом нулей;

У мл _ прочие разряды.

С регистра 5 величина Уг поступает на адресные входы блока 6 памяти, формирующего величины 1.00...00Υ2 и Ιη(1,0,..0Υ2). Как и в первом цикле в умножителе 10 формиру1

ется величина Ζ=-| которая опять

записывается в регистр 5. Одновременно величина Ιη(1,0...0Υ2) проходит через коммутатор 8, в сумматоре 12 складывается с ΙηΧ 1 и записывается в регистр 13. Второй цикл завершен.

Если двух циклов недостаточно для достижения требуемой точности, выполняется еще один цикл.

Число Ζ имеет вид

Ζ= 1,00...00 гмл,

.

20 нулей

где ΖΜη _ разряды за массивом нулей.

С регистра 5 ΖΜη через коммутаторы 7 и 9 поступает на входы умножителя 10 и в последнем формируется величина ΖΜη2. Одновременно ΖΜλ проходит через коммутатор 8 и в сумматоре 12 формируется сумма ΙηΧι+Ιπ(1,Ο...ΟΥ2)+ΖΜη, которая записывается в регистр 13. По завершении операции умножения величина ΖΜ«2 проходит через группу 11 элементов НЕ и поступает на вход коммутатора 8 со сдвигом на один разряд в сторону младших разрядов. Коммутатор 8 пропускает на вход сумматора 12 величины гМл2· В сумматоре 12 формируется величина

ΙηΜχΗη χι + Ιπ (1,0...0Υ2)2 + Ζ»«Γ·-7ρ которая

записывается в регистр 13. В течение всего времени формирования величины 1пМх через коммутатор 21 поступает нулевое значение на управляющие входы сдвигателя 22 и сдвига не происходит. По завершении формирования 1пМх по сигналу А5 на управляющие входы сдвигателя 22 подается величина 2Πζ , и на выходе сдвигателя формируется

1591008

величина —Ц-ΙπΜχ, , которая по сигналу С5 2П*

записывается в регистр 13.

В следующем цикле коммутатор 7 с выПх

хода сдвигателя 18 выбирает величину—# 2Пу

. Одновременно коммутатор 9 с пятого выхода блока 6 памяти выбирает значение Ιη2, и значение произведения этих величин с выхода умножителя 10 проходит через коммутатор 8 и складывается в сумматоре 12 с

1

величиной —*1пМх . Вычисленная вели2ПУ

чина Му* записывается в регистр 13. В результате имеем ненормализованный результат, представленный в виде Му* и Пу*.

В следующем цикле производится нормализация результата. Мантисса Му* может

находиться в пределах 1,7>=1Му1>0.

В блоке 23 анализа мантиссы определяется направление сдвига и число сдвигов К, необходимых для нормализации. Если знаковые разряды Му не совпадают, необходимо произвести один сдвиг в сторону старших разрядов (К = +1). Если знаковые разряды равны, блок 23 анализа мантиссы определяет порядковый номер, старшего значащего разряда Му*. не совпадающего со знаком т. Необходимо произвести сдвиг Му* в сторону младших разрядов на т разрядов (К = -т). Число К, сформированное блоком 23 анализа мантиссы, выбирается коммутатором 21, В сдвигателе 22 производится сдвиг мантиссы Му*. Нормализованная мантисса Му записывается в регистр 13. Одновременно в сумматоре 19 формируется нормализованный порядок Пу= Пу*+ К, который записывается в регистр 20.

Нормализованные мантисса и порядок результата считываются с выходов 14 и 24 соответственно.

The invention relates to computing and can be used for. hardware calculation of the logarithm of a number. The purpose of the invention is to expand the functionality by calculating the logarithms of floating-point numbers. This goal is achieved by the fact that the device contains the input 1 of the mantissa argument, input 2 of the trigger signal, block 3

control, first switch 4, first register 5, reference value memory block 6, second switch 7. fourth switch 8, third switch 9, multiplier 10, group of 11 NO elements, first adder 12, second register 13, output 14 result mantissa, output 15 readiness of the result, input 16 of the order of the argument, block 17 of the memory of values of the order, the first shifter 18, the second adder 19, the third register 20, the fifth switch 21, the second shifter 22, the block 23 of the analysis of the mantissa, the output 24 of the order of the result. The control unit 3 comprises a trigger, an And element and a clock input, a counter, a memory unit and the outputs of the control unit. The mantissa analysis unit 23 contains a group of EXCLUSIVE OR elements, the element NOT, the first group of elements BAN, the second group of elements BAN, the group of elements OR, the input and the output. The device calculates non-normalized values of the order and the mantissa of the argument, then normalizes them. 3 Il.

GU

1

3

1591008

four

The invention relates to computing and can be used for hardware calculation of the logarithm of a number.

The purpose of the invention is to expand the functionality by calculating the logarithms of floating-point numbers.

Figure 1 presents a diagram of the device for calculating the logarithms of floating-point numbers; figure 2 - diagram of the control unit; Fig. 3 is a block diagram analysis of the mantissa.

The device contains the input 1 of the argument mantissa, the input 2 of the start signal, the control unit 3, the first switch 4, the first register 5, the reference value memory block 6, the second 7, the fourth 8 and the third 9 switches, the multiplier 10, the group of 11 NO elements, the first adder 12, second register 13, output 14 of the mantissa of the result, output 15 of readiness of the result, input 16 of the order of the argument, block 17 of the memory of order values, first shifter 18, second adder 19, third register 20, fifth switch 21, second shifter 22, block 23 of analysis mantissa and output 24 order of the result.

The control unit 3 contains the trigger 25, the element And 26, the clock input 27, the counter 28, the memory block 29 and the outputs 30.

The mantissa analysis unit 23 contains a group of 31 EXCLUSIVE OR elements, the element is NOT 32, the first 33 and the second 34 groups of elements are PROHIBITED, a group of 35 elements OR, input 36 and output 37.

The device works as follows.

Argument is represented as a floating point number.

X = Μχ · 2 Px .

To find the logarithm of a number, the device calculates the order of the unnormalized result.

P y = [1od 2 (I ΙχΙ 1п2)] and unnormalized mantissa

Mu = - ^ 1p2 + - ± * 1pM x .

2 n y 2 pu

The result is normalized.

Input 1 is given the mantissa of the argument M x . Switch 4, configured by A1, passes M x to the input of register 5. By signal C1, M x is written to register 5. Eleven most significant bits of M x (value Χι) are sent to the address inputs of memory block 6, Switch 7, configured by A2, skips at the first input of the multiplier 10 value -. Switch 9,

tuned by AZ signals, passes the value M x to the second input of the multiplier 10.

The multiplier 10, controlled by signals C2, .1

СЗ, С4, forms the product Υ — М х , Х1

which passes through switch 4 and is written to register 5. Simultaneously generated in memory block 6, the value ΧηΧι passes through switch 8 configured by A4 signals, adder 12 and is written to register 13 by signal C5. This completes the first cycle. The number has the following form:

Υ = 1.00 ... OOUGuml,

10 zeros

where Ug is the .11 most significant digits behind the array of zeros;

In ml _ other discharges.

From register 5, the value of U is fed to the address inputs of the memory block 6, which forms the values 1.00 ... 00Υ2 and Ιη (1.0, .. 0Υ 2 ). As in the first cycle in the multiplier 10 to form 1

the value Ζ = - | which again

is written to the register 5. At the same time, the value Ιη (1.0 ... 0Υ 2 ) passes through the switch 8, in the adder 12 is added with ΙηΧ 1 and written to the register 13. The second cycle is completed.

If two cycles are not enough to achieve the required accuracy, another cycle is performed.

The number Ζ has the form

Ζ = 1.00 ... 00 g ml ,

.

20 zeros

where Ζ η _ digits behind an array of zeros.

From the register 5 Ζ Μ η through the switches 7 and 9 is fed to the inputs of the multiplier 10 and in the latter the value Ζ Μ η 2 is formed . Simultaneously, ΖΜλ passes through the switch 8 and in the adder 12 the sum ΙηΙι + Ιπ (1, ... ΟΥ2) + ΖΜη is formed, which is written to the register 13. Upon completion of the multiplication operation, the value ΖΜ “ 2 passes through the group of 11 elements NOT and goes to the input of the switch 8 is shifted by one bit in the direction of the lower digits. The switch 8 passes to the input of the adder 12 the value of ml ml 2 · In the adder 12 the value is formed

ΙηΜχΗη χι + Ιπ (1,0 ... 0Υ 2 ) 2 + Ζ "" Γ · -7ρ which

written to the register 13. During the whole time of the formation of the value of 1pM x, through the switch 21, a zero value is supplied to the control inputs of the shifter 22 and no shift occurs. Upon completion of the formation of A5 x 1RM signal to control inputs of shifter 22 is supplied value 2 Πζ, and the output shifter is formed

1591008

the value of - Ц-ΙπΜχ,, which by the signal С5 2 П *

written in register 13.

In the next cycle, the switch is 7 seconds .

the stroke of the shifter 18 selects the value - # 2 PU

. At the same time, the switch 9 from the fifth output of memory block 6 selects the value Ιη2, and the value of the product of these values from the output of the multiplier 10 passes through the switch 8 and is added up in the adder 12 s

one

value - * 1pM x . Calculated wi2 P U

the rank of Mu * is written into register 13. As a result, we have an unnormalized result, represented as Mu * and P y *.

In the next cycle, the result is normalized. Mantissa Mu * can

be within 1.7> = 1M at 1> 0.

In block 23 of the analysis of the mantissa, the direction of the shift and the number of shifts K required for normalization are determined. If the sign digits of Mu do not coincide, it is necessary to make a single shift in the direction of the higher digits (K = +1). If the sign bits are equal, the mantissa analysis block 23 determines the sequence number of the most significant digit M y *. not coinciding with the sign of m. It is necessary to shift M y * towards the lower digits by m bits (K = -t). The number K formed by the mantissa analysis unit 23 is selected by the switch 21, and in the shifter 22, the mantissa Mu is shifted. The normalized mantissa Mu is recorded in the register 13. At the same time in the adder 19 is formed a normalized order P y = P y * + K, which is written in the register 20.

The normalized mantissa and the order of the result are read from outputs 14 and 24, respectively.

Claims (1)

Ф о р м у л а и з о б р е т е н и яClaim Устройство для вычисления логарифмов чисел, содержащее первый и второй регистры, первый, второй, третий и четвертый коммутаторы, блок памяти опорных значений, умножитель, сумматор, блок управления и группу элементов НЕ, причем вход мантиссы аргумента устройства соединен с первым входом первого коммутатора, второй вход которого соединен с выходом умножителя и входом группы элементов НЕ, выход первого коммутатора соединен с информационным входом первого регистра, первый выход которого соединен с адресным входом блока памяти опорных значений, вто6 .»A device for calculating logarithms of numbers containing the first and second registers, the first, second, third and fourth switches, a reference value memory, a multiplier, an adder, a control unit and a group of elements NOT, the mantissa input of the device argument is connected to the first input of the first switch, the second the input of which is connected to the output of the multiplier and the input of a group of elements NOT, the output of the first switch is connected to the information input of the first register, the first output of which is connected to the address input of the memory block of reference values , 6 рой выход первого регистра соединен с первым входом второго коммутатора, первым входом третьего коммутатора и первым входом четвертого коммутатора, третий выход первого регистра соединен с вторым входом третьего коммутатора, первый и второй выходы блока памяти опорных значений соединены соответственно с вторым и третьим входами второго коммутатора, третий и четвертый выходы блока памяти опорных значений соединены соответственно с вторым и третьим входами четвертого коммутатора, четвертый вход которого соединен с выходом группы элементов НЕ, выход второго коммутатора соединен с первым входом умножителя, второй вход которого соединен с выходом третьего коммутатора, выход четвертого коммутатора соединен с первым входом первого сумматора, выход которого соединен с информационным входом второго регистра, выход которого соединен с выходом мантиссы результата устройства, первый выход блока управления соединен с входом разрешения записи первого регистра, второй, третий и четвертый выходы блока управления соединены с управляющими входами умножителя, пятый - девятый выходы блока управления соединены соответственно с входом разрешения записи второго регистра и с управляющими входами первого - четвертого коммутаторов, вход сигнала запуска устройства соединен с управляющим входом блока управления, десятый выход которого соединен с выходом готовности результата устройства, отличающееся тем, что, с целью расширения функциональных возможностей за счет вычисления логарифмов чисел с плавающей запятой, в него введены блок памяти значений порядка, первый и второй сдвигатели, второй сумматор, третий регистр, пятый коммутатор и блок анализа мантиссы, причем вход порядка аргумента устройства соединен с адресным входом блока памяти значений порядка и с информационным входом первого сдвигателя, вход управления сдвигом которого соединен с первым входом пятого коммутатора и с первым выходом блока памяти значений порядка, второй выход которого соединен с первым входом второго сумматора, выход которого соединен с информационным входом третьего регистра, выход которого соединен с выходом порядка результата устройства, выход перврго сдвигателя соединен с четвертым входом второго коммутатора, выход второго регистра соединен с информационным входом второго сдвигателя и с входом блока анализа мантиссы, выход которого соединен с вторым входом второго сумматора иthe swarm output of the first register is connected to the first input of the second switch, the first input of the third switch and the first input of the fourth switch, the third output of the first register is connected to the second input of the third switch, the first and second outputs of the reference value memory block are connected respectively to the second and third inputs of the second switch, the third and fourth outputs of the memory block of reference values are connected respectively to the second and third inputs of the fourth switch, the fourth input of which is connected to the output of the group of elements NOT, the output of the second switch is connected to the first input of the multiplier, the second input of which is connected to the output of the third switch, the output of the fourth switch is connected to the first input of the first adder, the output of which is connected to the information input of the second register, the output of which is connected to the output of the device mantissa, the first the output of the control unit is connected to the write enable input of the first register, the second, third and fourth outputs of the control unit are connected to the control inputs of the multiplier, the fifth to ninth outputs dy of the control unit are connected respectively to the write enable input of the second register and to the control inputs of the first to fourth switches, the device start signal input is connected to the control input of the control unit, the tenth output of which is connected to the output of the device output readiness, characterized in that capabilities by calculating logarithms of floating-point numbers, a block of order values is entered into it, the first and second shifters, the second adder, the third register, five the second switch and the mantissa analysis unit, the order input of the device argument is connected to the address input of the memory block of order values and to the information input of the first shifter, the shift control input of which is connected to the first input of the fifth switch and the first output of the memory block of order values, the second output of which is connected with the first input of the second adder, the output of which is connected to the information input of the third register, the output of which is connected to the output of the order of the result of the device, the output of the first flow controller nen to a fourth input of the second switch, the second register output connected to a data input of the second shifter and to the input unit mantissa analysis, whose output is connected to a second input of the second adder, and 7 1591008 87 1591008 8 вторым входом пятого коммутатора, выход которого соединен с входом управления сдвигом второго сдвигателя, выход которого соединен с вторым входом первого сумматора, выход умножителя соединен с 5 пятым входом четвертого коммутатора, шестой вход которого соединен с третьим входом пятого коммутатора и с входом задания константы "ноль" устройства, одиннадцатый и двенадцатый выходы блока управления соединены соответственно с входом управления записью третьего регистра и с управляющим входом пятого коммутатора.the second input of the fifth switch, the output of which is connected to the shift control input of the second shifter, the output of which is connected to the second input of the first adder, the output of the multiplier is connected to the fifth fifth input of the fourth switch, the sixth input of which is connected to the third input of the fifth switch and to the input of the constant constant "zero "the device, the eleventh and twelfth outputs of the control unit are connected respectively to the input of the control of the recording of the third register and the control input of the fifth switch. Фиг. 2FIG. 2
SU884480360A 1988-07-11 1988-07-11 Device for computing logarithms of numbers SU1591008A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU884480360A SU1591008A1 (en) 1988-07-11 1988-07-11 Device for computing logarithms of numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU884480360A SU1591008A1 (en) 1988-07-11 1988-07-11 Device for computing logarithms of numbers

Publications (1)

Publication Number Publication Date
SU1591008A1 true SU1591008A1 (en) 1990-09-07

Family

ID=21398270

Family Applications (1)

Application Number Title Priority Date Filing Date
SU884480360A SU1591008A1 (en) 1988-07-11 1988-07-11 Device for computing logarithms of numbers

Country Status (1)

Country Link
SU (1) SU1591008A1 (en)

Similar Documents

Publication Publication Date Title
US4754421A (en) Multiple precision multiplication device
CA2286647C (en) Arithmetic processor
US3036775A (en) Function generators
EP0297588A2 (en) Trigonometric function arithmetic processor using pseudo-division
US4899302A (en) Arithmetic unit for inverse trigonometric function
US3290493A (en) Truncated parallel multiplication
SU1591008A1 (en) Device for computing logarithms of numbers
EP0474246A2 (en) Image signal processor
US3973243A (en) Digital image processor
US5535148A (en) Method and apparatus for approximating a sigmoidal response using digital circuitry
SU1280624A1 (en) Device for multiplying the floating point numbers
SU1388857A1 (en) Device for logarithming
SU732861A1 (en) Device for computing inverse value
SU1003078A1 (en) Square rooting device
SU560229A1 (en) Device for calculating elementary functions
SU617744A1 (en) Fourier discrete-analogue converter
SU652560A1 (en) Decimal number multiplying arrangement
SU622087A1 (en) Sine and cosine function digital computer
SU1080135A1 (en) Computing device
SU1001176A1 (en) Store for multifunctional memory device
SU1176322A1 (en) Computing device
SU744600A1 (en) Polynomial values computing device
RU1790782C (en) Device for indication of roots
SU1649537A1 (en) Multiplier
SU888131A1 (en) Processor for computing elementary functions