SU1361542A1 - 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
- SU1361542A1 SU1361542A1 SU864067816A SU4067816A SU1361542A1 SU 1361542 A1 SU1361542 A1 SU 1361542A1 SU 864067816 A SU864067816 A SU 864067816A SU 4067816 A SU4067816 A SU 4067816A SU 1361542 A1 SU1361542 A1 SU 1361542A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- register
- input
- result
- elements
- inputs
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств в сложении и вычитании двоично-кодированных чисел с плавающей зап той, представленных в пр мом или дополнительнрм коде. Цель изобретени - повышение точности вычислений. Цель достигаетс благодар коррекции как де- нормализованного слагаемого, так и нормализованного результата. Коррекци в каждом из этих случаев осуществл етс посредством засылки в младший разр д корректируемого кода цифры 1. Засылка 1 в младший разр д денормализованного слагаемого производитс в случае отброса хот бы одной 1 в процессе денормализации, а засылка 1 в младший разр д результата - в случае отброса хот бы одной 1 в процессе нормализации. Устройство содержит регистр 1 операнда , регистр 2 результата, входы 3 и 4 управлени денормализацией и нормализацией вправо, младшие разр г ды 5,6 регистров, п-входовые элементы ИЛИ 7 и 8, элементы И 9 и 10. 1 ил. сл vTn оэ о:) ел 4;; гоThe invention relates to digital computing and can be used in digital computers to create high-precision arithmetic devices in addition and subtraction of binary-coded floating-point numbers presented in direct or additional code. The purpose of the invention is to improve the accuracy of calculations. The goal is achieved by correcting both the de-normalized term and the normalized result. Correction in each of these cases is carried out by sending the corrected code number 1 to the low-order bit. Link 1 to the lower category of the denormalized term is produced if at least one 1 is discarded in the process of denormalization, and sending 1 to the lower-order result - in the case of garbage at least one in the normalization process. The device contains a register of 1 operand, a register of result 2, inputs 3 and 4 of the control for denormalization and normalization to the right, lower-order bits of 5.6 registers, n-input elements OR 7 and 8, elements 9 and 10. 1 Il. sl vTn oe o :) ate 4 ;; go
Description
bb
10ten
Изобретение относитс к цифровой вычислительной технике и может быть использовано в ЦВМ при создании высокоточных арифметических устройств сложени ми вычитани двоично-кодированных чисел с плавающей зап той,представленных в пр мом или дополнительном коде.The invention relates to digital computing and can be used in digital computers to create high-precision arithmetic devices by adding subtractions of binary-coded floating-point numbers presented in a forward or additional code.
Целью изобретени вл етс повьш1е- ние точности вычислений.The aim of the invention is to improve the accuracy of calculations.
На чертеже представлена функциональна схема устройства дл основани системы счислени Н 16.The drawing shows a functional diagram of the device for the base of the H 16 number system.
Устройство содержит регистр J one- 15 ранда,регистр 2 результата, входы 3 и 4 управлени денормализацией и нормализацией вправо, младшие двоичные разр ды 5 и 6 регистра операнда и регистра результата, два п-входовых элемента ШШ 7. и 8 (п log N) и два элемента И 9 и 10.The device contains the J one-15 rand register, the result register 2, inputs 3 and 4 of the control for denormalization and normalization to the right, the lower binary bits 5 and 6 of the register of the operand and the result register, two n-input elements SHSh 7. and 8 (n log N ) and two elements And 9 and 10.
Устройство работает следующим образом .The device works as follows.
Округление суммы или разности двух двоично-кодированных чисел с плавающей зап той с основанием 16, представ ленных в пр мом или дополнительном двоичном коде, состоит в том, чтоThe rounding of the sum or difference of two binary-coded floating point numbers with a base of 16, represented in a forward or supplemental binary code, is that
2020
2525
производитс коррекци как денорма- лизованного слагаемого, так и норма- лизованного результата.the correction is made to both the denormalized term and the normalized result.
Причем в каждом из этих случаев коррекци производитс при условии выхода за разр дную сетку регистров сдвига хот бы одной цифры 1 при сдвигах кодов вправо и осуществл етс посредством засылки в младший разр д корректируемого кода цифры 1.Moreover, in each of these cases, the correction is performed under the condition that the shift registers at least one digit 1 exit the discharge grid when the codes are shifted to the right and is performed by sending the digit 1 to be corrected in the lower order bit.
Перед началом работы устройства в регистре 1 находитс двоичный код мантиссы слагаемого с меньшей характеристикой , а в случае, когда, характеристики чисел равны, - код мантиссы одного из слагаемых.Before the device starts operation, register 1 contains the binary code of the term mantissa with a lower characteristic, and in the case when the characteristics of the numbers are equal, the code of the mantissa of one of the terms.
Если характеристики чисел различны , то происходит денормализаци кода , наход щегос в регистре 1. На вход управлени сдвигом вправо этого регистра по управл ющему входу 3 поступает сигнал J, в результате чего осуществл етс сдвиг кода в регистре 1 на одну тетраду вправо. При этом выдвинута тетрада пропадает. Сигналы с выхода разр дов младшей тетрады сдвигаемого в регистре 1 кода поступают на входы элемента ИЛИ 7, на выходе которого действует сигнал О, если в младшей тетраде регистIf the characteristics of numbers are different, then the code in register 1 is denormalized. To the right shift input of this register, control signal 3 receives a signal J, resulting in a code shift in register 1 by one tetrad to the right. When this is put forward, the tetrad disappears. The signals from the output of the bits of the lower tetrad of the code shifted in register 1 are fed to the inputs of the element OR 7, at the output of which the signal O acts, if in the lower tetrad the register
00
5 five
00
5five
00
ра 1 содержитс нулевой код, и 1, если в одном из разр дов этой тетрады имеетс J. Поскольку на первом входе элемента И 9 действует сигнал , поступающий по входу 3, то этот элемент открыт дл прохождени сигнала с выхода элемента ИЛИ 7 на вход младшего разр да 5, в котором к моменту прихода указанного сигнала установлена цифра кода, уже сдвинутого на одну тетраду .вправо (дл обеспечени этого в случае необходимости на линии, соедин ющей выход элемента И с входом младшего разр да 5, должен быть поставлен соответствующий элемент задержки). Если в младшей тетраде регистра 1 до сдвига кода наход тс нули, то на входе 3 младшего разр да после сдвига кода на одну тетраду вправо действует сигнал О, не мен ющий состо ние этого разр да. Если в одном из разр дов младшей тетрады регистра 1 до сдвига кода находитс хот бы одна 1, то младший разр д 5 после сдвига кода окажетс в состо нии . Таким образом, после первого выдвижени за разр дную сетку регистра 1 цифры 1 в младшем разр де 5 этого регистра при всех последующих сдвигах вплоть до момента прекращени денормализации всегда, будет находитьс цифра 1. Этим обеспечиваетс указанна вьш1е коррекци денормализованного числа.Section 1 contains a zero code, and 1 if there is a J in one of the bits of this tetrad. Since the first input of the AND 9 element has a signal coming through input 3, then this element is open to pass the signal from the output of the OR 7 element to the lower bit 5, in which, by the time of arrival of the indicated signal, the digit of the code already shifted by one tetrad is set to the right (to ensure this, if necessary, a corresponding delay element must be placed on the line connecting the output of the And element to the lower bit 5) ). If in the lower tetrade of register 1 before the shift of the code there are zeros, then at the input 3 of the least significant bit after the shift of the code one tetrad to the right, the signal O acts, which does not change the state of this discharge. If in one of the bits of the lower tetrad of register 1 before the code shift there is at least one 1, then the younger bit 5 after the code shift will be in the state. Thus, after the first advancement of the digit grid of register 1 digit 1 in the lower bit 5 of this register, at all subsequent shifts, until the denormalization stops, the figure 1 will always be found. This ensures the specified correction of the denormalized number.
Далее происз одит нормализаци результата выполнени операции. Мантисса ненормализованного результата находитс в регистре 2. Если результат требуетс нормализовать вправо, то на вход управлени сдвигом вправо регистра 2 по входу 4 поступает сигнал . 1, по которому происходит сдвиг наход щегос в регистре 2 двоичного кода на одну .тетраду вправо. При этом выдвинута за разр дную сетку регистра 2 тетрада пропадает. Сигналы с выходов разр дов младшей тетрады, сдвигаемого в регистре 2 кода, поступают на входы элемента ИЛИ 8, на выходе которого действует сигнал О, если в младшей тетраде регистра 2 содержитс нулевой код, и 1, если в одном из разр дов этой тетрады имеет- g с 1. Поскольку на первом входе |элемента И JO действует сигнал 1, поступающий по входу 4, то этот элемент открыт дл прохождени сигнала . с выхода элемента ИЛИ 8 на вход млад5Next, normalization of the result of the operation is performed. The mantissa of the unnormalized result is in register 2. If the result is to be normalized to the right, then a signal is received at the input of the right-shift control of register 2 at input 4. 1, by which the binary code in register 2 is shifted by one notebook to the right. At the same time, the 2 tetrad fading out of the discharge grid of the register is lost. The signals from the outputs of the bits of the lower tetrad shifted in the register 2 of the code are sent to the inputs of the element OR 8, the output of which is a signal O, if the lower tetrad of register 2 contains a zero code, and 1 if in one of the bits of this tetrad has - g from 1. Since at the first input | of the element AND JO there is a signal 1, arriving at the input 4, this element is open for the signal to pass. from the output of the element OR 8 to the input jun5
00
5five
00
шего разр да 6, в котором к моменту прихода указанного сигнала установлена .цифра кода, уже сдвинутого вправо на одну тетраду. Если в младшей тетраде регистра-2 до нормализации результата вправо находитс нулевой код то младша цифра сдвинутого кода не корректируетс , так как на входе младшего разр да 6 действует в этом случае сигнал О, не мен юш,ий состо ни этого разр да. Если при сдвиге вправо за разр дную сетку регистра 2 выдвигаетс 1, то на вход младшего разр да 6 поступает сигнал 1, в ре- зультате чего указанный разр д оказываетс в состо нии 1. Этим обеспечиваетс указанна коррекци нормализованного результата.bit 6, in which by the time of arrival of the specified signal is set. a digit of the code already shifted to the right by one tetrad. If in the lower tetrade of register-2 there is a zero code to normalize the result to the right, then the younger digit of the shifted code is not corrected, since at the input of the lower digit 6 the signal O, not change, is in this case. If, when shifting to the right, for the bit grid of register 2, 1 is pushed, then signal 1 is received at the input of the least significant bit 6, as a result of which the specified bit is set to state 1. This ensures the specified correction of the normalized result.
Округление, осуществл емое устройством , приводит к тому, что погрешность округлени может иметь различные знаки независимо от знаков чисел типа кода, в котором они. представлены , и выполн емой операции. Действи- тельно, пусть, например, величины слагаемых таковы, что нормализаци вправо результата не проводитс . В этом случае погрешность округлени складьшаетс из погрешности денорма- лизации одного из слагаемых, св занной с отбрасыванием выдвинутых за разр дную сетку регистра сдвига битов денормализованного числа, и погрешности , св занной с засылкой J в младший разр д денормализованного числа. Так как по вление цифры О или в мпадшем разр де денормализованного слагаемого равноверо тно, то засылка в этот разр д цифры 1 дает в половине случаев погрешность, отличную от нул , котора по абсолютной величине больше погрешности де-The rounding carried out by the device leads to the fact that the rounding error may have different signs, regardless of the signs of the numbers of the type of code in which they are. presented, and 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 carried out. In this case, the rounding error is the result of the denormalization error of one of the addends associated with dropping the bits of the denormalized number put forward for the discharge grid and the error associated with sending J to the least significant bit of the denormalized number. Since the occurrence of the digit O or in the decimal digit of the de-normalized term is equal, the sending of the digit 1 in this digit gives an error in half of the cases different from zero, which in absolute value is greater than the error of
Редактор В.БугренковаEditor V. Bugrenkova
6291/486291/48
Тираж 671ПодписноеCirculation 671 Subscription
ВНИИПИ Государственного комитета СССРVNIIPI USSR State Committee
по делам изобретений и открытий 113035, Москва, Ж-35, Раушска наб., д.4/5for inventions and discoveries 113035, Moscow, Zh-35, Raushsk nab., 4/5
Производственно-полиграфическое предпри тие, г.Ужгород, ул.Проектна ,4Production and printing company, Uzhgorod, Projecto st., 4
5 five
5 0 50
00
5five
нормализации и имеет противоположный ей знак. Таким образом, в половине случаев погрешность округлени положительна , а в половине случаев - отрицательна .normalization and has the opposite sign. Thus, in half of the cases, the rounding error is positive, and in half of the cases - negative.
Математическое ожидание погрешности округлени , возникающей в процессе работы предлагаемого устройства, строго равно нулю.The mathematical expectation of the error of rounding that occurs during the operation of the proposed device is strictly zero.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864067816A SU1361542A1 (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 |
---|---|---|---|
SU864067816A SU1361542A1 (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 |
---|---|
SU1361542A1 true SU1361542A1 (en) | 1987-12-23 |
Family
ID=21237805
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU864067816A SU1361542A1 (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) | SU1361542A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003007147A1 (en) * | 2001-07-13 | 2003-01-23 | Intel Zao | A method and apparatus to extract integer and fractional components from floating-point data |
-
1986
- 1986-05-27 SU SU864067816A patent/SU1361542A1/en active
Non-Patent Citations (1)
Title |
---|
Китов А.И., Криницкий Н.А. Электронные цифровые машины и npoi- раммирование.- М., 1961, с.90-93. Вычислительна система IBM/360.- М,: Советское радио, 1969, с.112. * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003007147A1 (en) * | 2001-07-13 | 2003-01-23 | Intel Zao | A method and apparatus to extract integer and fractional components from floating-point data |
US8185723B2 (en) | 2001-07-13 | 2012-05-22 | Intel Corporation | Method and apparatus to extract integer and fractional components from floating-point data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4758972A (en) | Precision rounding in a floating point arithmetic unit | |
US4785421A (en) | Normalizing circuit | |
KR100239029B1 (en) | Result normalizer and method of operation | |
EP0359809B1 (en) | Apparatus and method for floating point normalization prediction | |
US5111421A (en) | System for performing addition and subtraction of signed magnitude floating point binary numbers | |
US5633819A (en) | Inexact leading-one/leading-zero prediction integrated with a floating-point adder | |
US6895423B2 (en) | Apparatus and method of performing product-sum operation | |
AU589982B2 (en) | Circuitry for complementing binary numbers | |
US6981009B2 (en) | Apparatus and method for computing a logarithm of a floating-point number | |
US6205461B1 (en) | Floating point arithmetic logic unit leading zero count using fast approximate rounding | |
EP0234495B1 (en) | Arithmetic circuit capable of executing floating point operations and fixed point operations | |
US5247471A (en) | Radix aligner for floating point addition and subtraction | |
EP0328619A1 (en) | Apparatus and method for using a single carry chain for leading one detection and for ''sticky'' bit calculation | |
US5164914A (en) | Fast overflow and underflow limiting circuit for signed adder | |
US6542915B1 (en) | Floating point pipeline with a leading zeros anticipator circuit | |
US20080301209A1 (en) | Redundancy-free circuits for zero counters | |
SU1361542A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
US5754458A (en) | Trailing bit anticipator | |
EP0332215B1 (en) | Operation circuit based on floating-point representation | |
SU1339550A1 (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 | |
SU1339549A1 (en) | Device for rounding off sum and difference of binary-coded numbers with floating point | |
GB1475471A (en) | Floating point apparatus and techniques | |
JPS63266526A (en) | Precision converter |