SU717755A1 - Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers - Google Patents

Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers Download PDF

Info

Publication number
SU717755A1
SU717755A1 SU772466513A SU2466513A SU717755A1 SU 717755 A1 SU717755 A1 SU 717755A1 SU 772466513 A SU772466513 A SU 772466513A SU 2466513 A SU2466513 A SU 2466513A SU 717755 A1 SU717755 A1 SU 717755A1
Authority
SU
USSR - Soviet Union
Prior art keywords
binary
decimal
mantissa
order
inputs
Prior art date
Application number
SU772466513A
Other languages
Russian (ru)
Inventor
Александр Арменакович Степанян
Наталья Владимировна Ефимушкина
Original Assignee
Куйбышевский политехнический институт им. В.В.Куйбышева
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 Куйбышевский политехнический институт им. В.В.Куйбышева filed Critical Куйбышевский политехнический институт им. В.В.Куйбышева
Priority to SU772466513A priority Critical patent/SU717755A1/en
Application granted granted Critical
Publication of SU717755A1 publication Critical patent/SU717755A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Description

Изобретение относится к вычислительной технике и предназначено для использования в вычислительных машинах, работающих с плавающей запятой.The invention relates to computer technology and is intended for use in computers operating with floating point.

Известно устройство для преобразования десятичных чисел в форме с плавающей' запятой в· двоичнью, которое содержит входйой регистр, дешифраторы, элементы И, ИЛИ, сумматор, сдвиговый регистр и блоки нормализации [1].A device is known for converting decimal numbers in the form of a floating point into binary, which contains an input register, decoders, AND, OR elements, an adder, a shift register, and normalization blocks [1].

К недостаткам известного устройства относятся недостаточно высокое быстродействие и невозможность обратного преобразованияThe disadvantages of the known devices include insufficiently high speed and the inability to reverse conversion

Наиболее близким по технической сущности к предложенному является устройство для 15 преобразования двоичного кода в десятичный и обратно для чисел с плавающей запятой,' со/ держащее двоичный и десятичный регистры мантиссы, дополнительные старшую и младшую тетрады десятичного регистра мантиссы, блок 2Q коррекции, двоичный и десятичный реверсивные счетчики порядка, дешифраторы нуля двоичного и десятичного реверсивных счетчиков порядка; генератор тактовых импульсов, выход которого связан со входами дешифраторов прямого и обратного преобразования, причем входы дешифратора прямого преобразования соединены с выходами дешифратора нуля двоичного реверсивного счетчика порядка, младшего разряда двоичного регистра мантиссы, триггера знака двоичного порядка, старшей и дополнительной старшей тетрады десятичного регистра мантиссы, входы дешифратора обратного преобразования соединены с выходами дешифратора нуля десятичного реверсивного счетчика порядка, дополнительной старшей тетрады десятичного регистра мантиссы, блока коррекции, а выходы дешифраторов прямого и обратного преобразования соединены с соответствующими входами блока коррекции, вхо- . дами генератора тактовых импульсов, входами сложения и вычитания двоичного и десятичного реверсивных счетчиков порядка, информационные входы которых являются входами, двоичного и десятичного порядка, а выходы соединены соответственно со входами дешифраторов нуля, двоичного и десятичного реверсивных счетчиков порядка и с выходами уст3 ройства, информационные входы устройства подключены ко входам регистров двоичной и десятичной мантисс, вход и выходы знакового разряда регистра двоичной мантиссы соединены соответственно с выходами и входами ответствующего разряда регистра десятичной мантиссы, разрядные выходы двоичного и десятичного регистров мантисс являются выходами устройства, входы и выходы блока кор-/ рекции соединены соответственно с разрядными выходами и входами десятичного регистра . мантиссы и его дополнительных старшей и младшей тетрад, вход старшего разряда двоичного регистра мантиссы соединен с соответствующим выходом дешифратора обратного преобразования, входы триггеров знака двоич-. кого и десятичного порядков подключены к соответствующим входам устройства [2].The closest in technical essence to the proposed one is the device for 15 convert binary to decimal and back to floating point numbers, 'to / keep binary and decimal register mantissa additional older and younger tetrad decimal register mantissa block 2Q correction, binary and decimal reverse order counters, binary and decimal zero decoders, reverse order counters; a clock pulse generator, the output of which is connected to the inputs of the direct and inverse transform decoders, the inputs of the direct transform decoder are connected to the outputs of the zero decoder of the binary reversible order counter, the least significant bit of the binary register of the mantissa, the trigger of the binary sign, the senior and additional senior notebooks of the decimal register of the mantissa, the inputs of the inverse decoder are connected to the outputs of the zero decoder of the decimal reversible order counter, an additional rshey tetrad decimal register mantissa correction block, and outputs of decoders of forward and reverse conversion are connected to respective inputs of the correction unit that enter. the clock pulse generator, the addition and subtraction inputs of binary and decimal reversible order counters, the information inputs of which are inputs of binary and decimal order, and the outputs are connected respectively to the inputs of the decoders of zero, binary and decimal reverse counters of the device and to the outputs of the device, information inputs the devices are connected to the inputs of the binary and decimal mantissa registers, the inputs and outputs of the sign bit of the binary mantissa register are connected respectively to the outputs and the corresponding discharge bits of the decimal mantissa register, the bit outputs of the binary and decimal mantissa registers are the device outputs, the inputs and outputs of the correction / reduction unit are connected respectively to the bit outputs and inputs of the decimal register. mantissa and its additional senior and junior tetrads, the input of the highest bit of the binary register of the mantissa is connected to the corresponding output of the inverse decoder, the inputs of the triggers are binary-sign. whom and decimal orders are connected to the corresponding inputs of the device [2].

Однако, алгоритм преобразования в известном устройстве не содержит случая преобразования чисел с нулевой мантиссой, что приводит к непроизводительной работе оборудования во время ее преобразования и к снижению быстродействия устройства. При преобразовании десятичного порядка в двоичный, в зависимости от знака его в обоих счетчиках (двоичном и десятичном) должны выполняться операции сложения и вычитания, что усложняет устройство. В схеме для преобразования мантисс, двоичный регистр снабжен цепями сдвига влево на один двоичный разряд, которые нужны лишь для преобразования целых чисел из двоичной системы Счисления в десятичную. Поскольку мантисса числа в форме с плавающей запятой является правильной дробью, необходимость в указанных цепях для преобразования таких чисел отпадает.However, the conversion algorithm in the known device does not contain the case of converting numbers with a zero mantissa, which leads to unproductive operation of the equipment during its conversion and to a decrease in the speed of the device. When converting decimal to binary, depending on the sign in both counters (binary and decimal), addition and subtraction operations must be performed, which complicates the device. In the scheme for converting the mantissa, the binary register is equipped with left shift circuits for one binary digit, which are needed only for converting integers from the binary Decimal system. Since the mantissa of a floating-point number is the right fraction, the need for these chains to convert such numbers is no longer necessary.

Целью настоящего изобретения является повышение быстродействия и упрощение устройства.The aim of the present invention is to improve performance and simplify the device.

Поставленная цель достигается тем, что в устройство введены триггер направления преобразования и дешифраторы нуля двоичного и Десятичного регистров мантиссы, входы которых соединены с разрядными выходами соответствующих регистров мантиссы, а выходы — с соответствующими входами дешифраторов прямого и обратного преобразования, выход младшей дополнительной тетрады десятичного регистра мантиссы соединен , с соответствующим входом, дешифратора обратного преобразования, входы триггера направления преобразования соединены с управляющим входом устройства, а выходы - со входами дешифраторов прямого и обратного преобразования, входы и выходы триггера знака двоичного порядка соединены соответственно с выходами и входами соответствующего триггера десятичного порядка, выходы триггера знака двоичного порядка подключены ко входам дешифратора обратного преобразования, выходы дешифраторов нуля двоичного и десятичного реверсивных счетчиков порядка соединены соответственно со вхо5 дами дешифраторов обратного, и прямого преобразования.This goal is achieved by the fact that the device has a conversion direction trigger and zero decoders of binary and decimal registers of the mantissa, the inputs of which are connected to the bit outputs of the corresponding registers of the mantissa, and the outputs are connected with the corresponding inputs of the decoders of the forward and reverse transforms, the output of the lower additional tetrad of the decimal register of the mantissa connected, with the corresponding input, the inverse decoder, the inputs of the conversion direction trigger are connected to the control m is the input of the device, and the outputs are with the inputs of the direct and inverse decryptors, the inputs and outputs of the binary sign decimal trigger are connected respectively to the outputs and inputs of the corresponding decimal order trigger, the outputs of the binary decimal sign trigger are connected to the inputs of the inverse decryptor, the outputs of the binary and decimal reversible order counters are connected respectively to the inputs of the decoders of the reverse, and direct conversion.

