SU1339550A1 - 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
- SU1339550A1 SU1339550A1 SU864067821A SU4067821A SU1339550A1 SU 1339550 A1 SU1339550 A1 SU 1339550A1 SU 864067821 A SU864067821 A SU 864067821A SU 4067821 A SU4067821 A SU 4067821A SU 1339550 A1 SU1339550 A1 SU 1339550A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- inputs
- bit
- register
- output
- Prior art date
Links
Abstract
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств сложени и вычитани двоичных чисел с плавающей зап той, представленных в обратном коде. Цель изобретени - повьшгение точности вычислений. Указанна цель достигаетс благодар коррекции как денормализованного слагаемого , так и нормализованного ре- зультата, которые имеют на один разр д больше по сравнению с основным машинным словом. Коррекци денормализованного слагаемого осуществл етс посредством засылки в его младший разр д значащей цифры, если при денорма- лизации была отброшена хот бы одна значаща цифра. Коррекци нормализованного и усеченного на один младший разр д результата осуществл етс посредством засыпки в младший из основных его разр дов значащей цифры, если при нормализации и усечении была отброшена хот бы одна значаща цифра. Устройство содержит регистр 1 операнда с дополнительным разр дом, регистр 2 результата с дополнительным разр дом, два триггера 3,4. знаков , входы управлени денормализа- цией 5, нормализацией вправо 6 и окончани нормализации 7, элемент ИЛИ 8, дополнительные разр ды 9, 10 регистров 1,2, младший разр д II регистра 2, два элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 12,13, четыре элемента И 14-- 17. 1 ил. 6 (Л со 00 со СП ел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 floating-point numbers presented in a return code. The purpose of the invention is to improve the accuracy of calculations. This goal is achieved due to the correction of both the denormalized term and the normalized result, which have one bit more than the main machine word. The correction of the denormalized term is performed by sending a significant digit to its least significant bit, if at least one significant digit was rejected during the denormalization. The correction of a result normalized and truncated by one least significant bit is achieved by filling a significant digit into the younger one of its main bits, if at least one significant digit was dropped during normalization and truncation. The device contains a register of 1 operand with an additional bit, register 2 results with an additional bit, two triggers 3.4. characters, control inputs for denormalization 5, normalization to the right 6 and completion of normalization 7, element OR 8, additional bits 9, 10 registers 1,2, least significant bit II of register 2, two elements EXCLUSIVE OR 12,13, four elements AND 14-- 17. 1 Il. 6 (L with 00 with SP ate
Description
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств сложени и вычитани двоичных чисел с плавающей зап той, представленных в обратном коде.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 floating-point numbers presented in a return code.
Цель изобретени - повышение точности вычислений.The purpose of the invention is to improve the accuracy of calculations.
На чертеже приведена функциональ- на схема устройства.The drawing shows the functional scheme of the device.
Устройство содержит регистр 1 операнда с дополнительным разр дом, регистр 2 результата с дополнительным разр дом, триггеры 3 и 4 знаков денормализуемого числа и результата, входы 5-7 управлени денормализа- цией. Нормализацией вправо и окончани нормализации, элемент ИЛИ 8, дополнительные разр ды 9 и 10 регистров 1 и 2, младший разр д 11 регистра 2, элементы ИСКЛЮЧАЮЩЕЕ ИЛИ 12 и 13 и четыре элемента И 14-17.The device contains a register of 1 operand with an additional bit, a register of result 2 with an additional bit, triggers of 3 and 4 digits of the denormalizable number and result, inputs 5–7 of the control of denormalization. Normalization to the right and the end of normalization, the element OR 8, the additional bits 9 and 10 of registers 1 and 2, the lower bit of 11 registers 2, the elements EXCLUSIVE OR 12 and 13 and four elements AND 14-17.
Устройство работает следующим образом.The device works as follows.
Округление суммы или разности дву чисел с плавающей зап той, представленных в обратном коде, состоит в том, что производитс коррекци как денормализованного слагаемого, так и нормализованного результата.Коррекци денормализованного числа осуществл етс посредством засылки в его дополнительный разр д значащей цифры при условии,что в процессе денормали зации из этого разр да вправо была выдвинута хот бы одна значаща цифр Коррекци нормализованного и усеченного на Дополнительный разр д результата осуществл етс посредством за- сьтки в его младший разр д значащей цифры в том случае, если при нормализации и усечении бьта отброшена хот бы одна значаща цифра. При этом значащей цифрой дп положительного двоичного числа в обратном коде вл етс 1, а дл отрицательного - О.The rounding of the sum or difference of two floating point numbers represented in the reverse code is that both the denormalized term and the normalized result are corrected. The denormalized number is corrected by sending a significant digit to its additional digit, provided that in the process of denormalization, at least one significant digit was advanced from this bit to the right. Correction of a normalized and truncated by an additional bit of the result is accomplished by means of tki in his younger bit of the significant figures in the case, if the normalizing and truncating bta discarded hot znachascha least one digit. In this case, the significant digit dp of a positive binary number in the reverse code is 1, and for a negative one, O.
Перед началом работы устройства в триггер 3 и регистр занесены соответственно знак и обратньй двоичный код мантиссы слагаемого с меньшим пор дком, а в случае равенства пор дков слагаемых - знак и двоичный код мантиссы одного из слагаемых.Before the device starts operation, trigger 3 and the register are entered, respectively, the sign and reverse binary code of the term mantissa with a smaller order, and in case of equality of the order of terms, the sign and binary code of the mantissa of one of the terms.
Если пор дки чисел различны, то происходит денормализащ1 кода, на10If the orders of numbers are different, then a code denormalization occurs, 10
2020
2525
395502395502
ход щегос в регистре 1 . ila вход управлени сдвигом вправо этого регистра по ходу 5 подаетс сигналa move in register 1. ila the shift control input to the right of this register in the course of 5 a signal is given
1, в результате чего код в регистре 1 сдвигаетс вправо на один разр д . При этом вьщвинутый за пределы регистра разр д пропадает. До сдвига кода вправо сигнал с выхода дополнительного разр да 9 регистра 1 поступает на вход элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 12, на другом входе которого действует сигнал с выхода триггера 3 знака денормализуемого числа. В резуль15 тате на вькоде элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 12 действует сигнал 1, если в младшем разр де 9 регистра 1 находитс значаща цифра, и О в противном случае. Этот сигнал поступает на первые входы элементов И 14 и 15, на третьих входах которых действует сигнал 1, поступающий по входу 5. Б зависимости от того, значаща или незначаща цифра находитс в дополнительном разр де 9 регистра 1, элементы И 14, 15 оказываютс открытыми или закрытыми ,цл . прохождени сигналов с пр мого и инверсного соответственно выходов триггера 3 на соответственно нулевой и единичный входы дополнительного разр да 9. Причем к моменту прихода указанных сигналов на входы дополнительного разр да 9 в нем установлена цифра уже сдвинутого на один разр д вправо кода (дл обеспечени этого в случае необходимости на лини х, соедин ющих выходы элементов М 14 и 15 с входами дополнительного разр да 9, должны .-, быть поставлены соответствуюш 1е элементы задержки). Таким образом, если в дополнительном разр де 9 еще несдвинутого кода находитс незначаща цифра, то дополнительный разр д сдвинутого кода не изменитс , так как на входах дополнительного разр да 9 действуют сигналы О, О. В случае, если за разр дную сетку регистра 1 выдвигаетс значаща цифра, то на выходах элементов И 14 и 15 в зависимости от того, положительный или отрицательный знак имеет денормали- зуемое число, действуют комбинации сигналов О, 1, либо 1, О, устанавливающие в дополнительном разр де. 9 сдвинутого на один разр д вправо кода значащую цифру: 1 в первом случае и О во втором. Таким образом, после первого выхода за 1, with the result that the code in register 1 is shifted to the right by one bit. At the same time, the off-set bit is lost. Before the code is shifted to the right, the signal from the output of the extra bit 9 of register 1 is fed to the input of the EXCLUSIVE OR 12 element, on another input of which a signal from the output of the trigger 3 characters of the denormalizable number acts. As a result, signal 1 is active in the code of the EXCLUSIVE OR 12 element, if the lower digit 9 of register 1 contains a significant digit, and O otherwise. This signal arrives at the first inputs of elements AND 14 and 15, on the third inputs of which signal 1 acts, arriving at input 5. Depending on whether a significant or insignificant digit is in the extra bit 9 of register 1, elements AND 14, 15 turn out to be open. or closed cl. passing signals from the direct and inverse outputs of trigger 3, respectively, to the zero and single inputs of the additional bit 9. Moreover, by the time these signals arrived at the additional bits of the 9, the digit of the code already shifted by one bit to the right was set (to ensure that if necessary, on the lines connecting the outputs of the elements M 14 and 15 with the inputs of additional bit 9, the corresponding delay elements 1e should be supplied). Thus, if an extra digit is in the extra bit of the 9 not yet shifted code, then the bit of the shifted code will not change, since O, O signals act on the inputs of the auxiliary bit 9. In case the register grid 1 goes out meaningful digit, then the outputs of the elements 14 and 15, depending on whether the sign is positive or negative, has a denormalizable number, combinations of the signals O, 1, or 1, O are used, setting in an additional bit. 9 is a significant digit shifted to the right: 1 in the first case and O in the second. Thus, after the first exit for
30thirty
3535
4040
4545
5050
5555
3131
разр дную сетку регистра 1 значащей цифры в дополнительном разр де 9 этго регистра при всех последующих сдвигах вплоть до момента окончани денормализации будет находитьс значаща цифра.Этим обеспечиваетс указанна выще коррекци денормализова ного числа.the bit grid of register 1 significant digit in the additional bit 9 of this register will have a significant digit at all subsequent shifts until the end of denormalization. This provides a higher correction of the denormalized number.
Далее происходит, нормализаци результата сложени или вычитани . Знак и мантисса в обратном двоичном коде наход тс соответственно в тригере 4 и регистре 2. Если результат требуетс нормализовать вправо, то на вход управлени сдвигом вправо регистра по входу 6 поступает сигна I, в результате чего происходит сдвиг наход щегос в регистре 2 код на один разр д вправо. При этом выдвинутый за пределы регистра младши разр д пропадает. До сдвига кода синал с выхода дополнительного разр да 10 регистра 2 поступает на вход элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 13, на другом входе которого действует сигнал с выхода триггера 3 знака результат В результате на выходе элемента ИСКЛЮЧАЮЩЕЕ ИЛИ 13 действует сигнал 1, если в дополнительном разр де 10 регистра 2 находитс значаща цифра, и О в противном случае. Эт сигнал поступает на первые входы элементов И 16 и 17, на третьих входах которых действует сигнал 1, поступающий с выхода элемента ИЛИ 8 на одном из входов которого действует сигнал 1, поступающий по входу 6. В зависимости от того, значаща или незначаща цифра находитс в дополнительном разр де 10 регистра 2, элементы И 16 и 17 оказываютс открытыми или закрытыми дл прохождени сигналов с пр мого и инверсногх) со - ответственно выходов триггера 4 на соответственно нулевой и единичньй входы младшего разр да 11. Причем к моменту прихода указанных сигналов на входы младшего разр да 11 в этом триггере установлена цифра уже сдвинутого кода (дл обеспечени этого в случае необходимости на лини х, соедин ющих выходы элементов И 16 и 17 с входами младшего разр да 11 должны быть поставлены соответствующие элементы задержки). Таким образом , если в дополнительном разр де 10 еще несдвинутого кода находитс незначаща цифра, то младша из ос Further, normalization of the result of addition or subtraction occurs. The sign and the mantissa in the reverse binary code are respectively in trigger 4 and register 2. If the result is to be normalized to the right, the input I is sent to the shift control right input of input 6, resulting in a shift in code 2 in register 2 bit right. At the same time, the bit advanced out of the register is lost. Prior to shifting the code, the signal from the output of the extra bit 10 of register 2 is fed to the input of the EXCLUSIVE OR 13 element, on another input of which a signal from the trigger output of 3 characters is effective. As a result, the output of the EXCLUSIVE OR 13 element is affected by signal 1, if in additional bit 10 register 2 is a significant digit, and O otherwise. This signal arrives at the first inputs of elements AND 16 and 17, on the third inputs of which signal 1 acts, coming from the output of the element OR 8 at one of the inputs of which signal 1 acts, arriving at input 6. Depending on whether a significant or insignificant digit is in the additional bit 10 of register 2, elements AND 16 and 17 are open or closed to pass signals from the direct and inverse), respectively, the outputs of the trigger 4 to the zero and one inputs of the lower bit, respectively. And by the time of arrival of the indicated ignalov the inputs of the least significant bit 11 is set in the trigger code figure is shifted (to allow this if necessary on lines connecting the outputs of AND gates 16 and 17 to the inputs of the least significant bit corresponding to the delay elements 11 to be delivered). Thus, if in the extra bit of the 10 still un-shifted code there is an insignificant digit, then the younger of the
00
00
5five
новных цифр сдвинутого на один разр д вправо кода не измен етс , так как на входах младщего разр да I1 действует совокупность сигналов О, О. В случае, если за разр дную сетку регистра 2 вьщвигаетс значаща цифра, то на выходах элементов И 16 и 17 в зависимости от того, положительный или отрицательный знак имеет результат, действуют комбинации сигналов О, 1, либо 1, О, устанавливающие в младщем разр де 11 нормализованного вправо ре- 5 зультата значащую цифру: 1 - в первом случае и О - во втором.of the digit shifted by one bit to the right, the code does not change, since at the inputs of the lower digit I1 a set of signals O, O acts. If the digit grid of the register 2 is shifted to a significant digit, then at the outputs of the elements And 16 and 17 Depending on whether a positive or negative sign has a result, combinations of O, 1, or 1, O signals are used, which set the right-normalized result in the younger bit 11 to a significant result: 1 in the first case and O in the second.
В момент окончани нормализации независимо от того, имела место нормализаци вправо или нет, на одном из входов элемента ИЛИ 8 действует сигнал 1, поступающий по входу 7. В результате на выходе этого элемента формируетс сигнал 1, поступающий на третьи входы элементов И 16 и 17. Коррекци младшего из основных разр дов 1I результата производитс тсак было описано ранее.At the moment of the normalization termination, regardless of whether normalization took place to the right or not, signal 1 acting on input 7 acts on one of the inputs of the OR element 8. As a result, the signal of the input of the third inputs of the elements 16 and 17 Correction of the youngest of the main bits 1I of the result is produced by tsak was described earlier.
00
5five
00
Таким образом, после окончани нормализации в регистре 2 наход тс откорректированный указанным вьппе способом двоичный код мантиссы результата .Thus, after the termination of normalization in register 2, the binary code of the mantissa of the result corrected by the specified method is found.
Коррекци денррмализованного слагаемого и результата, осуществл ема устройством, приводит к тому, что погрешнось округлени может иметь различные знаки независимо от знаков слагаемых и выполн емой операции . Действительно, пусть, например , .пор дки слагаемых одинаковые, так что денормализации не происходит , и, следовательно, денормализо- ванное слагаемое не корректируетс . 5 В этом случае погрешность округлени складьшаетс из погрешности нормаг лизации результата, св занной с отбрасыванием значащей цифры, выдвинутой за разр дную сетку регистра при нормализации вправо, и усечением результата на дополнительный разр д, а также погрешности, св занной с засилкой значащей цифры в младший разр д нормализованного и усеченного результата. Так как по вление цифры О или 1 в младшем разр де результата равноверо тно, то засылка в этот разр д значащей цифры дает в половине случаев погрешность, отличнуюThe correction of the denatured addend and the result of the device leads to the fact that the error of rounding can have different signs regardless of the signs of the addends and the operation performed. Indeed, let, for example, the ordering of the terms be the same, so that the denormalization does not occur, and, therefore, the denormalized term is not corrected. 5 In this case, the rounding error is the result of the error in normalizing the result associated with dropping the significant digit pulled out of the register's grid during normalization to the right, and truncating the result by an extra bit, as well as the error associated with the significant digit getting into the younger one. bit normalized and truncated result. Since the occurrence of the digit O or 1 in the lower-order bit of the result is uniform, the sending of the significant digit in this digit in half the cases gives an error that is excellent
00
5five
от нул , котора по абсолютной величине больше погрешности нормализации, и имеет противоположный ей знак.Таким образом в половине случаев погреш- ность округлени положительна, а в половине - отрицательна,from zero, which in absolute value is greater than the normalization error, and has the opposite sign. Thus, in half of the cases, the rounding error is positive, and in half - negative,
Математическое ожидание ошибки округлени , возникающей при работе предлагаемого устройства, строго ран- но нулю.The mathematical expectation of the rounding error arising from the operation of the proposed device is strictly early zero.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864067821A SU1339550A1 (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 |
---|---|---|---|
SU864067821A SU1339550A1 (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 |
---|---|
SU1339550A1 true SU1339550A1 (en) | 1987-09-23 |
Family
ID=21237808
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU864067821A SU1339550A1 (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) | SU1339550A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0511971A1 (en) * | 1990-11-09 | 1992-11-11 | Adaptive Solutions, Inc. | Unbiased bit disposal apparatus and method |
-
1986
- 1986-05-27 SU SU864067821A patent/SU1339550A1/en active
Non-Patent Citations (1)
Title |
---|
Папернов А.А. Учебное пособие по курсу Арифметические и логические основы цифровых машин.-М., 1961, с.119-121. Карцев М.А. Арифметика цифровых машин.-М.: Наука, 1969, с. 326-ЗЗЬ * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0511971A1 (en) * | 1990-11-09 | 1992-11-11 | Adaptive Solutions, Inc. | Unbiased bit disposal apparatus and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4999803A (en) | Floating point arithmetic system and method | |
EP0483864A2 (en) | Hardware arrangement for floating-point addition and subtraction | |
US4922446A (en) | Apparatus and method for floating point normalization prediction | |
US5375078A (en) | Arithmetic unit for performing XY+B operation | |
US5111421A (en) | System for performing addition and subtraction of signed magnitude floating point binary numbers | |
JP2618374B2 (en) | Finding the position of the most significant digit | |
US4110832A (en) | Carry save adder | |
EP0209308A3 (en) | Circuitry for complementing binary numbers | |
EP0234495B1 (en) | Arithmetic circuit capable of executing floating point operations and fixed point operations | |
US4811272A (en) | Apparatus and method for an extended arithmetic logic unit for expediting selected floating point operations | |
US3210737A (en) | Electronic data processing | |
SU1339550A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
JPH0542697B2 (en) | ||
US6571264B1 (en) | Floating-point arithmetic device | |
US5754458A (en) | Trailing bit anticipator | |
US5822233A (en) | Digital arithmetic calculator and digital computer using non-redundant (2N+1) notation system with a radix of (2N+1) | |
SU1361542A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
SU1339549A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
SU1361543A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
US7003540B2 (en) | Floating point multiplier for delimited operands | |
US5153847A (en) | Arithmetic processor using signed digit representation of internal operands | |
US3254204A (en) | Digital divider for integer and remainder division operations | |
GB1475471A (en) | Floating point apparatus and techniques | |
JPS623330A (en) | Adder | |
SU1444760A1 (en) | Device for squaring a sequential series of numbers |