SU1262503A1 - Device for rounding numbers - Google Patents

Device for rounding numbers Download PDF

Info

Publication number
SU1262503A1
SU1262503A1 SU843861198A SU3861198A SU1262503A1 SU 1262503 A1 SU1262503 A1 SU 1262503A1 SU 843861198 A SU843861198 A SU 843861198A SU 3861198 A SU3861198 A SU 3861198A SU 1262503 A1 SU1262503 A1 SU 1262503A1
Authority
SU
USSR - Soviet Union
Prior art keywords
input
numbers
register
elements
rounding
Prior art date
Application number
SU843861198A
Other languages
Russian (ru)
Inventor
Виталий Петрович Середа
Валерий Александрович Шипулин
Елена Николаевна Середа
Игорь Валерьевич Шипулин
Original Assignee
Предприятие П/Я А-3903
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 Предприятие П/Я А-3903 filed Critical Предприятие П/Я А-3903
Priority to SU843861198A priority Critical patent/SU1262503A1/en
Application granted granted Critical
Publication of SU1262503A1 publication Critical patent/SU1262503A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

Изобретение относитс  к вычислительной технике. Оно предназначено дл  расширени  диапазона округл емых чисел и может найти применение в ЭВЦМ и специализированных цифровых вычислительных устройствах. Целью изобретени   вл етс  расширение функциональных возможностей за счет округлени  отрицательных чисел. Поставленна  цель достигаетс  тем, что в устройство дл  округлени  чисел, содержащее два регистра 1,5, датчик случайных чисел 3, схему сравнени  2, группу элементов И 4, сумматор 6, вход 7 запуска устройства , дополнительно введены два элемента И-НЕ 8, 9, элемент ИЛИ-НЕ 10 с соот $ ветствуюш,ими св з ми. 1 ил.The invention relates to computing. It is intended to expand the range of rounded numbers and can be used in computer and specialized digital computing devices. The aim of the invention is to enhance the functionality by rounding negative numbers. The goal is achieved by the fact that the device for rounding numbers, containing two registers 1.5, random number sensor 3, comparison circuit 2, group of elements AND 4, adder 6, input 7 of starting the device, additionally introduced two elements IS-HE 8, 9, the element OR NOT 10 with the corresponding links. 1 il.

Description

77

1чЭ1HE

О5O5

oo

сдsd

Claims (1)