На чертеже представлена блок-схема устройства для преобразования двоичного кода в десятичный и обратно для чисел с плавающей 10 запятой, содержащая: двоичный 1 и десятичный 2 регистры мантисс, дополнительную старшую 3 и дополнительную младшую 4 тетрады десятичного 2 регистра мантиссы, блок 5 коррекции, двоичный 6 й десятичный 7 реверсив15 ные счетчики порядка, триггеры 8, 9 знака г ’ двоичного и соответственно десятичного порядка, дешифраторы нуля 10 и 11 соответственно двоичного и десятичного регистров мантиссы, дешифраторы нуля 12 и 13 соответствен20 но двоичного и десятичного реверсивных счетчиков порядка, дешифраторы 14 и 1S соответственно прямого и обратного преобразования, генераторы 16 тактовых импульсов,.триггер 17 направления преобразования, входы 18 и 19 ре25 гистров соответственно’Двоичной и десятичной мантисс, входы 20 и 21’соответственно двоичного и десятичного порядков, входы 22 и 23 триггеров знака соответственно, двоичного и десятичного порядков, выходы 24, 25, 26, 27 30 устройства, управляющие входы 28 устройства, триггеры знаков двоичной 29 и десятичной 30 ' мантисс. -The drawing shows a block diagram of a device for converting binary code to decimal and vice versa for floating point numbers 10, containing: binary 1 and decimal 2 mantissa registers, additional high 3 and additional low 4 tetrad decimal 2 mantissa registers, correction block 5, binary 6 th decimal 7 reversiv15 nye order counters, flip-flops 8 and 9 mark g ', respectively binary and decimal order, zero decoders 10 and 11, respectively binary and decimal mantissa registers, decoders 12 and 13 are zero corresponds 20 but binary and decimal reversible order counters, decoders 14 and 1S, respectively direct and inverse transforms, 16 clock pulse generators, .trigger 17 of the direction of conversion, inputs 18 and 19 of the register 25 of the binary and decimal mantisses respectively, inputs 20 and 21, respectively, of the binary and decimal orders, inputs 22 and 23 of the sign triggers, respectively, binary and decimal orders, outputs 24, 25, 26, 27 30 of the device, control inputs of the device 28, triggers of the signs of the binary 29 and decimal 30 'mantissa. -

Алгоритмы Перевода чисел из двоичной си* 35 стемы счисления в десятичную сводятся к следующему. :Algorithms Converting numbers from binary s * 35 decimal systems to the decimal are as follows. :

Сначала производится преобразование дво- ичной мантиссы М, в десятичную М, „' подачей ее цифр, начиная с младшей, в десятичный 40 регистр, где выполняется последовательное деление ее на два. При поразрядной мантиссе двоичного числа преобразование заканчивается через гп тактов, и в десятичном регистре оказывается мантисса а в двоичном - нуль. 45 После этого выполняется преобразование порядков. Эта процедура зависит от знака двоичного порядка.First, the binary mantissa M is converted to decimal M, “'by feeding its digits, starting from the youngest, to the decimal 40 register, where it is sequentially divided by two. With a bitwise mantissa of a binary number, the conversion ends in rn clock cycles, and the mantissa appears in the decimal register and zero in binary. 45 After that, the transformation of orders. This procedure depends on the sign of the binary order.

Если двоичный порядок положителен, мантисса Μιβ умножается на два до тех пор, по50 ка произведение М10 не станет больше единицы. Одновременно с каждым удвоением из двоичного Порядка вычитается единица. После переполнения мантисс умножение прекращается и выполняется нормализация полученного 55 произведения: сдвиг вправо на один десятичный разряд и добавление единицы к десятичному порядку. Процесс продолжается до тех пор, пока двоичный порядок не станет равен нулю.If the binary order is positive, the mantissa Μ ιβ is multiplied by two until the product M 10 is greater than one. Simultaneously with each doubling, a unit is subtracted from the binary Order. After the mantissa overflows, the multiplication stops and the resulting 55 product is normalized: shift to the right by one decimal place and add one to the decimal order. The process continues until the binary order becomes zero.

717755 6717755 6

В случае, если двоичный' порядок отрицателен, мантисса М10 последовательно делится на два, пока старший десятичный разряд частного не станет равен нулю. При каждом делении к двоичному порядку добавляется едини-. 5 ца. После нарушения нормализации вправо деление прекращается и полученное частное нормализуется: сдвигается влево на один десятичный разряд, а к десятичному порядку добавляется —1. 10 In case the binary 'order is negative, the mantissa M 10 is sequentially divided by two, until the senior decimal digit of the quotient becomes zero. With each division, one is added to the binary order. 5 ts. After a violation of normalization to the right, division stops and the resulting quotient is normalized: it is shifted to the left by one decimal place, and -1 is added to the decimal order. 10

Процесс заканчивается, как только двоичный порядок Станет равен нулю.The process ends as soon as the binary order becomes zero.

