SU1339549A1 - Device for rounding off sum and difference of binary-coded numbers with floating point - Google Patents
Device for rounding off sum and difference of binary-coded numbers with floating point Download PDFInfo
- Publication number
- SU1339549A1 SU1339549A1 SU864067818A SU4067818A SU1339549A1 SU 1339549 A1 SU1339549 A1 SU 1339549A1 SU 864067818 A SU864067818 A SU 864067818A SU 4067818 A SU4067818 A SU 4067818A SU 1339549 A1 SU1339549 A1 SU 1339549A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- inputs
- register
- output
- elements
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств сложени и вычитани двоичнокодиро- BaHiibix чисел с плавающей зап той, представленных в обратном коде. Цель изобретени - повьшение точности вычислений . Указанна цель достигаетс благодар коррекции как денормализо- ванного слагаемого, так и нормализованного результата. Коррекци в каждом из зтих случаев осутцествл етс посредством засылки в ьшадший разр д -корректируемого кода цифры или О, вл ющейс значащей дл данного кода. Засылка значащей цифры в младший разр д денормализованного слагаемого производитс в случае отброса хот бы одной значащей цифры в процессе денормализации, а засылка значащей .цифры в младший разр д результата - в случае отброса значащей цифры при нормализации вправо. Устройство содержит регистр результата 2, два триггера 3, 4 знаков, входы управлени денормализацией 5 и нормализацией вправо 6, младшие разр ды 7, 8 регистров I и 2, два элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 9, 10, четыре злемен- та И 11 - 14. I ил. (С (Л со со ;о ел 4 соThe invention relates to digital computing and can be used in a digital computer to create high-precision arithmetic devices for adding and subtracting binary BaHiibix floating-point numbers presented in the reverse code. The purpose of the invention is to increase the accuracy of calculations. This goal is achieved by correcting both the denormalized term and the normalized result. Correction in each of these cases is affected by the forwarding of a digit or O, which is significant for the code, to the higher order of the corrected code. The significant digit in the lower order of the denormalized term is sent in case of at least one significant digit in the process of denormalization, and the significant digit in the lower order of the result is sent in the case of a significant digit rejection during normalization to the right. The device contains the result register 2, two triggers of 3, 4 characters, the inputs for control of denormalization 5 and normalization to the right 6, low bits 7, 8 of registers I and 2, two elements EXCLUSIVE OR 9, 10, four elements 11-14. I il. (C (L with so; about ate 4 with
Description
1one
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств сложени и вычитани двоичных чисел с плавающей зап той-, представленных в обратном коде.The invention relates to digital computing and can be used in a digital computer to create high-precision arithmetic devices for adding and subtracting floating-point binary numbers presented in a return code.
Цель изобретени - повьшени точности вычислений.The purpose of the invention is to increase the accuracy of calculations.
На чертеже представлена функциональна схема устройства.The drawing shows the functional diagram of the device.
Устройство содержит регистр 1 операнда , регистр 2 результата, триггеры 3 и 4 знаков денормализуемого чис ла и результата соответственно, входы 5 и 6 управлени денормализацней и нормализацией вправо, младшие разр ды 7 и 8 регистров 1 и 2, два элеThe device contains a register of 1 operand, a register of 2 results, triggers of 3 and 4 characters of a denormalizable number and a result, respectively, inputs 5 and 6 of the control of a normal normal and normalization to the right, minor bits 7 and 8 of registers 1 and 2, two elec
мента ИСКЛЮЧАЩЕЕ ИЛИ 9 и 10 и четыре 20 зываютс открытыми или закрытыми дл EXCLUSIVE OR 9 and 10 and four 20 are open or closed for
элемента И 11-14.element and 11-14.
Устройство работает следующим образом .The device works as follows.
Округление суммы или разности двух чисел с плавающей зап той, представленных в обратном двоичном коде, состоит в том, что производитс коррекци как денормализованного слагаемого , так и нормализованного результата . Коррекци денормализованного числа осуществл етс посредством засылки в его младший разр д значащей цифры при условии, что в процессе денормализации за разр дную сетку регистра выходит хот бы одна значаща цифра. Коррекци нормализованного числа осуществл етс посредством засылки в его младший разр д значащей цифры в том случае, если имела место нормализаци результата вправо и за разр дную сетку регистра вьшша значаща цифра. При этом значащей цифрой дл положительного числа в обратном коде вл етс 1, а дл отрицательного - О .The rounding of the sum or difference of two floating point numbers represented in the reverse binary code is that both the denormalized term and the normalized result are corrected. The correction of a denormalized number is accomplished by sending a significant digit to its least significant bit, provided that in the denormalization process, at least one significant digit goes out of the register's output grid. Correction of a normalized number is accomplished by sending a significant digit to its least significant bit in the event that the result has been normalized to the right and beyond the register's register above the significant digit. The significant digit for a positive number in the reverse code is 1, and for a negative number is O.
Перед началом работы устройства в триггер 3 и регистр 1 занесены соответственно знак и мантисса слагаемого с меньшим пор дком, а в случае равенства пор дков чисел - знак и мантисса одного из слагаемых.Before the device starts operation, trigger 3 and register 1 are entered respectively with the sign and the mantissa of the term with a smaller order, and in case of equal numbers of orders, the sign and the mantissa of one of the components are entered.
Если пор дки чисел различны, то происходит денормализаци кода, наход щегос в регистре 1. На вход управлени сдвигом вправо этого регистра по входу 5 подаетс сигнал 1, в результате чего код в регистре 1 сдвигаетс на один разр д вправо. При этом выдвинутый за пределы ре15 If the order of numbers is different, then the code in register 1 is denormalized. Signal 1 is sent to the input of the right-shift control of this register, input 1 is sent, causing the code in register 1 to be shifted by one bit to the right. At the same time pushed beyond the limits of pe15
395492395492
гистра младший разр д пропадает. До i сдвига кода вправо сигнал с выхода младшего разр да.7 регистра 1 поступает на вход элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 9, на другом входе которого действует сигнал с выхода триггера 3 знака денормализуемого числа. В результате на выходе элемента ИСКЛЮЧАЮ- ТО ЩЕЕ ИЛИ 9 действует сигнал 1, если в младшем разр де 7 регистра 1 находитс значаща цифра, и О в противном случае. Этот сигнал поступает на первые входы элементов И 11 и 12, на третьих входах которых действует сигнал 1, поступающий по входу 5. В зависимости от того, значаща цифра или нет находитс в младшем разр де 7 регистра 1, элементы И 11 и 12 окапрохождени сигналов с пр мого и инверсного соответственно выходов триггера 3 на соответственно нулевой и единичный вход мпадшего разр да 7.Gistra junior bit disappears. Before i shift the code to the right, the signal from the output of the lower bit 7 of register 1 is fed to the input of the EXCLUSIVE OR 9 element, on the other input of which a signal from the output of the trigger 3 characters of the denormalizable number acts. As a result, the output of the EXCLUSIVE ALTER or 9 element is affected by a signal 1, if in the lower-order bit 7 of register 1 there is a significant figure, and O otherwise. This signal arrives at the first inputs of elements 11 and 12, on the third inputs of which signal 1 acts on input 5. Depending on whether a significant digit or not is in the low order 7 of register 1, elements 11 and 12 of the signal accumulation from direct and inverse, respectively, of outputs of trigger 3 to, respectively, zero and one input of the lowest bit 7.
Причем к моменту прихода указанных сигналов на входы младшего разр да 7 в этом разр де установлена цифра уже сдвинутого на один разр д вправо кода (дл обеспечени этого в случаеMoreover, by the time of the arrival of the indicated signals at the inputs of the lower bit 7, this digit has a digit of the code already shifted by one digit to the right (to ensure this in the case of
необходимости на лини х, соедин ющих выходы элементов И 1 и 12с входами младшего разр да 7 должны быть поставлены соответствуюш 1е элементы задержки ) . Таким образом, если в младшем разр де 7 еще не сдвинутого кода находитс незначаща цифра, то младша цифра сдвинутого на один разр д вправо кода не измен етс , так как на входах младшего разр да 7 действуют сигналы О, О. В случае, если за разр дную сетку регистра 1 выдвигаетс значаща цифра, то на выходах элементов И 11 и 12 в зависимости от того, положительный или отрицательный зрак имеет денормализуемое число, действуют комбинации сигналов О. 1, либо 1, О, устанавливающие в младшем разр де 7 сдвинутого на один р зр д вправо кода значаЩУю цифру: 1 в первом случае иthe need for the lines connecting the outputs of the elements 1 and 12 with the inputs of the lower bit 7 must be supplied with the corresponding 1st delay elements). Thus, if an insignificant digit is found in the low-order bit of the 7 not yet shifted code, then the lower-digit digit of the code shifted by one bit to the right does not change, since O, O signals act at the inputs of the lower digits 7 If the register grid 1 is shifted to a significant digit, then the outputs of elements 11 and 12, depending on whether the number is normal or negative, have combinations of signals O. 1 or 1, O, which in the lower bit 7 are shifted by one p right to the code meaning significant qi Fru: 1 in the first case and
О - во втором. Таким образом, после первого выхода за разр дную сетку регистра 1 значащей цифры в младшем разр де 7 этого регистра при всехAbout - in the second. Thus, after the first exit for the bit grid of the register 1, the significant digit in the low-order bit 7 of this register for all
последующих сдвигах кода вплоть до момента окончани денормализации будет находитьс значаща цифра. Этим обеспечиваетс указанна вьше коррекци денормализованного числа.subsequent shifts of the code until the end of the denormalization will be a significant figure. This ensures the indicated correction of the denormalized number.
3.3
Далее происходит нормализаци результата сложени или вычитани . Мантисса и знгк результата наход тс соответственно в регистре 2 и триггере 4. Next, the result of the addition or subtraction is normalized. The mantissa and zngk of the result are respectively in register 2 and trigger 4.
Если результат требуетс нормализовать вправо, то на вход управлени сдвигом вправо регистра 2 по входу 6 поступает сигнал 1, в результате чего происходит сдвиг кода, наход щегос в регистре 2, на один разр д вправо. При этом выдвинутый за пределы регистра младший разр д пропадает До сдвига кода сигнал с выхода мпад- шего разр да 8 регистра 2 поступает на вход элемента ИСКЛЮЧАЮЩЕЕ ИПИ 10, на другом входе которого действует сигнал с выхода триггера 4 знака результата . В результата на выходе элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 10 действует сигнал 1, если в мпадшем разр де 8 регистра 2 находитс значаща цифра , и О в противном случае. Этот сигнал поступает на первые входы элементов И 13 и 14, на третьих входах которых действует сигнал 1, поступающий по входу 6. В зависимости от того, значаща или незначаща цифра находитс в младшем разр де 8 регистра 2, элементы И 13 и 14 оказываютс открытыми или закрытыми дл прохождени сигналов с пр мого и инверсного соответственно выходов триггера 4 на соответственно нулевой и единичный входы младшего разр да 8. Причем к моменту прихода указанных сигналов на входы младшего разр да 8 в этом разр де установлена цифра уже сдвинутого на один разр д вправо кода (дл обеспечени этого в случае необходимости на лини х, соедин ющих выходы элементов И 13 и 14 с входами младшего разр да 8, должны быть поставлены соответствующие элементы задержки). Таким образом, если в младшем разр де 8 еще несдвинутого кода находитс незначаща цифра, то младша цифра сдвинутого на один разр д вправо кода не измен етс , так как на входах младшего разр да 8 действуют сигналы О, О. В случае, если за разр дную сетку регистра 2 вьщвигаетс значаща цифра, то на выходах элементов И I3 и 14 в зависимости от того, положительный или отрицательный знак имее т результат, действуют комбинации сигналов О, 1, либо 1, О, устанавливающиеIf the result is to be normalized to the right, then the input of the shift control to the right of register 2 to input 6 receives a signal 1, resulting in a shift of the code in register 2, one bit to the right. In this case, the low-order bit pushed out of the register disappears. Before the code is shifted, the output from the low-order bit 8 of register 2 is fed to the input of the EXCLUSIVE IPI 10 element, at another input of which a signal from the output of the trigger 4 of the result sign acts. As a result, the output of the EXCLUSIVE OR 10 element is a signal 1, if the digit 8 of the register 2 contains a significant digit in the m / d bit, and 0 otherwise. This signal arrives at the first inputs of elements And 13 and 14, on the third inputs of which a signal 1 acts, arriving at input 6. Depending on whether a significant or insignificant digit is in the low order of 8 registers 2, elements And 13 and 14 are open or closed for passing signals from the direct and inverse outputs of trigger 4, respectively, to the zero and single inputs of the low-order bit 8. Moreover, by the time these signals arrive at the low-level inputs 8, this digit has a figure already shifted by one n discharge right code (to provide that if necessary on lines connecting the outputs of AND gates 13 and 14 with the least significant bit input and 8, the respective delay elements to be delivered). Thus, if an insignificant digit is found in the low-order bit of the 8 still-shifted code, then the lower-digit digit of the code shifted by one bit to the right does not change, since O, O signals act on the low-level inputs 8. the bottom grid of register 2 is shifted to a significant figure, then the outputs of elements I3 and 14, depending on whether a positive or negative sign has the result, are combinations of signals O, 1, or 1, O, setting
39549 39549
в младшем разр де 8 нормализованного вправо результата значащую цифру: 1 в первом случае и О - во вто-. ром. Таким образом, после нормализации результата вправо в регистре 2 находитс откорректированный указанным вьш1е способом двоичный код мантиссы результата.in the low order of 8, the result normalized to the right is a significant figure: 1 in the first case and O in the second. rum. Thus, after normalizing the result to the right in register 2, the binary code of the mantissa of the result corrected by the above method is found.
1Q Коррекци денормализованного слагаемого и результата, осуществл ема устройством, приводит к Тому, что погрешность округлени может иметь различные знаки независимо от1Q Correction of the denormalized term and the result of the device leads to the fact that the rounding error may have different signs regardless of
15 знако в слагаемых и выполн емой операции . Действительно, пусть, например , величины слагаемых таковы, что нормализации вправо результата не производитс . В этом случае погреш20 ность округлени складываетс из погрешности денормализации, св занной с отбрасыванием выдвинутых за разр дную сетку сдвигающего регистра битов денормализованного числа, и погреш25 ности, св занной с засылкой значащей15 is familiar in terms of the operation being performed. Indeed, let, for example, the magnitudes of the terms are such that normalization to the right of the result is not performed. In this case, the rounding error is the sum of the denormalization error associated with the rejection of the denormalized number of bits put forward beyond the discharge grid and the error associated with the sending of a significant
цифры в младший разр д денормализованного числа. Так как по вление значащей или незначащей цифры в младшем разр де денормализованного числа рав30 новеро тно, то засылка в этот разр д значащей цифры дает в половине случаев погрешность, отличную от нул , котора по абсолютной величине больше погрешности денормализации и имеетdigits to the lower order of the denormalized number. Since the occurrence of a significant or insignificant digit in the lower order of a denormalized number is consistently reversed, sending a significant digit to this digit in half the cases gives an error other than zero, which in absolute value is greater than the error of denormalization and has
2g противоположный ей знак. Таким образом , в половине случаев погрешность округлени положительна, а в половине случаев - отрицательна.2g is the opposite sign. Thus, in half of the cases, the rounding error is positive, and in half of the cases - negative.
Математическое ожидание ошибкиExpectation of error
40 округлени , возникающей при работе предлагаемого устройства, строго равно нулю.40 rounding, arising from the operation of the proposed device, is strictly zero.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864067818A SU1339549A1 (en) | 1986-05-27 | 1986-05-27 | Device for rounding off sum and difference of binary-coded numbers with floating point |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864067818A SU1339549A1 (en) | 1986-05-27 | 1986-05-27 | Device for rounding off sum and difference of binary-coded numbers with floating point |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1339549A1 true SU1339549A1 (en) | 1987-09-23 |
Family
ID=21237806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU864067818A SU1339549A1 (en) | 1986-05-27 | 1986-05-27 | Device for rounding off sum and difference of binary-coded numbers with floating point |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1339549A1 (en) |
-
1986
- 1986-05-27 SU SU864067818A patent/SU1339549A1/en active
Non-Patent Citations (1)
Title |
---|
Карцев М.А. Арифметика цифровых машин. - М.: Наука, 1969, с. 326-331. Китов А.И., Криницкий И.А. Электронные цифровые машины и программирование. - М., 1961, с. 90-93. . (54) УСТРОЙСТВО ДЛЯ ОКРУГЛЕНИЯ СУММЫ И РАЗНОСТИ ДВОИЧНОКОДИРОВАННЫХ ЧИСЕЛ С ПЛАВАЮЩЕЙ ЗАПЯТОЙ * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4488252A (en) | Floating point addition architecture | |
US5469377A (en) | Floating point computing device for simplifying procedures accompanying addition or subtraction by detecting whether all of the bits of the digits of the mantissa are 0 or 1 | |
US5508951A (en) | Arithmetic apparatus with overflow correction means | |
DE3681840D1 (en) | COMPLETE CIRCUIT FOR BINARY NUMBERS. | |
US5375078A (en) | Arithmetic unit for performing XY+B operation | |
EP0328619B1 (en) | Apparatus and method for using a single carry chain for leading one detection and for ''sticky'' bit calculation | |
EP0234495B1 (en) | Arithmetic circuit capable of executing floating point operations and fixed point operations | |
US5247471A (en) | Radix aligner for floating point addition and subtraction | |
US3596074A (en) | Serial by character multifunctional modular unit | |
US5164914A (en) | Fast overflow and underflow limiting circuit for signed adder | |
US4811272A (en) | Apparatus and method for an extended arithmetic logic unit for expediting selected floating point operations | |
US4639887A (en) | Bifurcated method and apparatus for floating point addition with decreased latency time | |
US3210737A (en) | Electronic data processing | |
SU1339549A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
US4380051A (en) | High speed digital divider having normalizing circuitry | |
SU1339550A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
SU1361542A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
US5754458A (en) | Trailing bit anticipator | |
GB991734A (en) | Improvements in digital calculating devices | |
SU1361543A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
US20020178199A1 (en) | Floating point status information testing circuit | |
SU1367012A1 (en) | Operational device | |
US5926407A (en) | Combined add/shift structure | |
SU1273918A1 (en) | Adding-subtracting device | |
GB1475471A (en) | Floating point apparatus and techniques |