о оо Изобретение относитс  к вычислительной технике и может быть применено в ЭЦВМ и специализированных цифровых вычислительных устройствах. Целью изобретени   вл етс  расширение функциональных возможностей за счет округлени  отрицательных чисел. На чертеже представлена схема устройства дл  округлени  чисел. Устройство дл  округлени  чисел содержит регистр 1 сохран емой части числа, схему 2 сравнени , датчик 3 случайных чисел, группу элементов И 4, регистр 5 отбрасываемой части числа, сумматор 6, вход 7 запуска устройства, элементы И-НЕ 8 и 9, элемент ИЛИ-НЕ 10, элементы НЕ 11 и 12. Устройство дл  округлени  чисел работает следующим образом. Числа, обрабатываемые устройством, представлены в дополнительном коде с фиксированной зап той. Старший разр д знаковый «О соответствует плюсу, «1 минусу . Округл емое число помещаетс  на регистры 1 и 5. На вход 7 поступает сигнал начала операции, который бткрывает элементы И 4 группы и возбуждает датчик 3. Случайные числа сравниваютс  схемой 2 сравнени  с отбрасываемыми разр дами числа, поступающими с регистра 5 через элементы И 4 группы. Если округл емые числа больще случайных , то на входы элемента ИЛИ-НЕ 10 и первого элемента И-НЕ 8 из схемы 2 сравнени  выдаетс  значение «1, а если округл емые числа меньще случайных чисел - значение «О. Состо ние знакового разр да регистра 1 инвертируетс  элементом НЕ 12 и поступает на входы элемента ИЛИ-НЕ 10 и первого элемента И-НЕ 8. Информаци  с выхода элемента ИЛИ- НЕ 10 поступает на старщие разр ды сумматора 6, а информаци  с первого элемента И - НЕ 8 - на второй элемент И-НЕ 9, где она сравниваетс  с информацией с элемента ИЛИ-НЕ 10. Результат сравнени  поступает в младщий разр д сумматора 6. В сумматоре 6 производитс  сложение поступившего значени  с содержимым регистра 1. Нолученный результат записываетс  в регистр 1. Округление отрицательных чисел в большую сторону по абсолютной величине происходит по сигналу со схемы 2 сравнени , соответствующему нулю, и в меньшую сторону при соответствии сигнала единице. Дл  положительных чисел, наоборот, округление в большую сторону происходит по сигналу, соответствующему единице, и в меньшую сторону при соответствии сигнала нулю. Таким образом, в устройстве производитс  округление чисел на единицу с веро тностью , численно равной значению отбрасываемой части как положительных чисел , так и отрицательных. Формула изобретени  Устройство дл  округлени  чисел, содержащее регистр сохран емой части числа, регистр отбрасываемой части числа, сумматор , группу элементов И, схему сравнени , датчик случайных чисел, причем разр дный выход регистра отбрасываемой части числа соединен с первыми входами элементов И группы, выходы которых соединены с первым входом схемы сравнени , второй вход которой соединен с выходом датчика случайных чисел, вход запуска которого соединен с вторыми входами элементов И группы и с ВХОДОМ запуска устройства, разр дный выход регистра сохран емой части числа соединен с входом первого слагаемого сум.матора , отличающеес  тем, что, с целью расщирени  функциональных возможностей за счет округлени  отрицательных чисел, оно содержит два элемента И-НЕ, элемент ИЛИ-НЕ и два элемента НЕ, причем выход схемы сравнени  соединен с первыми входами первого элемента И-НЕ и элемента ИЛИ-НЕ, выходы которых соединены соответственно с первым входом второго элемента И-НЕ и с входом первого элемента НЕ, выходы которых соединены соответственно с младщим разр дом входа второго слагаемого сумматора и с вторым входом второго элемента И-НЕ, выход знакового разр да регистра сохран емой части числа соединен через второй элемент НЕ с вторым входом первого элемента И-НЕ и с вторым входом элемента ИЛИ-НЕ, выход которого соединей со старшими разр дами входа второго слагаемого сумматора, выход которого соединен с разр дным входом регистра сохран емой части числа.о оо The invention relates to computing and can be applied in digital computers and specialized digital computing devices. The aim of the invention is to enhance the functionality by rounding negative numbers. The drawing shows a diagram of the device for rounding numbers. The device for rounding numbers contains the register 1 of the stored part of the number, the comparison circuit 2, the sensor 3 of random numbers, the group of elements AND 4, the register 5 of the drop part of the number, the adder 6, the device start input 7, the elements AND-NO 8 and 9, the element OR -NOT 10, elements NOT 11 and 12. The device for rounding numbers works as follows. The numbers processed by the device are presented in an additional code with a fixed comma. The highest bit of the sign “O corresponds to a plus,“ 1 minus. The rounded number is placed on registers 1 and 5. Input 7 receives a signal to start operation, which opens elements AND 4 groups and excites sensor 3. Random numbers are compared by circuit 2 comparison with the rejected digits of the number coming from register 5 through elements AND 4 groups . If the rounded numbers are more than random, then the inputs of the element OR-NOT 10 and the first element, AND-NOT 8 from comparison circuit 2 are given the value "1, and if the rounded numbers are less than random numbers, the value" O. The state of the sign bit of register 1 is inverted by the element NOT 12 and is fed to the inputs of the element OR — NOT 10 and the first element AND — NOT 8. Information from the output of the element OR — NOT 10 goes to the high bits of the adder 6, and the information from the first element AND - NOT 8 - to the second element AND-NOT 9, where it is compared with information from the element OR - NOT 10. The result of the comparison goes to the youngest bit of the adder 6. In the adder 6, the received value is added to the contents of the register 1. The result obtained is written to Register 1. Rounding Negative s number to the next higher absolute value occurs on a signal from the comparison circuit 2 corresponding to zero and in accordance with the smaller side unit signal. For positive numbers, on the contrary, rounding up occurs on the signal corresponding to one, and down on the corresponding signal to zero. Thus, the device rounds up the numbers by one with a probability that is numerically equal to the value of the drop part of both positive and negative numbers. Apparatus of the Invention A device for rounding numbers comprising a register of a stored part of a number, a register of a dropped part of a number, an adder, a group of elements AND, a comparison circuit, a random number sensor, the discharge output of the register of a dropped part of a number connected to the first inputs of the elements of AND group whose outputs connected to the first input of the comparison circuit, the second input of which is connected to the output of the random number sensor, the start input of which is connected to the second inputs of the AND elements of the group and to the device start INPUT, bit The output of the register of the stored part of the number is connected to the input of the first summand summator, characterized in that, in order to extend the functionality by rounding negative numbers, it contains two AND-NOT elements, an OR-NOT element and two NOT elements, and the output Comparison circuits are connected to the first inputs of the first AND-NOT element and the OR-NOT element, the outputs of which are connected respectively to the first input of the second AND-NOT element and to the input of the first element NOT, the outputs of which are connected respectively to the junior input second input The second term of the adder and with the second input of the second NAND element, the output of the sign bit of the register of the stored part of the number is connected via the second element NOT to the second input of the first AND element and the second input of the OR NOT element, the output of which is connected to the higher The input of the second term of the adder, the output of which is connected to the bit input of the register of the stored part of the number.
SU843861198A 1984-12-25 1984-12-25 Device for rounding numbers SU1262503A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU843861198A SU1262503A1 (en) 1984-12-25 1984-12-25 Device for rounding numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU843861198A SU1262503A1 (en) 1984-12-25 1984-12-25 Device for rounding numbers