Если двоичная мантисса равна нулю, пре- (5 образование мантисс не выполняется. Результат считается равным нулю.If the binary mantissa is equal to zero, pre- (5 formation of the mantissa is not performed. The result is considered equal to zero.

Рассмотрим работу преобразователя для двух режимов: прямого преобразования из двоичной системы счисления в десятичную и обратного — 2Q из десятичной системы счисления в двоичную. Вид преобразования задается триггером 17, который сигналом от устройства управления ЦВМ устанавливается в состояние ”0” - при прямом и в состояние ”1” - при обратном преобразовании. ·.Consider the operation of the converter for two modes: direct conversion from binary to decimal and inverse 2Q from decimal to binary. The type of conversion is set by trigger 17, which is set by the signal from the digital computer control device to the state “0” for direct and the state “1” for reverse conversion. ·.

Преобразование из двоичной системы счисления в десятичную.Converting from binary to decimal.

Работой устройства управляет дешифратор 14. В этом случае триггер 17 устанавливается в состояние ”0” и по шинам 18, 20, 22 на вход преобразователя передается исходное двоичное число. Десятичный же регистр и счеучик устанавливаются в нулевое состояние по входам 19, 21, 23. 35The operation of the device is controlled by the decoder 14. In this case, the trigger 17 is set to the state “0” and the initial binary number is transmitted to the converter input via buses 18, 20, 22. The decimal register and little counter are set to zero at the inputs 19, 21, 23. 35

На выходах дешифраторов 10 и 12 появляются сигналы о том, что двоичный регистр и счетчик находятся в ненулевом состоянии. Знаки мантиссы и порядка из триггеров 29 и 8 передаются на входы триггеров 30 и 9 соот- 40 ветственно.At the outputs of the decoders 10 and 12, signals appear that the binary register and counter are in a non-zero state. The signs of the mantissa and order from the triggers 29 and 8 are transmitted to the inputs of the triggers 30 and 9, respectively 40 .

Если двоичное число или его мантисса равны нулю, дешифратор 14 выдает сигнал ’’Конец преобразования”. При этом десятичное, число также равно нулю. Если же нулю равен толь-.5 ко порядок двоичного числа, то преобразование выполняется так же, как и в общем случае, который описывается ниже.If the binary number or its mantissa is equal to zero, the decoder 14 generates a signal “End of conversion”. With this decimal, the number is also zero. If zero is equal to -. 5 to the order of a binary number, the conversion is performed in the same way as in the general case, which is described below.

В общем случае, когда мантисса М, и порядок Р3 не равны нулю, дешифратор 13 запускает генератор тактовых импульсов и начинает сдвиг мантиссы М2 на один разряд вправо. Младшие разряды мантиссы Ма проходят на вход блока 5 коррекции и через него — на вход первого разряда регистра 2. При этом 55 происходит деление на два в десятичном регистре. После m тактов сдвига и деления' по- ’ полам в десятичном регистре оказывается преобразованная мантисса М, а в двоичном ре гистре — нуль. Дешифратор 14 прекращает преобразование мантисс.In the general case, when the mantissa M and the order P 3 are not equal to zero, the decoder 13 starts the clock pulse generator and begins to shift the mantissa M 2 by one bit to the right. The least significant bits of the mantissa M a pass to the input of the correction block 5 and through it to the input of the first bit of register 2. At the same time, 55 is divided by two in the decimal register. After m cycles shear and dividing 'po-' floors in decimal register is converted mantissa M 1 ° and re giste binary - zero. The decoder 14 stops the conversion of the mantissa.

Дальнейшей работой преобразователя кодов управляет триггер 8 знака порядка. Если он в нулевом состоянии (порядок положительный), то дешифратор 14 начинает выполнять удвоения десятичной мантиссы, если в единичном дешифратор 14 выполняет последовательное деление· на двй мантиссы М10.The further operation of the code converter is controlled by trigger 8 of the order sign. If it is in the zero state (the order is positive), then the decoder 14 starts to double the decimal mantissa, if in a single decoder 14 performs a sequential division · into two mantissa M 10 .

Пусть двоичный порядок положителен.Let the binary order be positive.

В этом случае дешифратор 14 через блок коррекции 5 выполняет последовательное умножение десятичной мантиссы на два с одновременным вычитанием единицы из двоичного б счетчика порядка.In this case, the decoder 14 through the correction unit 5 sequentially multiplies the decimal mantissa by two while subtracting one from the binary order counter.

,| Как только в результате умножения произойдет переполнение Мантисс в регистре 2, дешифратор 14 прекращает удвоение и выполняет нормализацию десятичной мантиссы: сдвиг вправо на один десятичный разряд и добавление единицы к счетчику 10. Затем снова выполняется последовательное умножение на два до тех пор, пока в двоичном счетчике 6 не появится нуль и не будет получена нормализованная мантисса М10., | As soon as the multiplication overflows the Mantissa in register 2, the decoder 14 stops doubling and normalizes the decimal mantissa: right shift by one decimal place and adding one to the counter 10. Then, sequential multiplication by two is performed again until the binary counter 6, zero does not appear and a normalized mantissa M 10 is not obtained.

Дешифратор 14 выдает сигнал ’’Конец преобразования” и отключает генератор 16.The decoder 14 generates a signal ’’ End of conversion ”and turns off the generator 16.

Предположим теперь, что исходное двоичное число имеет отрицательный порядок. В этом случае после преобразования мантисс дешифратор 14 через блок 5 коррекции выполняет последовательное деление десятичной мантиссы на два с одновременным вычитанием единицы из абсолютной величины двоичного порядка (эта величина хранится в счетчике 6 порядка, а знак порядка - в триггере 8).Suppose now that the original binary number is in negative order. In this case, after the conversion of the mantissa, the decoder 14, through the correction unit 5, performs sequential division of the decimal mantissa into two with the simultaneous subtraction of one from the absolute value of the binary order (this value is stored in the 6th order counter, and the order sign is in trigger 8).

Процесс продолжается· до нарушения нормализации десятичной мантиссы - появления нуля в старшей декаде регистра 2. При этом дешифратор 14 прекращает деление и выполняет нормализацию: сдвиг Влево на один десятичный разряд и добавление ”1” к абсолютной величине порядка (знак ’’минус” присвоен ему в самом начале преобразования после установки триггера 9 в состояние ”1”),The process continues · until the normalization of the decimal mantissa is violated — zero appears in the upper decade of register 2. At the same time, the decoder 14 stops dividing and performs normalization: shifting the Left by one decimal place and adding “1” to the absolute value of the order (the minus sign is assigned to it at the very beginning of the conversion after setting trigger 9 to the state “1”),

Затем дешифратор 14. начинает новый цикл деления и так до тех пор, пока в Двоичном счетчике не появится нуль и не будет получена нормализованная мантисса М,о;Then the decoder 14. starts a new division cycle, and so on, until zero appears in the Binary counter and a normalized mantissa M, о is obtained;

Дешифратор 14 выдает сигнал ’’Конец преобразования” и отключает генератор 16.The decoder 14 generates a signal ’’ End of conversion ”and turns off the generator 16.

Если порядок исходного двоичного числа Р3=0, а мантисса М3=# 0, то с преобразованием мантисс процесс перевода заканчивается и дешифратор 14 сразу выдает сигнал ’’Конец преобразования”.If the order of the initial binary number is P 3 = 0, and the mantissa is M 3 = # 0, then with the conversion of the mantissa the translation process ends and the decoder 14 immediately gives the signal “End of conversion”.

to 7 7''.. 717755 'to 7 7 '' .. 717755 '

Мантисса Mt0 и порядок Р10 полученного десятичного числа снимаются с выходных шин '25, 27/ 7:7:7.///::............ - ::: .. . . 7The mantissa M t0 and the order P 10 of the obtained decimal number are removed from the output buses '25, 27/7: 7: 7 ./// :: ............ - ::: ... . 7

Преобразование из десятичной системы * счислёнйя в двоичную. “Converting from decimal * numeral to binary. “

Работой устройства управляет дешифратор 15.The operation of the device is controlled by the decoder 15.

Такое преобразование удобнее начинать с перевода порядков. Триггер 17 для этого устанавливается в состояние ”1”. По шинам 19, 21, 23 на вход преобразователя подаётся исходнос десятичное число. Двоичный регистр / й счетчик, по шинам 18, 20, 22 устанавливается в нулевое состояние.It is more convenient to begin such a transformation with a translation of orders. The trigger 17 for this is set to the state "1". On the buses 19, 21, 23, the initial decimal number is fed to the input of the converter. The binary register / th counter, on buses 18, 20, 22 is set to zero.

На выходах дешифраторов 11 и 13 появляются Сигналы'о том, что десятичный регистр й счейик находятся в ненулевом состояний.'Зна// ки мантиссы и порядка из триггеров 30 и 9 'передаются на входы триггеров 29 и 8 соответственно.- : ' ’Signals appear on the outputs of decoders 11 and 13, indicating that the decimal register and the counter are in non-zero states. 'Knowing // the mantissa and order ki from triggers 30 and 9' are transmitted to the inputs of triggers 29 and 8, respectively .-: '’

Если десятичное число или его мантисса .7·. равны нулю, дешифратор 15 выдает сигнал '’Конец преобразования”. В этом случае двоичное число будет также равно нулю. При ну' левом порядке и ненулевой мантиссе преобразование начинается с перевода Mairrncc: \If the decimal number or its mantissa .7 ·. are equal to zero, the decoder 15 gives the signal '’End of conversion”. In this case, the binary number will also be zero. For a well-left order and a nonzero mantissa, the conversion begins with the translation Mairrncc: \

В общем случае, когда мантисса М10 '¥= 0 и порядок Р10^*Ю, дешифратор 15 запускает ......генератор тактовых импульсов.In the general case, when the mantissa is M 10 '¥ = 0 and the order is P1 0 ^ * Yu, the decoder 15 starts ...... a clock pulse generator.

Предположим, что порядок дедатичного чис’ ’ 7 ^'да'поло^тслен? При этом Дешифратор 15 через[блок .5 ^выпрлняет^ сдвиг Десятичной ман' ’ тиссы на один разряд влево с одновременным вычитанием единицы из десятичного порядка. Затем’дешифратор 15 через блок 5/выполняет последовательное деление сдвинутой/мантиссы на два с одновременным добавлением единицы к двоичному счетчику порядка. Процесс Деления продолжается до тех пор, пока не будет’ устранено нарушение нормализации в десятичном регистре. После этого дешифратор 15 выполняет очередной сдвиг десятичной мантиссы влево и счетчике ί тисса не будет нормализована.Suppose that the order of the deedatic number is ’’ 7 ^ 'yes' polo ^ tslen? At the same time, the Decoder 15 through [block .5 ^ performs ^ shift the Decimal man '’of the yew one digit to the left with the simultaneous subtraction of one from the decimal order. Then the decryptor 15 through block 5 / sequentially divides the shifted / mantissa into two while adding one to the binary order counter. The process of division continues until the violation of normalization in decimal register is eliminated. After this, the decoder 15 performs the next shift of the decimal mantissa to the left and the counter ί yew will not be normalized.

”’ Если исходный десятичный порядок отрицателен,го дешифратор 15 через блок 5 выполняет сдвиг десятишюй магписсы на оДйн разряд вправо. При этом младшая цифра ёе попадает в дополнительную младшую тетраду 4. Одно- , временно со сдвигом дешифратор 15 осущест- 50 вляет -уменьшение десятичного порядка на еди” вицу.' / .. ... 7:/......,..... ‘”’ If the original decimal order is negative, then the decoder 15, through block 5, shifts the tenth magpies by one digit to the right. In this case, the lowest digit ёe falls into the additional lowercase 4. At the same time, temporarily with a shift, the decoder 15 implements -decreasing the decimal order by one "unit." / .. ... 7: / ......, ..... ‘

Затем дешифратор 15 через блок 5 выполняет последовательное удвоение десятичной ман' ' тиссы с одновременным увеличением на единицу абсолютной величины двоичного порядка (знак ’’минус” присвоен ему в самом начале преобразования после установки триггера 8 в состояние ” 1”)Then, the decoder 15, through block 5, performs sequential doubling of the decimal man tissa with a simultaneous increase of one absolute value of the binary order (the ’’ minus sign is assigned to it at the very beginning of the conversion after setting trigger 8 to the state “1”)

Как только нарушение нормализации в регистре 2 будет устранено и в дополнительной младшей тетраде 4 будет нуль, дешифратор 15 начинает новый цикл преобразов алия поряд-: ков: сдвиг вправо и удвоения мантиссы.As soon as the normalization violation in register 2 is eliminated and the additional minor notebook 4 is zero, the decoder 15 starts a new transformation cycle: order shift: shift to the right and double the mantissa.

Процесс продолжается до тех пор, пока десятичный порядок не станет равен нулю, а десятичная мантисса не будет нормализована. На этом преобразование порядков заканчивается.The process continues until the decimal order is zero and the decimal mantissa is normalized. This completes the transformation of orders.

Далее выполняется преобразование мантисс. При этом дешифратор 15 через блок 5 осуществляет последовательное деление на два в регистре 2. Цифра младшего разряда десятичной мантиссы после каждого такта деления дает очередную младшую цифру двоичной мантиссы.Next, the mantissum conversion is performed. In this case, the decoder 15 through block 5 performs sequential division into two in register 2. The digit of the least significant digit of the decimal mantissa after each division clock gives the next lowest digit of the binary mantissa.

15 ' ' Эта цифра передаётся дешифратором 15 на вход старшего разряда регистра 17. После m тактов сдвига и деления в регистре 1 окажется преобразованная, двоичная мантисса. 15 '' This digit is transmitted by the decoder 15 to the input of the highest bit of register 17. After m shift and division cycles, register 1 will have a converted, binary mantissa.

Перевод окончен. Дешифратор 15 выдаёт сигнал ’’Конец преобразования” и отключает генератор 16. Полученное двоичное число снимается с шйи 24, 26.The translation is completed. The decoder 15 gives a signal ’’ End of conversion ”and turns off the generator 16. The received binary number is removed from shyi 24, 26.

Отсутствие цепей сдвига влево в двоичном регистре мантиссы упрощает устройство и повышает надежность его работы за счет уменьшения количества элементов й связей между ними. Выполнение при переводе порядков операций одного знака (только сложения или только вычитания) над их абсолютными величинами также сокращает количество входов у счетчиков порядков: предлагаемое устройство содержит на восемь таких входов меньше, чем известное. В известном устройстве анализ на нуль мантиссы не производится, что может привести к выполнению m бесполезных сдвигов в регистре 1 при преобразовании из двоичной системы счисления в десятичную, а также к m + 10 - 1 таких же сдвигов в регистре 2 при обратном преобразовании, где К — количество разрядов в десятичном счетчике порядка. В предлагаемом устройстве, если мантисса исходного числа равна нулю, преобра45 зование не выполняется, и результат также равен нулю. Это позволяет повысить быстродействие устройства при преобразовании чисел с нулевой мантиссой.The absence of left shift circuits in the binary register of the mantissa simplifies the device and increases the reliability of its operation by reducing the number of elements of the th connections between them. The execution of the order of operations of the same sign (only addition or subtraction) over their absolute values also reduces the number of inputs from order counters: the proposed device contains eight such inputs less than the known one. In the known device, analysis for zero mantissa is not performed, which can lead to m useless shifts in register 1 when converting from binary to decimal, as well as to m + 10 - 1 of the same shifts in register 2 for inverse conversion, where K - the number of digits in the decimal order counter. In the proposed device, if the mantissa of the initial number is equal to zero, the conversion is not performed, and the result is also equal to zero. This allows you to improve the performance of the device when converting numbers with zero mantissa.

так до тех пор, пока в десятичном не окажется 'нуль, а десятичная манФормула изобре тения двоичного чисел с ила-so until the decimal is zero, and the decimal man Formula of the invention of binary numbers from

Claims (2)

V .37 ррйства, информационные входы устройства подключены ко входам регистров двоичной и дес тичной мантисс, вход и выходы знакового разр да регистра двоичной мантиссы соединены соответственно с выходами и входами ответствующего разр да регистра дес тшшой мантйсЛ, разр дные выходы двоичного и дес тичного регистров мантисс  вл ютс  выходами устройства, входы и выходы блока кор-, рекции соединены соответственно с разр дными выходами и входами дес тичного регистра . мантиссы и его дополнителыагх старшей и младшей тетрад, вход старшего разр да двоичного регистра мантиссы соединен с соответстйвующим выходом дешифратора обратного / преобразовани , входы триггеров знака двоич-. ного и дес тичного пор дков подкйюченьт к соот ветстйующим входам устройства 2. Однако, алгоритм преобразовани  в известном устройстве не содержит случа  преобразовани  чисел с нулевой мантиссой, что приводат к непроизводительной работе оборудовани  во врем  ее преобразовани  и к снижению быстродействи  устройства. .При преобразовании дес тишогЬ пор дка в двоичный, в зависи рт знака его в обоих счетчиках (двричном и дес тичном) должш зьп1олн 11.сй ЬпераЦйи сложени  и вычитани , что усложн ет устройство. В схеме дл  преобразовани  мантисс , двоичный регистр снабжен цеп ми сдвига влево на один двоичный pa3pJ3Ui, kbiopbie нужны лишь дл  преобразовани  цель1х чисел из дв(эйчнрй системы Ьчислени  в дес тичную. Поскольку мантисса числа в форме с плавающей зап той  вл етс  правильной дробью, необхрдимость в указанных цеп х дл  преобразовани  таких шсел отпадаег. Целью насто щего изобретени   вл етс  по вышение быстродействи  и упрощение устройства . . Поставленна  цеНь достигаетс  тем, что в устройство введены триггер направлени  преобраз6 )ванИ  и дешифраторы нул : двоичного и дес тичного регистров мантиссы, входы кото рых соединены с разр дньтми выхрдами соответствующих регистров, мантиссы, а выходы . с соответствую1цими входами дешифраторов пр мого и обратного щзеобразовани , выход ;младшей дополнительной тетрады дес тичного регистра мантиссы соединён.с соответствующим входом, дешифратора обратного преобразовани  входы триггера направлени  преобразовани  соединены с управл ющим входом устройства, а выходы - со входами дешифраторов пр мр го обратного преобразовани , входа и выходы .триггера знака двоичного пор дка соеди нены соответственно с выходами и входами соответствующего триггера дес тичнбгд пор дка , выходы триггера знака двоичного Пор дка подключены ко входам дешифратора обратноto преобразовани , выходы дешифраторов нул  двоичного и дес тичного реверсивных счетчиков пор дка соединены срответственно со вхоДами дешифраторов обратного и пр мого преобразовани . На чертеже представлена блок-схема устройства дл  преобразовани  двоичного кода в дес тичный и обратно дл  чисел с плавающей зап той, содержаща : двоичный 1 и дес тичнь1й 2 регистры мантисс, дополнительную ctapшук ) 3 и допол1штельную младшую 4 тетрады дес тичного 2 регистра мантиссы, блок 5 коррекции , двричньШ 6 и дес тичный 7 реверсивные счетчики пор дка, триггеры 8, 9 знака г двоичного и соответственно дес тичного . Дешифраторы нул  10 и 11 соответственно двоичного и дес тичного регистров мантиссы , дешифраторы нул  12 и 13 соответственно двоимого и дес тичного реверсивных счетчиков пор дка, дешифраторы 14 и 15 соответственно пр мого и обратного преобразовани , генераторы 16 тактовых импульсов,.триггер 17 направлени  преобразовани , входы 18 и 19 регистров соответственно двоичной и дес тичной мантисс, вхрдь 20 и 21соответственно двоичногр и дес тичного пор дков, входы 22 и 23 триггеров знака соответственно, двоичного и дес тичного пор дков, выходы 24, 25, 26, 27 .: устройства, управл ющие входы 28 устройства, триггеры знаков двоичной 29 и дес тичной 30 мантисс. -::. -- .:, - - . Алгоритмы перевода чисел из двоиадой стёмы счислени  в дес тичную свод тс  к следую1цему . . ., Сначала производитс  преобразование даоичнрй мантиссы М, в дес тичную М, „ подачей ее цифр, начина  с младшей, в дес тичный регистр, где вьшоЛн етс  последовательное деление ее на два. При т-разр дной мантиссе двоичного числа преобразование заканчиваетс  через tr тактов, и в дес тичном регистре оказываетс  мантисса Мц,, а в двоичном - .нуль. После этого выполн етс  преобразование пор дков. Эта процедура зависит от знака двоичного пор дка. Если двоичный пор док поло штелен, мантисса М,в умножаетс  на два до тех пор, пока произведение М,о не станет больще единицы . Одновременно с каждым удвоением из двоичного йор дка вычитаетс  единица. После переполнени  мантисс умножение прекращаетс  и выполн етс  нормализаци  полученного произведени ; сдвиг вправо на один дес тичный разр д и добавление единицы к дес тичному пор дку. Процесс продолжаетс  до тех пор, пока двоичный пор док не станет равен нулю. В случае, если двоичный пор док отрицателен , мантисса М,, последовательно делитс  на два, пока старший дес тичный разр д частного не станет равен нулю. При каждом делении к двоичному пор дку добавл етс  едини-. ца. После нарушени  нормализации впразо деление прекращаетс  и полученное частное нормализуетс : сдвигаетс  влево на ойан ДёШйЧньш разр д, а к дес тичному пор дку добав л етс  -1, Процесс заканчиваетс , как только двоичный пор док станет равен нулю. Если двоична  мантисса равна нулю, пргобразование мантисс не вьтолн етс . Результат считаетс  равным нулю. Рассмотрим работу преобразовател  дл  Дву режимов: пр мого преобразовани  из двоичной системы счислени  в дес тичную и обратного - из дес тичной системы счислени  в двоичнуй. Вид преобразовани  задаетс  триггером 17, который сигналом от устройства управлени  ЦВМ устанавливаетс  в состо ние О - при пр мом и в состо ние I - при обратном преоб разовании.; Преобразовавде из двоичной системы счислени  в дес тичную. Работой устройства зпрговл ет дешифратор 14. В зтом случае триггер 17 устанавливаетс  в состо ние О и по шинам 18, 20, 22 на вход преобразовател  передаетс  исходйое двоичное число. Дес тичный же регистр и счедгчик устанавливаютс  в нулевое состо ние по входам 19, 21, 23. На выходах дешифраторов 10 и 12 по вл ютс  сигналы о том, что двоичный регистр и счетчик наход тс  в ненулевом состо иии. Знаки мантиссы и пор дка из триггеров 29 и 8 передаютс  на вхоДы триггеров 30 и 9 соответственно . Если двоичное число или его мантисса рав нЫ нулю, дешифратор 14 выдает сигнал Конец преобразовани . При этом дес тичное, число также равно нулю. Если же нулю равен тол ко пор док двоичного числа, то преобразование выполн етс  так же, как и в общем случае , который описьшаетс  ниже. В общем случае, когда мантисса М, и пор  док Р, не равны нулю, дешифратор 13 запускает генератор тактовых импульсов и начинает сдвиг мантиссы М, на один разр д вправо. Младшие разр ды мантиссы Mj проход т на вход блока 5 коррекции и через него - йа вход первого разр да регистра 2. При зтом происходит деление на два в дес тичном регистре . После m тактов Сдвига и делени по- полам в дес тичном регистре оказываетс  преобразованна  мантисса М,о, а в двоичном регистре - нуль. Дешифратор 14 прекращает преобразование мантисс. Дальнейшей работой преобразовател  кодов управл ет триггер 8 знака пор дка. Если он в нулевом состо нии (пор док положительный), то дешифратор 14 начинает выполн ть удвоени  дес тичной Mairmccbl, если в единичном - Дешифратор 14 вьшолн ет последовательное деление- на дв мантиссы М,,. Пусть ДВОИЧ1П.1Й пор док положителен. В этом случае дешифратор 14 через блок коррекции 5 вьшолн ет последовательное умножение дес тншой мантиссы на два с одновременным вычитанием единицы из двоичного б счетчика пор дка. Как только в результате умножеш  произойдет переполне1ше Мантисс в регистре 2, дешифратор 14 прекращает удвоение и вьшолн ет нормализацию дес тичной мантиссы: сдвиг вправо на один дес тичньй разр д и добавление едйнйЩ) к счетчику 10. Затем снова выполн етс  последовательное умножение на два до тех пор, пока в даоичном 6 не по витс  нуль и не будет получена нормализованна  мантисса М, о. . Де1Ш1фратор 14 вьщает сигнал Конец преобразовани  и отключает генератор 16. Предположим теперь , что исхо дое двоИчное число имеет отрицательный пор док. В этом случае после преобразовани  мантисс дешифратор 14 через блок 5 коррекции выполн ет последовательное деление дес тичной мантиссы на два с одновременным вычитавшем единицы из дбсолютной величины двоичного пор дка (эта величина хранитс  в счетчике б пор дка, а знак пор дка - в триггере 8). . - . Процесс продолжаетс - до нарушени  нормализации дес тичной мантиссв - по влени  нул  в старшей декаде регистра 2. При этом дешифратор 14 прекращает деление и выполн ет нормализацию: сдвиг Влево на один дес тичный разр д и добавлеш1е 1 к абсолютной величине пор дка (знак минус присвоен ему в самом начале преобразовани  посде установки триггера 9 в состо ние .. Затем дешифратор 14. начинает новый цикл дёле1ш  и так до тех пор, пока в Двоичном счетчике не по витс  нуль и не будет получена нормализованна  мантисса М,о, Дешифратор 14 выдает сипйл Конец преобразова да  и отключает генератор 16. Если пор док исхощгаго двоичного шсла , а мантисса М, э О, то с преобразованием MaHTifcc процесс перевода заканчиваетс  и дешифратор 14 сразу выдает сишал Конец преобразовани . ; 7 Мантисса М,о и пор док Р,„ полз {еш1ого дес тичного числа снимаютс  с выходных 1Ш1н Ж27г;:::;:- -.- Преобразование из дес тичной системы счислени  1В дйоштуго.у: Работой устройства управл ет деишфратор 1 Такое преобразование удобнее нагииать с перевода пор дков. Триггер 17 дл  этого устшшливаетс  в срсто ше I. По шинам 19, 21, 23 на вход преобразовател  подаётс  исх )Д11ое дес тичное число. Двоишйш регистр и счетадк по шинам 18, 20, 22 устанавливаетс  в нулевое состо ние.- - На выходах дегпифраторов И ji 13 по в .л ютсй Сигналы о том, что дес тичный регистр и счетчик наход тс  в ненулевом состо Шй.Зна ки маимссы и пор дка из триггеров 30 и 9 передаготс  на входы триггеров 29 8 соот вйственно. Если дес тичное число или его гиантисса равны нулю, дешифратор 15 выдает сигнал Конец преобразовани . В этом случае двоичное число будет также равно нулю При ну еВом йор дке и нензшевой мантиссе преобраШйа 5й:ё;начийаетсй с псревйда MaiftHcc:, В общем случае, когда мантисса М,„ О и пор док Р,о , дешифратор 15 запускает тейёратор тактовых импульсов. Предположим/4td йдрвдрк дес тичного, Ч11С ла положителен. При этом Деиш $ратор 15 через блок .5 J;Ыпqлп eт сдвиг дес течной мать тйссы ни сдан разр д влево с одновременным вычитание, м единицы из Де.сйтичного пор дка. Зате деип фратор 15 через блок 5 вьтолн ет последоватёлБное деление сдвинутой майтоссы .на два с одновременным добавлением еданицы к двоичному счетчику пор дка. Процесс делени  продолжаетс  до тех пор, пока не будет устранено HapyEiefflie нормализаида в дес тичном регистре. После этого дешифратор 15 выполн ет очередной сдвиг дес тичной мантиссы влево и так до тех пор, пока в дес тичном счетчике не окажетс  iyrn., а дес тиШа  мантисса не будет нормализована. Если исходный дес тичный пор док отрица телен, го дешифратор 15 через блок 5 вбШолн  ет сдвиг дёс т11Ч1юй ifirBKiCbf М Itfoffpisjpara вправо. При это.м младша  цифра ее пша:дает в дополнительную младшую тетраду 4. Одновременно со сдвигом дешифратор 15 осуществл ет -з леньшение дес титаого пор дка на еди нйцу. , : : .. .....,, Затем дешифратор 15 через блок 5 вьшолн бт последовате11ьное удвоение дес тичной ма тиссы с одновременным увеличением на единицу абсолютной вел11чины двоичного пор дка (знак минус присвоен ему is самом начале прербраз&вани  после устайЬйкй триггера 8 в состо ниеЧ). Как только нарушение нормализации в регистре 2 будет устранено и в допотштельной младшей тетраде 4 будет нуль, деишфратор 15 начинает новый цикл преобразовани  пор д-: ков: сдвиг вправо и удвоени  матгиссы. Процесс продолжаетс  до тех пор, пока дес тичньц пор док не станет равен нулю, а дес тична  мантасса не будет нормализована. На этом преобразова 1ше пор дков за1санчиваетс . Далее выполн етс  преобразование мантисс. При этом деишфратор 15 через блок 5 осуществл ет последовательное деление на два в регистре 2. Цифра младшего разр да дес тичной мантиссы после каждого такта делени  дает очередную младшую цифру двоичной мантиссы. Эта цифра передаетс  дешифратором 15 на вход старшего разр да регистра 17. После m тактов сдвига и делени  в регистре 1 окажетс  преобразованна , двоична  мантисса. Перевод окончен. Дешифратор 15 вьщает сигнал Конец преобразовани  и отключает генератор 16. Полученное двоичное число снимаетс  с шин 24, 26. Отсутствие цепей сдвига в двоичном регистре мантиссы упрощает устройство и повышает надежность еко работы за счет уменьшени  ко личества элементов и св зей ме сду йими. Вьтолнение при перейоде пор дков операций одного знака (только сложени  или вычитани ) над их абсолютными величниа (Сш также сокращает количество вхоДов у счетчиков пор дков: предлагаемое устройство срдерЖ1ит на восемь таких входов меньше , чем известное. В известном устройстве анализ на нуль мантиссы не производитс , что может привести к выполиению m бесполезных сдвигов в регистре 1 при преобразовании из двоичной системы счислени  в дес тичнзто, а также к m + 10 - 1 таких же сдвигов в регистре 2 при обратном преобразовашш, где К - количество разр дов в дес тичном счетчике пор дка. В предлагаемом устройстве, если мантисса исходного числа равна нулю, преобразование не выполн етс , и результат также равен нулю. Это позвол ет повысить быстродействие устройства при преобразовании чисел с кулевой мантиссой. Формула изобретени  .,... Устройство дл  преобразовани  двоичного кода 8 дес тичщ.1й и обратно дл  чисел с плавшощей зап той, содержащее двоичный и дес тич10 )1й регистры мантиссы, дополнительные старшую и младшую тетрады, дес тичного реriiCTpa мантиссы, блок коррекции, двоичный и дес тичный реверсивные счетчики пор дка. 971 дешифраторы нул  двоичного и дес тичного реверсивных,счетчиков пор дка, генератор тактовых импульсов, выход которого св зан со входами дешифраторов пр мого и обратного преобразовани , причем входы дешйфратора пр мого преобразовани  соединены с выходами дешифратора нул  двоичного реверсивног c4et4HKa пор дка, младшего разр да, двоичного регистра мантиссы, триггера знака двоичного пор дка, старшей и дополнительной старшей тетрад -дес тичного регистра мантиссы, входы дешифратора обратного преобразовани  соединены с выходами дешифратора нул  дес тичного реверсивного счетчика пор дка, дополнительной старшей тетрады дес тичного регистра мантиссы, блокакоррекции, авыходы деишфраторов пр мого и обратного преобразовани  соединены с соответствующими входами ;блока коррекции, входами генератора тактовых |импульсов, входами сложени  и вычитанна  двоичного и дес тичного реверсивных счетчиг ков пор дка, информационные входы которых  вл ютс  входами двоичного и дес тичного пор дков, а выходы соединены соответственно со входами дешифраторов нул  двоичного и дес тичного реверсивных счетчиков пор дка С выходами устройства, информационные входы устройства подключены ко входам регистров двоичной и дес тичной мантисс, вход и выходы знакового разр да регистра двоичной мантиссы соединены соответственно с выхода мм и входами соответствующего разр да региЩза дес тичной мантиссы, разр дш 1е выходы Двоичного и дес тичного регистров мантисс  вл ютс  выходами устройства, входы и выходы блока коррекции соединены соответственно с разр дными выходами и входами дес тичного регистра мантиссы и его дополнительных старшей и младшей тетрад, вход старшего разр да двоичного регистра мантиссы соединен с соответствующим выходом дешифратора обратного преобразовани , входы триггеров знака двоичного и дес тичного пор дков подключены к соответствующим входам устройства, о т л и ч аю щ е е с   тем, что, с целью повышени  быстродействи  и упрощени  устройства, в него введены триггер направлеш  преобразовани  и дешифраторы нул  двоичного и дес тичного регистров мантиссы, входы которых соединены с разр дными выходами соответствующих регистров мантисс, а выходы - с .соответствующими входами дешифраторов пр мого и обратного преобразовани , выход младшей допол1штельной тетрады дес тичного регистра мантиссы соединен с соответствзтощим входом дещифратора обратного преобразовани , входы триггера направлени  преобразовани  соединены с управл ющим- входом устройства, а выходы - со .входами дешифраторов пр мого и обратного преобразовани , входь и выходы триггера зшка двоичного пор даса соединены соответственно -с выходами и входами соответствующего триггера дес тичного пор дка, выходы триггера знака двоичного пор дка подключены ко входам дешифратора обратного преобразовани , выходы дешифраторов нул  двоичного и дес тичного реверсивных счетчиков пор даса соединены соответственно со входами дешифраторов обратного и пр мого преобразовани ., Источники информации, прин тые во внимание при экспертизе 1.Авторское свидетельство СССР N 244710., кл. G 06 F 5/02, 1968.  V.37 of the device, the information inputs of the device are connected to the inputs of the registers of the binary and decimal mantis, the input and outputs of the sign bit of the register of the binary mantissa are connected respectively to the outputs and inputs of the corresponding bit of the register of the tenth mantis, the output outputs of the binary and decimal registers of the mantissa These are the device outputs, the inputs and outputs of the coring block, and the response are connected respectively to the bit outputs and the inputs of the decimal register. the mantissa and its extras are the high and low tetrads, the high-level input of the binary register of the mantissa is connected to the corresponding output of the inverse / conversion decoder, the inputs of the binary triggers. In principle, the conversion algorithm in the known device does not contain the case of converting numbers with a zero mantissa, which leads to unproductive equipment operation during its conversion and a decrease in the device performance. When converting a decimal order to binary, depending on the sign of its sign in both counters (binary and decimal), it must be 11. the best way to add and subtract, which complicates the device. In the scheme for converting mantis, the binary register is equipped with left-shift chains by one binary pa3pJ3Ui, kbiopbie are needed only to convert target numbers from two (the basic system of numeration to decimal. Since the mantissa in floating-point form is a correct fraction, it is necessary in these circuits for converting such gears, the purpose of the present invention is to improve the speed and simplify the device. The value achieved is that the device introduces a trigger for the conversion of 6) vanI and d decryptors zero: binary and decimal registers of the mantissa, whose inputs are connected to the bits of the corresponding registers, mantissa, and the outputs. the lower secondary tetrad of the decimal mantissa register is connected to the corresponding input, the inverse decoder of the direction conversion flip-flop is connected to the control input of the device, and the outputs are connected to the decoder inputs of the reverse transducer; , the inputs and outputs of the trigger sign of the binary order are connected respectively to the outputs and inputs of the corresponding trigger, ten times the order, the outputs of the trigger are In binary mode, the inputs are connected to the inputs of the reverse decoder to the conversion, the outputs of the zero decoders of the binary and decimal reversible order counters are connected respectively to the inputs of the reverse and direct conversion decoders. The drawing shows a block diagram of a device for converting a binary code to a decimal and back for floating-point numbers, containing: binary 1 and decimal 2 registers of mantissas, additional script) 3 and in addition 1 boxed lower 4 tetrads of decimal 2 registers of mantissa, block 5 corrections, twelve 6 and decimal 7 reversible counters are on the order, triggers 8, 9 are binary digits and respectively decimal. Decoders zero 10 and 11, respectively, of binary and decimal mantissa registers, decoders zero, 12 and 13, respectively, of dual and decimal reversible order counters, decoders 14 and 15, respectively, of direct and inverse transformation, clock generators 16, conversion direction trigger 17, inputs 18 and 19 of the registers of the binary and decimal mantis, in pairs 20 and 21, respectively, of the binary and decimal orders, inputs 22 and 23 of the sign triggers, respectively, of the binary and decimal order, outputs 24, 25, 26, 27. devices that control device inputs 28, trigger triggers of binary 29 and decimal 30 mantissas. - ::. -.:, - -. Algorithms for converting numbers from double numbers to the decimal number are reduced to the following. . .. First, the daoic mantissa M is transformed into the decimal M, by giving its digits, starting with the youngest, into the ten register, where it is divided by two. With a t-bit binary number, the conversion ends in tr cycles, and the decimal register is the Mantissa Mtz, and the binary one is zero. Thereafter, order conversion is performed. This procedure depends on the sign of the binary order. If the binary order is a polacene, the mantissa, M, is multiplied by two until the product, M, o, is greater than one. Simultaneously with each doubling, one is subtracted from binary data. After the mantis is overfilled, the multiplication is stopped and the resulting product is normalized; move right one decimal place and add one to ten order. The process continues until the binary order is zero. In case the binary order is negative, the mantissa, M, is successively divided by two, until the highest decimal quotient becomes zero. For each division, a one is added to the binary order. ca. After the normalization is violated, the division stops and the resulting quotient is normalized: shifted to the left by oyan bit of the bit, and -1 is added to the decimal order, the process ends as soon as the binary order becomes zero. If the binary mantissa is zero, the mantissa generation is not satisfied. The result is considered to be zero. Consider the operation of a converter for two modes: direct conversion from binary to decimal and inverse - from decimal to binary. The type of transformation is set by the trigger 17, which is set to the state O by forward control and by the signal from the control of the digital computer; to the reverse transformation; Converting from binary to decimal. By operating the device, the decoder 14 is transmitted. In this case, the trigger 17 is set to the state O and the output binary number is transmitted via buses 18, 20, 22 to the input of the converter. The decimal register and the schedger are set to the zero state on inputs 19, 21, 23. At the outputs of the decoder 10 and 12, signals appear that the binary register and counter are in a nonzero state. The signs of the mantissa and the order of the triggers 29 and 8 are transmitted to the inputs of the triggers 30 and 9, respectively. If the binary number or its mantissa is zero, the decoder 14 outputs the End Conversion signal. In this case, the decimal number is also zero. If the order of a binary number is zero, then the conversion is performed in the same way as in the general case, which is described below. In the general case, when the mantissa M, and order P, are not equal to zero, the decoder 13 starts the clock pulse generator and starts shifting the mantissa M, one bit to the right. The minor bits of the mantissa Mj are passed to the input of the correction block 5 and through it the input of the first bit of register 2. In this case, the division into two in the decimal register occurs. After m cycles of Shift and dividing by sex in a decimal register, the transformed mantissa is M, o, and in the binary register is zero. The decoder 14 stops the conversion mantis. The further operation of the code converter is controlled by a trigger of 8 digits of the order. If it is in the zero state (the order is positive), then the decoder 14 starts performing doubling of the decimal Mairmccbl, if in the unit one - the decoder 14 performs a consecutive division into two mantissas M ,,. Suppose that DVOICHP is order positive. In this case, the decoder 14 through the correction block 5 performs the sequential multiplication of the tenth mantissa by two while simultaneously subtracting the unit from the binary b order counter. As a result of the multiplication, the Mantiss repetition in register 2 occurs, the decoder 14 stops doubling and normalizes the decimal mantissa: shifting to the right by one decimal bit and adding unit 10. Then the second multiplication is performed two times to those until a daoichn 6 is not Vits zero and a normalized mantissa M, o is not obtained. . Depression 14 transmits the signal to the end of the conversion and turns off the generator 16. Now suppose that the origin of the binary number has a negative order. In this case, after converting the mantiss, the decoder 14 through the correction block 5 performs the sequential division of the decimal mantissa into two while simultaneously subtracting the units from the absolute value of the binary order (this value is stored in the order counter, and the order sign is in the trigger 8) . . -. The process continues — until the decimal mantissa normalizes out of order — the occurrence of zero in the high decade of register 2. In this case, the decoder 14 stops dividing and performs normalization: shift Left by one decimal place and add 1 to the absolute value of the order (minus sign is assigned He is at the very beginning of the transformation after the installation of the trigger 9 into the state .. Then the decoder 14. starts a new cycle and so on until the Binary Counter has not reached zero and the normalized Mantissa M is received, oh, the Decoder 14 issues a sipyl TO It transforms the generator and turns off the generator 16. If the order of the binary binary code and the mantissa is M, eO, then with the MaHTifcc transformation, the translation process ends and the decoder 14 immediately generates a decal. Conversion end; 7 M, the M, the order of P, „ the crawl {of the decimal number is removed from the output 1111 Ж2727; :::;: - --.- Conversion from the decimal number system 1B to the unit: The device is controlled by the disintegrator 1 Such a conversion is easier to find from the order translation. The trigger 17 for this is determined in ss I. I use the tires 19, 21, 23 to get the input to the converter input, the ref is the next decimal number. The dual register and counting over the buses 18, 20, 22 is set to the zero state. - - At the outputs of the dispatchers And ji 13 along the signal there are Signals that the decimal register and the counter are in a nonzero state Shy. and on the order of the triggers 30 and 9, the input to the trigger inputs 29 8, respectively. If the decimal number or its hyanthissa is zero, the decoder 15 issues the End Conversion signal. In this case, the binary number will also be equal to zero. Under goodwill and nenzshcheva mantissa, it is transformed to 5th: на; it comes from the MaiftHcc :, In the general case, when the mantissa is M, O and order P, o, the decoder 15 starts the clock teerator pulses. Suppose / 4td ydrvdrk decimal, CH11S la positive. At the same time, Descriptor 15 through the block .5 J; Ipqlp this shift of the descending mother of the Tissy is not given the bit to the left with simultaneous subtraction, m unit from the D. Order. At the same time, type 15 through block 5 executes the sequential division of the shifted maxitoss on two while simultaneously adding a unit to the binary order counter. The division process continues until the normalized HapyEiefflie in decimal register is eliminated. After that, the decoder 15 performs the next shift of the decimal mantissa to the left and so on until the decimal counter is iyrn. And the ten saint mantissa is normalized. If the initial decimal order is negative, go to the decoder 15 through the block 5, fill in the shift of the decimal IfirBKiCbf М Itfoffpisjpara to the right. At this m. The youngest digit of its psh: gives the additional junior tetrad 4. Simultaneously with the shift, the decoder 15 doesn’t reduce the tenth order per unit. ,:: .. ..... ,, Then the decoder 15 through the block 5 in the fields bt the sequential doubling of the tenth mathissies with a simultaneous increase by one unit of absolute magnitude of the binary order (the minus sign is assigned to it is the very beginning of the & vani after the usyjy trigger 8 in the state of CH). As soon as the violation of the normalization in register 2 is eliminated and in the complementary junior tetrade 4 is zero, the disinfractor 15 starts a new pore-to-cage conversion cycle: right shift and doubling of the Matisse. The process continues until the decimal order becomes zero and the decimal mantass is normalized. On this, the transformations of the 1 orders are terminated. Next, the mantissa transformation is performed. At the same time, the despatcher 15, through block 5, performs a consecutive division by two in register 2. The low-order digit of the decimal mantissa, after each division cycle, gives the next low-order digit of the binary mantissa. This digit is transmitted by the decoder 15 to the input of the high-order bit of register 17. After the m shift and division cycles in register 1, the converted binary mantissa appears. Translation is complete. The decoder 15 transforms the signal to the end of the conversion and turns off the generator 16. The resulting binary number is removed from the buses 24, 26. The absence of shift circuits in the binary register of the mantissa simplifies the device and increases the reliability of the operation by reducing the number of elements and connections. Completion of the order of operations of one character (only addition or subtraction) over their absolute magnitudes (Cm also reduces the number of inputs for order counters: the proposed device reduces the number of such inputs eight times less than the known. In the known device, the analysis of the zero mantissa is not performed , which can lead to the release of m useless shifts in register 1 when converting from a binary number system to decimal, as well as to m + 10 - 1 similar shifts in register 2 at the inverse transformation, where K is the number In the proposed device, if the source number's mantissa is zero, the conversion is not performed, and the result is also zero. This allows you to increase the speed of the device when converting numbers with a cool mantissa. A device for converting a binary code of 8 decimal and 1st for floating-point numbers, containing binary and decimal 10) 1st registers of the mantissa, additional upper and lower tetrads, decimal version of the riot, block of correction, binary and decimal reversible counters are on the order of. 971 binary and decimal reversible zero decoders, order counters, clock generator, the output of which is connected to the inputs of the direct and inverse decoder decoders, the inputs of the direct conversion descrambler connected to the outputs of the decoder zero of the binary reversive c4et4HKa order, the younger one decrypts the junior converters of the binary reversible c4et4HKa zero, and the outputs of the younger converters of the zero decoder of the binary reversive c4et4HKa order, and the junior output converter of the younger converters zero binary reversive c4et4HKa, the card is connected to the outputs of the descrambler zero of the binary reversive c4et4HKa, the card is connected, the junior converter is connected to the outputs of the decoder zero of the binary reversive c4et4HKa, the card is replaced by a lower precedent, and then the outputs of the decoder zero binary reversive c4et4HKa, the card is replaced by a lower precedent c4et4HKa; the binary register of the mantissa, the trigger of the sign of the binary order, the highest and the additional higher tetrads of the -Manual register of the mantissa, the inputs of the inverse decoder are connected to the outputs of the descript the zero zero decimal reversal counter, the additional high tetrad of the decimal mantissa register, the correction block, the output converters of the forward and inverse converters, are connected to the corresponding inputs; the correction block, the inputs of the clock | pulse generator, the add inputs, and the read binary and ten reversible counters order, the information inputs of which are the inputs of binary and decimal orders, and the outputs are connected respectively to the inputs of the decoders zero binary and decimal Reversible counters of the order With the device outputs, the device information inputs are connected to the inputs of the binary and decimal mantissa registers, the input and outputs of the sign bit of the binary mantissa register are connected respectively to the mm output and the inputs of the corresponding decimal mantissa register, the 1st output outputs The binary and decimal mantissa registers are the outputs of the device, the inputs and outputs of the correction unit are connected respectively to the bit outputs and the inputs of the decimal mantissa register and its additional The higher and lower tetrads, the higher bit input of the binary register of the mantissa are connected to the corresponding output of the reverse conversion decoder, the inputs of the binary and decimal orders trigger are connected to the corresponding inputs of the device, so that In order to increase speed and simplify the device, a trigger has been introduced that directs the transformation and zero-binary decoder registers of the mantissa, whose inputs are connected to the bit outputs of the corresponding registers m ntiss, and outputs - with the respective inputs of the direct and reverse conversion decoders, the output of the youngest additional tetrad of the tenth mantissa register is connected to the corresponding input of the inverter of the inverse transformation, the inputs of the conversion direction trigger are connected to the control input of the device, and the outputs are co. direct and reverse transformation decoders, input and outputs of the binary das trigger trigger are respectively connected to the outputs and inputs of the corresponding trigger of the decimal order, The binary order trigger outputs are connected to the inputs of the reverse conversion decoder, the outputs of the decoders zero binary and decimal reversing time counters are connected respectively to the inputs of the reverse and direct conversion decoders., Sources of information taken into account during the examination 1. USSR author's certificate N 244710., cl. G 06 F 5/02, 1968. 2.М. А. Карцев. Арифметика цифровых машш. М., Наука, 1969, с. 543, 549-551 (прототип).2.M. A. Kartsev. Digital arithmetic mash. M., Science, 1969, p. 543, 549-551 (prototype).
SU772466513A 1977-03-25 1977-03-25 Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers SU717755A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU772466513A SU717755A1 (en) 1977-03-25 1977-03-25 Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU772466513A SU717755A1 (en) 1977-03-25 1977-03-25 Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers

Publications (1)

Publication Number Publication Date
SU717755A1 true SU717755A1 (en) 1980-02-25

Family

ID=20701080

Family Applications (1)

Application Number Title Priority Date Filing Date
SU772466513A SU717755A1 (en) 1977-03-25 1977-03-25 Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers

Country Status (1)

Country Link
SU (1) SU717755A1 (en)

Similar Documents

Publication Publication Date Title
US3210737A (en) Electronic data processing
US3194951A (en) Logarithmic converter
SU717755A1 (en) Arrangement for converting binary-to-decimal code and vice versa for floating-point numbers
US3373269A (en) Binary to decimal conversion method and apparatus
SU1280624A1 (en) Device for multiplying the floating point numbers
GB1145661A (en) Electronic calculators
SU864278A1 (en) Binary-to-binary-coded decimal code converter
US3746849A (en) Cordic digital calculating apparatus
SU1034175A1 (en) Code/frequency converter
RU2148270C1 (en) Device for multiplication
SU409222A1 (en) DEVICE FOR MULTIPLICATION
SU815726A1 (en) Digital integrator
SU1092490A1 (en) Data format transformer
RU2040115C1 (en) Converter of four-bit binary code to binary-decimal code
US3627998A (en) Arrangement for converting a binary number into a decimal number in a computer
SU651341A1 (en) Multiplying arrangement
SU1376082A1 (en) Multiplication and division device
RU2633142C1 (en) Device for calculating function of √x2+y2
SU809152A1 (en) Device for bcd-to-binary conversion
SU881825A1 (en) Digital indication device
SU826335A1 (en) Binary-coded decimal fraction-to-binary fraction converter
SU734669A1 (en) Converter of proper binary fraction into binary-decimal fraction and integer binary-decimal numbers into binary numbers
SU813763A1 (en) Pulse selector
SU748409A1 (en) Device for multiplying binary-decimal numbers
SU620975A1 (en) Reversible binary-to-binary-decimal code converter