Publications (1)

Publication Number Publication Date
SU1262503A1 true SU1262503A1 (en) 1986-10-07

Family

ID=21164798

Family Applications (1)

Application Number Title Priority Date Filing Date
SU843861198A SU1262503A1 (en) 1984-12-25 1984-12-25 Device for rounding numbers

Country Status (1)

Country Link
SU (1) SU1262503A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 1083193, кл. G 06 F 11/00, 1982. Авторское свидетельство СССР № 995088, кл. G 06 F 7/38, 1981. Авторское свидетельство СССР № 362299, кл. G 06 F 11/00, 1970. *

Similar Documents

Publication Publication Date Title
EP0339685A2 (en) Parallel processing zero detection circuit having high speed and high efficiency
EP0540175B1 (en) Digital signal processing apparatus
SU1262503A1 (en) Device for rounding numbers
US4954978A (en) Priority order decomposing apparatus
SU1043636A1 (en) Device for number rounding
SU1103223A2 (en) Device for adding binary numbers
SU1193665A1 (en) Device for summing binary numbers
SU1270757A1 (en) Device for taking sum of binary numbers
JP3052848B2 (en) Frame synchronization protection circuit
SU1185328A1 (en) Multiplying device
SU951300A2 (en) Device for squaring n-bit binary numbers
SU463968A1 (en) Device for sorting information
SU363119A1 (en) REGISTER OF SHIFT
SU734669A1 (en) Converter of proper binary fraction into binary-decimal fraction and integer binary-decimal numbers into binary numbers
SU1198511A1 (en) Device for summing binary numbers
RU1786484C (en) Universal adder
SU888109A1 (en) Multiplier
SU997028A1 (en) Extremum code determining device
SU441559A1 (en) Device for comparing binary numbers
SU1092494A2 (en) Device for sorting numbers
SU1383345A1 (en) Logarithmic converter
SU1141401A1 (en) Device for calculating difference of two numbers
SU788107A1 (en) Number adding device
SU1642464A1 (en) Computing device
SU1695308A2 (en) Modulo three pyramidal convolution