US3711693A - Modular bcd and binary arithmetic and logical system - Google Patents

Modular bcd and binary arithmetic and logical system Download PDF

Info

Publication number
US3711693A
US3711693A US00158461A US3711693DA US3711693A US 3711693 A US3711693 A US 3711693A US 00158461 A US00158461 A US 00158461A US 3711693D A US3711693D A US 3711693DA US 3711693 A US3711693 A US 3711693A
Authority
US
United States
Prior art keywords
carry
gates
input
logical
operand
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Lifetime
Application number
US00158461A
Inventor
J Dahl
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bull HN Information Systems Italia SpA
Bull HN Information Systems Inc
Original Assignee
Honeywell Information Systems Italia SpA
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 Honeywell Information Systems Italia SpA filed Critical Honeywell Information Systems Italia SpA
Application granted granted Critical
Publication of US3711693A publication Critical patent/US3711693A/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/491Computations with decimal numbers radix 12 or 20.
    • G06F7/492Computations with decimal numbers radix 12 or 20. using a binary weighted representation within each denomination
    • G06F7/493Computations with decimal numbers radix 12 or 20. using a binary weighted representation within each denomination the representation being the natural binary coded representation, i.e. 8421-code
    • G06F7/494Adding; Subtracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/506Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages
    • G06F7/508Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages using carry look-ahead circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/57Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
    • G06F7/575Basic arithmetic logic units, i.e. devices selectable to perform either addition, subtraction or one of several logical operations, using, at least partially, the same circuitry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/38Indexing scheme relating to groups G06F7/38 - G06F7/575
    • G06F2207/3804Details
    • G06F2207/3808Details concerning the type of numbers or the way they are handled
    • G06F2207/3832Less usual number representations
    • G06F2207/3836One's complement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/492Indexing scheme relating to groups G06F7/492 - G06F7/496
    • G06F2207/4921Single digit adding or subtracting

Definitions

  • ABSTRACT An arithmetic and logical unit for receiving four bit portions (quartets) of two input operands, a carry-in and several function control signals generates selectively several functions of the operands, including decimal and binary addition and subtraction functions or a desired logical function and provides carry lookahead and carry signals.
  • a set of conversion gates selectively provides either a true or an excess-6 form of the first operand quartet while a complementation set of gates selectively provides a true or ls complement form of the second operand quartet.
  • Bit pairs, from the corresponding positions in the resulting quartets, are combined to produce elementary logical functions, including the AND, inclusive OR and exclusive OR functions.
  • decimal numbers are represented in binary registers, etc., by the natural 8-4-2-1 code, which corresponds to the standard binary polynomial representation, 2 2 2 2 except that values for l-l5 are disallowed.
  • the digit code is extended with leading zone bits, I 1 ll" in EBCDIC, 0l0l” in ASCII, as examples, but the basic polynomial representation is retained.
  • other coding can be used. For example, if digits are represented by an excess-3 code, where each digit has an encoded binary value three greater than its true value, a binary adder can be used to directly add two decimal operands. However, the result is not in excess-3 form so that further code conversions are required for further arithmetic processing. Furthermore, this approach requires accommodation of a second code representation which differs from the native binary representation of the system.
  • V a computer addition operation is specified for operands having different signs, normally a subtract function must be performed on the magnitude of the operands,
  • a function generator building block module which receives as inputs a pair of bit quartets from a pair of operands, a carry-in signal, and a set of function selection signals.
  • the output of the building block for arithmetic functions is a quartet of sum bits that is either the sum or the difference of the input quartets, which are treated selectively as binary numbers or binary-coded decimal digits, a carry-out signal, and carry look-ahead signals, which enable speed-up addition for several parallel function generator building blocks.
  • the output of the building block for logical functions is selectively the inclusive OR, exclusive OR and AND functions on bit pairs, where each bit from an input quartet is compared with the corresponding bit in the other bit quartet. In addition to these logical functions, the complements of these functions are also selectable.
  • the common core of the module consists of a set of elementary logical function gates which generate for each bit pair a complete set of logic terms, i.e., from which any desired function of the input quartets and a function select signal can be generated with a two-level sum of products or equivalent logic, and a set of adder gates which generates either the binary sum of bit quar tets, including a carry-in, or a selected set of logical functions of bit pairs.
  • sets of gates are provided to complement selectively one input quartet, supporting subtraction and the complemented logical functions, and to convert selectively the other input quartet to an excess-6 code for decimal addition.
  • a set of carry look-ahead gates which are connected to the first level of the elementary function gate set, provide carry-out signals and generate and propagate signals for carry look-ahead logic and provides a correction control signal for decimal arithmetic functions. Accordingly, the module carry function outputs are generated in parallel with the bit function outputs and are independent of a carry-in input from an adjoining less significant module.
  • a two-level set of logic gates is connected to the output of the adder gate set to correct the function generator output quartet for decimal arithmetic, under the control of the carry look-ahead gate set.
  • the resulting building block module provides enhanced function generation capability for a data processing system while reducing the control logic required for the system. In implementing a system, it is generally only necessary to provide a set of function selection signals.
  • the building block includes built-in logic for controlling the adder so as to provide the desired arithmetic or logical function without further logical control from the system, thereby minimizing the logic and timing requirements for the system.
  • auxiliary system functions are required, such as supplying a carry-in to the least significant bit for subtraction operations.
  • auxiliary system functions For decimal arithmetic operations, it is necessary for the system to test the operand signs so that the addition of operands with unlike signs is transformed into a subtraction operation and vice versa for subtraction.
  • the function generators When the function generators generate the difference between operands and the subtrahend is greater in magnitude than the minuend, the result is in a negative ls complement form.
  • the function generators provide the system with a carry-out signal from the most significant bit position enabling the system to change the result or to store an indication of the condition.
  • FIG. 1, FIG. 2a and FIG. 2b together form a logic diagram of an arithmetic and logic unit building block module which embodies the present invention.
  • FIG. 3 is a diagram of a NOR gate, the primary logical element of FIGS. 1, 2a and 2b, which illustrates the logical relationships between the inputs and outputs for the NOR gates.
  • the function generator module illustrated in FIGS. 1, 2A and 28 receives a first input operand bit quartet, C C,, C C,,, where the respective bits represent binary numbers, binary coded decimal, or a set of logical bits, in bit complemented form.
  • a second input operand bit quartet, I3 E,, E E corresponding to the second operand, a set of function control signals, K,,, K,, K K,,, and a carry-in signal, c, are also received by the module.
  • These four sets of signals are regenerated by NOR gates -13, 20-23, 5-8, and 9 respectively, and complemented in the process.
  • a first output is th e i nverted logical OR, i.e., NOR, of the input signals AVB, and a second output signal, i.e., OR, AvB is also available, as shown, which is the complement of the first output signal.
  • the OR output 0,, of gate 30 is derived from gates 10, 33 and 34, ieldin a 32 C v C, v K i, v if, v K K C v (C, v C,) K K K
  • the OR. output a, of gate 31 is derived from gates 35-37, yieldin K K+ V C, K K+
  • the OR output of a, of gate 32 is derived from gates 38 Accordingly, the NOR output 5 of gate 24 is K Bb,,.
  • Gates 25-27 operate in the same manner as gate 24, being connected to pairs of gates 43-44, 45-46 and 47-48, respectively. These yield OR outputs b, 69 8,.
  • Gates 51-56 and 60-62 generate elementary logical functions for the more significant bit pairs in the same manner as for the least significant bit pair.
  • the elementary functions all take the following forms:
  • FIG. 1 In order to provide function selection, and to introduce the carry-in into the adder function generation, additional logic is provided in FIG. 1.
  • the OR output of gate 19 generates i K v K which indicates that a logical function is called for, hence its complement specifies an arithmetic function. A single gate is shown for generating this signal, but even though NOR gates generally have very high fan-out capability, it is normally desirable to distribute the K load by replicating gate 19.
  • the inputs to gate 19 are the NOR outputs of gates 7 and 8.
  • the OR outputs of gates 7 & 8 provide control signals A and O which call for the AND function or the exclusive OR functions, respectively.
  • the NOR and OR outputs of gate 9 provide the carryin signals in true and complemented forms, 0 and '5, respectively.
  • thebinary adder 65 in response to outputs from logical gates 4 and the control signals from FIG. 1, serves to generate the logical functions in addition to the arithmetic functions.
  • the desired outputs signals F are provided by gates 106, 102, 99 and 97, respectively, which are not NOR gates, but are collector gates.
  • the output F of gate 97 is the followin a 3)) v) V a a A V 363 3) v This is conveniently implemented by connecting the OR outputs of gates 73-76 together as a single input to NOR gate 97.
  • gates 73-76 which provide the inputs to gate 97, and gate 97, result in a two-level logic arrangement analogous to the conventional function generator using an OR gate to collect a logical sum of products.
  • the outputs f are the sum of products of complemented variables.
  • gate 99 from its input gates 77-82, generates the output f as follows:
  • gate 106 from its input gates 90-96 generates the output f as follows:
  • gates 68-72 form intermediate partial logic function in accordance with the above equations.
  • the FIG. 2 carry look-ahead and correction gate set 67 provides a carry-out signal 3,, from the NOR output of gate 116, in complemented form.
  • the carry-out is generated from the input gates 109-115 as follows:
  • a pair of output signals, F and G are provided to support carry look-ahead gate-sets for several units of the type disclosed.
  • the output G from gate 119 indicates that there is a carry to the next more significant-bit quartet, even if there is no carry-in from the next less significant bit quartet. This output is accordingly:
  • the output Ffrom gate 117 indicates that a carry from the next less significant bit quartet should be propagated, because the sum of a and b,, is at least 15. Accordingly, the output of gate 117 is:
  • FIG. 2 decimal correction gate set 66 adds 10, modulo 16, to the adder when K, 1.
  • Gate 121, from gates 98-100 enerates:
  • the outputs 1 of the @nction generator are the four logical AND products, C B for K beigg one, the outputs are the logical exclusive OR, 6,69 17,; and for K and K, both being one, the combined outputs are the inclusive OR, 6, v E, wherej 0-3 (assuming K being zero and K being one).
  • the second operand bits F are complemented, resulting in a doubling of the logical functions of bit pairs.
  • the equivalence function, C, B is generated.
  • the function generator is effectively universal. Although sixteen functions of bit pairs are possible, the majority are trivial or redundant.
  • Two of the functions are the constants zero and one, and these functions are of no practical value. Four of the functions are merely regenerations of one bit or its complement. Two functions not implemented are NAND and NOR, but these functions are essentially redundant because they are merely the complements of the AND and OR functions.
  • the first operand gates 2 convert the 84-24 code to excess-6 code by adding six to the operand.
  • the second operand gates complement that operands bits, thereby producing an excess- 6 conversion of the 9s complement of the operand.
  • the logical gates 4 generate at the first level the AND, NAND, OR and NOR functions for pairs of bits from corresponding bit positions of the input operands. Either the NAND or NOR outputs alone are sufficient for the generation of any desired function, hence the first level constitutes a complete set of elementary logical functions.
  • the provision of a second level of gates 60-63 which provide the exclusive OR function and its complement, significantly simplifies the binary adder.
  • the sign of the result is handled automatically. If the result is positive, the carry-out from the most significant module is a one, so that the assumed sign of the result is correct. If the result is negative, the ls complement is generated and the carryout is a zero In response to the zero carry-out, the result can be complemented and the sign changed or the carry-out saved as an indicator. For a series of computations the result can be treated as a 10's complement number, with the indicator serving as a sign bit, analogous to processing 2s complement binary numbers.
  • the resulting module performs binary arithmetic with no significant degradation of speed.
  • the provision of carry look-ahead logic supports very high speed execution of arithmetic operations.
  • decimal arithmetic implemented but it is implemented in a manner whereby the very high speed characteristic of carry look-ahead logic is supported for decimal operations.
  • series of arithmetic operations can be performed with a speed comparable to the execution of 2s complement arithmetic.
  • the invention can be implemented with NAND gates, or any other set of logical gates which provide a complete set of binary functions.
  • the module can be adapted to accept and generate signals in true form as opposed to the bit complemented form.
  • One approach is to invert the system logic so that the carry-in signal is complemented and the logical function selection is changed, e.g., for K, l, the NAND function is generated. Accordingly, the preferred embodiment supports systems processing data in either true or bit complemented form.
  • a function generator module comprising:
  • B a set of elementary logical gates, responsive to the outputs of said set of conversion gates and a second input quartet of bits, for generating sets of functions, for respective bit pairs, each set of functions providing a complete logic set;
  • C. logical gate means responsive to the outputs of said set of elementary logical gates and a carry-in signal, for selectively generating the binary sum bits of the input operands and the carry-in or a selected logical function;
  • F. logic control means responsive to input function selection signals, for selecting the desired logical gate means output, and for enabling said set of decimal correction gates for decimal arithmetic.
  • the function generator of claim 1 further comprising:
  • G logic in said set of carry look-ahead gates for generating carry propagate and generate signals for the function generator.
  • H a set of complement gates, responsive to said second input quartet of bits and said logic control means for selectively complementing said second input.
  • a function generator for performing signed binary and decimal arithmetic operations, together with basic logical operations on a pair of bit quartet operands comprising:
  • A. conversion operand gating means responsive to a first input bit quartet operand, for selectively generating four bit signals representing either the excess-6 coded representation or the true representation of a first input operand;
  • first input control means responsive to input control signals representing binary/decimal and add/subtract functions and connected to said first operand gating means for selecting the excess-6 coded representation if and only if a decimal add operation is specified by the input control signals;
  • C. complement operand gating means responsive to a second input bit quartet operand, for selectively generating four bit signals representing either the second operand or its ls complement in ac-' cordance with input control signals specifying an add or subtract operation;
  • D. logical gating means responsive to the outputs of said conversion and complement operand gating means for generating four sets of signals, each set being derived from a pair of input signals, one each from said respective operand gating means, said set including the inclusive OR and AND functions of each of said pair of input signals;
  • F. adder means responsive to the outputs of said logical gating means and a carry-in to the function generator for selectively generating the binary sum of or a logical function of the outputs of said first and second operand gating means, in accordance with the input control signals;
  • decimal correction means connected to said adder means for correcting the adder output in response to said carry-out signal representing no carry.
  • the function generator of claim 4 further comprisl. logic in said carry gating means, responsive to the ing: outputs of said first level logic, for generating carry H. first level logic in said logical gating means for P'opagate and generate signals for the function generating the AND and OR functions of respec- 5 generatortive bit pairs of said input operands;

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Executing Machine-Instructions (AREA)
  • Image Processing (AREA)

Abstract

An arithmetic and logical unit for receiving four bit portions (quartets) of two input operands, a carry-in and several function control signals generates selectively several functions of the operands, including decimal and binary addition and subtraction functions or a desired logical function and provides carry lookahead and carry signals. A set of conversion gates selectively provides either a true or an excess-6 form of the first operand quartet while a complementation set of gates selectively provides a true or 1''s complement form of the second operand quartet. Bit pairs, from the corresponding positions in the resulting quartets, are combined to produce elementary logical functions, including the AND, inclusive OR and exclusive OR functions. In parallel, these elementary functions, an input carry bit, a set of carry look-ahead gates, a set of adder gates and a pair of control signals respectively provide carry signals and the selected function of the operands. A set of decimal correction gates, responsive to the carry signals, are used to correct the adder gate output for decimal addition and subtraction, when necessary.

Description

United States Patent Dahl MODULAR BCD AND BINARY ARITIIMETIC AND LOGICAL SYSTEM Primary Examiner-Malcolm A. Morrison Assistant Examiner-David H. Malzahn At!0rney Fred Jacob ct al.
i I I I [57] ABSTRACT An arithmetic and logical unit for receiving four bit portions (quartets) of two input operands, a carry-in and several function control signals generates selectively several functions of the operands, including decimal and binary addition and subtraction functions or a desired logical function and provides carry lookahead and carry signals. A set of conversion gates selectively provides either a true or an excess-6 form of the first operand quartet while a complementation set of gates selectively provides a true or ls complement form of the second operand quartet. Bit pairs, from the corresponding positions in the resulting quartets, are combined to produce elementary logical functions, including the AND, inclusive OR and exclusive OR functions. In parallel, these elementary functions, an input carry bit, a set of carry look-ahead gates, a set of adder gates and a pair of control signals respectively provide carry signals and the selected function of the operands. A set of decimal correction gates, responsive to the carry signals, are used to correct the adder gate output for decimal addition and subtraction, when necessary.
I '52 II secfim OPERAND GATES PATENTEU JAN 16 I975 SHEET 2 OF 3 Ens-Ea TDE CIMAL CORRECTION GATES 66 TO FIG 2b B|NARY ADDER 65 MODULAR BCD AND BINARY ARITHMETIC AND LOGICAL SYSTEM BACKGROUND OF THE INVENTION Electronic computers have generally been binary oriented for many reasons. These reasons include the fact that substantially all of the best basic high-speed storage elements are two-state devices, hence inherently binary. Also, for processing numerical data, particularly of a scientific nature, a binary representation tends to provide greater speed, accuracy and economy. However, it is desirable to have the capability of processing decimal numerical data directly for many applications. An example of where this capability is important is where there is a very large quantity of input and output data in decimal representations and only one or two simple arithmetic operations are required for each piece of data. With a binary computer, more processing time may be required for code conversion than useful data processing. More important is that higher level programming languages such as COBOL are widely used and the standards specifying their characteristics make it practically a necessity of maintain the processed data in a decimal representation. This means that a pure binary computer must emulate a decimal processor, which requires substantial sacrifices in efficiency.
Accordingly, it is advantageous to have both binary and decimal processing capability available directly. One approach is to have both decimal and binary arithmetic units. In addition to the costs of effectively duplicating units, there are extensive costs involved in implementing the associated cables, switches and control circuits.
In general, decimal numbers are represented in binary registers, etc., by the natural 8-4-2-1 code, which corresponds to the standard binary polynomial representation, 2 2 2 2 except that values for l-l5 are disallowed. Where alphanumeric data is involved, the digit code is extended with leading zone bits, I 1 ll" in EBCDIC, 0l0l" in ASCII, as examples, but the basic polynomial representation is retained. However, other coding can be used. For example, if digits are represented by an excess-3 code, where each digit has an encoded binary value three greater than its true value, a binary adder can be used to directly add two decimal operands. However, the result is not in excess-3 form so that further code conversions are required for further arithmetic processing. Furthermore, this approach requires accommodation of a second code representation which differs from the native binary representation of the system.
Another area which presents problems for integrating decimal and binary functions is the way in which number signs are represented. The most common sign representation for binary numbers is the 2s complement form whereas decimal representations are sign and magnitude. This results in many implementation conflicts, some direct and some subtle. With 2s complement representation, arithmetic operations can be performed essentially operands. With a sign and magnitude representation, the sign controls the machine functions. For example, if
V a computer addition operation is specified for operands having different signs, normally a subtract function must be performed on the magnitude of the operands,
ignoring the signs of the with a positive sign assumed for the result. The result of the subtraction must then be tested for a negative valve, and if negative, the magnitude portion of the result must be negated and the sign changed to minus.
Because of considerations such as these, it is apparent that major problems exist in combining decimal and binary arithmetic capabilities. Although multifunction modules, having multiple bit input operands, have been provided in the past, such modules have not incorporated decimal function capabilities effectively integrated with binary arithmetic and/or logical functions. It is accordingly a primary object of the invention to provide an arithmetic and logical unit module which performs both decimal and binary addition and subtraction, while sharing a common set of add gates, with a minimum of sacrifice of binary arithmetic efficiency.
It is a further object of the invention to provide an arithmetic unit which processes decimal data with much of the efficiency obtainable with binary 2s complement representation.
It is a still further object of the invention to provide an arithmetic unit building block, suitable for implementation as a single integrated circuit, or a portion thereof, which performs binary or decimal addition or subtraction, or a desired logical function.
It is another object of the invention to provide an arithmetic unit building block which supports systems processing signals in either true or bit complemented form.
SUMMARY OF THE INVENTION A function generator building block module is provided which receives as inputs a pair of bit quartets from a pair of operands, a carry-in signal, and a set of function selection signals. The output of the building block for arithmetic functions is a quartet of sum bits that is either the sum or the difference of the input quartets, which are treated selectively as binary numbers or binary-coded decimal digits, a carry-out signal, and carry look-ahead signals, which enable speed-up addition for several parallel function generator building blocks. The output of the building block for logical functions is selectively the inclusive OR, exclusive OR and AND functions on bit pairs, where each bit from an input quartet is compared with the corresponding bit in the other bit quartet. In addition to these logical functions, the complements of these functions are also selectable. These capabilities have significance beyond themselves in that they simplify the data processor control unit functional requirements and support data processor systems which match better the processing requirements of the real world.
The common core of the module consists of a set of elementary logical function gates which generate for each bit pair a complete set of logic terms, i.e., from which any desired function of the input quartets and a function select signal can be generated with a two-level sum of products or equivalent logic, and a set of adder gates which generates either the binary sum of bit quar tets, including a carry-in, or a selected set of logical functions of bit pairs. In addition to this core, sets of gates are provided to complement selectively one input quartet, supporting subtraction and the complemented logical functions, and to convert selectively the other input quartet to an excess-6 code for decimal addition.
A set of carry look-ahead gates, which are connected to the first level of the elementary function gate set, provide carry-out signals and generate and propagate signals for carry look-ahead logic and provides a correction control signal for decimal arithmetic functions. Accordingly, the module carry function outputs are generated in parallel with the bit function outputs and are independent of a carry-in input from an adjoining less significant module. A two-level set of logic gates is connected to the output of the adder gate set to correct the function generator output quartet for decimal arithmetic, under the control of the carry look-ahead gate set.
The resulting building block module provides enhanced function generation capability for a data processing system while reducing the control logic required for the system. In implementing a system, it is generally only necessary to provide a set of function selection signals. The building block includes built-in logic for controlling the adder so as to provide the desired arithmetic or logical function without further logical control from the system, thereby minimizing the logic and timing requirements for the system.
However, a residue of auxiliary system functions are required, such as supplying a carry-in to the least significant bit for subtraction operations. For decimal arithmetic operations, it is necessary for the system to test the operand signs so that the addition of operands with unlike signs is transformed into a subtraction operation and vice versa for subtraction. When the function generators generate the difference between operands and the subtrahend is greater in magnitude than the minuend, the result is in a negative ls complement form. The function generators provide the system with a carry-out signal from the most significant bit position enabling the system to change the result or to store an indication of the condition.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1, FIG. 2a and FIG. 2b together form a logic diagram of an arithmetic and logic unit building block module which embodies the present invention.
FIG. 3 is a diagram of a NOR gate, the primary logical element of FIGS. 1, 2a and 2b, which illustrates the logical relationships between the inputs and outputs for the NOR gates.
DESCRIPTION OF THE PREFERRED EMBODIMENT The function generator module illustrated in FIGS. 1, 2A and 28 receives a first input operand bit quartet, C C,, C C,,, where the respective bits represent binary numbers, binary coded decimal, or a set of logical bits, in bit complemented form. A second input operand bit quartet, I3 E,, E E corresponding to the second operand, a set of function control signals, K,,, K,, K K,,, and a carry-in signal, c,, are also received by the module. These four sets of signals are regenerated by NOR gates -13, 20-23, 5-8, and 9 respectively, and complemented in the process. These gates, as the gates used generally in the function generator, have the logical relationships shown in FIG. 3. A first output is th e i nverted logical OR, i.e., NOR, of the input signals AVB, and a second output signal, i.e., OR, AvB is also available, as shown, which is the complement of the first output signal.
A set of first operand gates 2 generates the true value of the input bits C on the respective NOR outputs A unless the control signals for both decimal and add are one. Thatris, when K,, K =I and NOR gate 16 produces a l, R, v Z K,,/\K in which case, gates 2 generate an excess-6 coded form of the input operand C. The OR output 0,, of gate 30 is derived from gates 10, 33 and 34, ieldin a 32 C v C, v K i, v if, v K K C v (C, v C,) K K The OR. output a, of gate 31 is derived from gates 35-37, yieldin K K+ V C, K K+ The OR output of a, of gate 32 is derived from gates 38 Accordingly, the NOR output 5 of gate 24 is K Bb,,.
Gates 25-27 operate in the same manner as gate 24, being connected to pairs of gates 43-44, 45-46 and 47-48, respectively. These yield OR outputs b, 69 8,.
The outputs of operand gate sets 2 and 3 are combined in the set of logical gates 4 to generate the elementary logical functions AND, OR, and exclusive OR for the respective bit pairs a, and b,. For the least significant bit pair a, and b the gate 58 generates an OR output a, v 17 hence:
O,=a vb and6,=a b Similarly, gate 57 generates 2, =2 v b, a 17,, and A, a b Gate 63 generates an OR output, Y, A,'v 6,, hence:
Gates 51-56 and 60-62 generate elementary logical functions for the more significant bit pairs in the same manner as for the least significant bit pair. The elementary functions all take the following forms:
For i= l, 2, 4 and 8,j= 3, 2, l and 0, respectively.
In order to provide function selection, and to introduce the carry-in into the adder function generation, additional logic is provided in FIG. 1. The OR output of gate 19 generates i K v K which indicates that a logical function is called for, hence its complement specifies an arithmetic function. A single gate is shown for generating this signal, but even though NOR gates generally have very high fan-out capability, it is normally desirable to distribute the K load by replicating gate 19. The inputs to gate 19 are the NOR outputs of gates 7 and 8. The OR outputs of gates 7 & 8 provide control signals A and O which call for the AND function or the exclusive OR functions, respectively. The NOR and OR outputs of gate 9 provide the carryin signals in true and complemented forms, 0 and '5, respectively.
In FlGS. 2a and 2b thebinary adder 65,in response to outputs from logical gates 4 and the control signals from FIG. 1, serves to generate the logical functions in addition to the arithmetic functions. The desired outputs signals F are provided by gates 106, 102, 99 and 97, respectively, which are not NOR gates, but are collector gates. For example the output F of gate 97 is the followin a 3)) v) V a a A V 363 3) v This is conveniently implemented by connecting the OR outputs of gates 73-76 together as a single input to NOR gate 97. That is, gates 73-76 which provide the inputs to gate 97, and gate 97, result in a two-level logic arrangement analogous to the conventional function generator using an OR gate to collect a logical sum of products. However, the outputs f are the sum of products of complemented variables.
Similarly, gate 99, from its input gates 77-82, generates the output f as follows:
f co /Y K, v A i K vFZ,X K v O X K v A A v a 00 269 12) V =t a( z 2) V C a a( 2 2) V In the same manner, gate 102, from its input gates 83-89 generates the output f,, as follows:
Also, gate 106, from its input gates 90-96 generates the output f as follows:
v a b K v (a EBb K,.
In order to reduce the fan-in to gates such as gates 93 and 95, gates 68-72 form intermediate partial logic function in accordance with the above equations.
The FIG. 2 carry look-ahead and correction gate set 67, provides a carry-out signal 3,, from the NOR output of gate 116, in complemented form. The carry-out is generated from the input gates 109-115 as follows:
c,,= c0,0 0,0 v $0 0 0 v 14 0 0,, v A 0 v A, Similarly, a pair of output signals, F and G, are provided to support carry look-ahead gate-sets for several units of the type disclosed. The output G from gate 119 indicates that there is a carry to the next more significant-bit quartet, even if there is no carry-in from the next less significant bit quartet. This output is accordingly:
G 14 0,0 0 v A 0 0 v .4 0 v A The output Ffrom gate 117 indicates that a carry from the next less significant bit quartet should be propagated, because the sum of a and b,, is at least 15. Accordingly, the output of gate 117 is:
F= 0 0,0 0 A,0,0,0 v A 0 0, v A 0 v A For decimal operations, the output of the binary adder 65 must be corrected, if the sum lies within the range 0-9, inclusive, for addition, or for subtraction, if the minuend is less than the subtrahend. in both cases, the conditions are equivalent 6,, l. Therefore, gate 118 OR output provides thg desired control signal.
K D v C1020408 v 142040 v 142040 V 14408 v Ag The OR output of gate 118 is a 0, if correction is required.
The FIG. 2 decimal correction gate set 66 adds 10, modulo 16, to the adder when K, 1. Gate 121, from gates 98-100 enerates:
F =f K,.v K =j K Gate 121 enerates F, from gates 102-105:
Gate l23generates F from gates 106-108:
0 .f0flf2 c fo c The least significant bit is unaffected by decimal corrections so that its output is the complemented form of f available from the NOR output of gate 120, hence:
is fl. The output functions of the function generators are in accordance with the following table:
Function Generator Truth Table K Function C B binary subtraction C 1} binary addition C B decimal subtraction C +13 decimal addition CGBB logical equivalence C698 exclusive OR (not assigned) (r tot assigned) CAR AND (with complemented operand) CAB AND (not assigned) (no t assigned) C V B OR (with complemented operand) C V B OR (not assigned) (not assigned) For logical functions, either or both of the input control signals K and K,. have the logical value of one. For K being one, the outputs 1 of the @nction generator are the four logical AND products, C B for K beigg one, the outputs are the logical exclusive OR, 6,69 17,; and for K and K, both being one, the combined outputs are the inclusive OR, 6, v E, wherej 0-3 (assuming K being zero and K being one). With the control signal K being zero, the second operand bits F, are complemented, resulting in a doubling of the logical functions of bit pairs. For example, for K K and K being zero and K being one, the equivalence function, C, B, is generated. As a result, the function generator is effectively universal. Although sixteen functions of bit pairs are possible, the majority are trivial or redundant. Two of the functions are the constants zero and one, and these functions are of no practical value. Four of the functions are merely regenerations of one bit or its complement. Two functions not implemented are NAND and NOR, but these functions are essentially redundant because they are merely the complements of the AND and OR functions.
When both K and K, are zero, an arithmetic function is specified. When K and K4, are one, the first operand gates 2 convert the 84-24 code to excess-6 code by adding six to the operand. For decimal subtraction, with K a zero, the second operand gates complement that operands bits, thereby producing an excess- 6 conversion of the 9s complement of the operand. The logical gates 4 generate at the first level the AND, NAND, OR and NOR functions for pairs of bits from corresponding bit positions of the input operands. Either the NAND or NOR outputs alone are sufficient for the generation of any desired function, hence the first level constitutes a complete set of elementary logical functions. However, the provision of a second level of gates 60-63, which provide the exclusive OR function and its complement, significantly simplifies the binary adder. Similarly for subtraction, with a carry-in applied to the least significant module, the sign of the result is handled automatically. If the result is positive, the carry-out from the most significant module is a one, so that the assumed sign of the result is correct. If the result is negative, the ls complement is generated and the carryout is a zero In response to the zero carry-out, the result can be complemented and the sign changed or the carry-out saved as an indicator. For a series of computations the result can be treated as a 10's complement number, with the indicator serving as a sign bit, analogous to processing 2s complement binary numbers.
The resulting module performs binary arithmetic with no significant degradation of speed. In fact, the provision of carry look-ahead logic supports very high speed execution of arithmetic operations. Furthermore, not only is decimal arithmetic implemented but it is implemented in a manner whereby the very high speed characteristic of carry look-ahead logic is supported for decimal operations. When either the sign character is used as a 10's complement sign representation (as opposed to sign and magnitude representation) or an indicator is used to store the sign ofa result, series of arithmetic operations can be performed with a speed comparable to the execution of 2s complement arithmetic.
While a preferred embodiment of the invention has been shown and described, it is not intended that the invention be limited to such disclosure. For example, the invention can be implemented with NAND gates, or any other set of logical gates which provide a complete set of binary functions. Also, the module can be adapted to accept and generate signals in true form as opposed to the bit complemented form. One approach is to invert the system logic so that the carry-in signal is complemented and the logical function selection is changed, e.g., for K, l, the NAND function is generated. Accordingly, the preferred embodiment supports systems processing data in either true or bit complemented form.
What is claimed is:
l. A function generator module comprising:
A. a set of conversion gates, responsive to a first input quartet operand, for selectively adding the value six to said first operand;
B. a set of elementary logical gates, responsive to the outputs of said set of conversion gates and a second input quartet of bits, for generating sets of functions, for respective bit pairs, each set of functions providing a complete logic set;
C. logical gate means, responsive to the outputs of said set of elementary logical gates and a carry-in signal, for selectively generating the binary sum bits of the input operands and the carry-in or a selected logical function;
D. a set of decimal correction gates, connected to said logical gate means for selectively adding ten modulo sixteen to said sum bits;
E. a set of carry look-ahead gates, connected to said set of elementary logical gates, for generating a carry-out for said module;
F. logic control means, responsive to input function selection signals, for selecting the desired logical gate means output, and for enabling said set of decimal correction gates for decimal arithmetic.
2. The function generator of claim 1 further comprising:
G. logic in said set of carry look-ahead gates for generating carry propagate and generate signals for the function generator.
3. The function generator of claim 2 further comprising:v
H. a set of complement gates, responsive to said second input quartet of bits and said logic control means for selectively complementing said second input.
4. A function generator for performing signed binary and decimal arithmetic operations, together with basic logical operations on a pair of bit quartet operands comprising:
A. conversion operand gating means, responsive to a first input bit quartet operand, for selectively generating four bit signals representing either the excess-6 coded representation or the true representation of a first input operand;
B. first input control means responsive to input control signals representing binary/decimal and add/subtract functions and connected to said first operand gating means for selecting the excess-6 coded representation if and only if a decimal add operation is specified by the input control signals;
C. complement operand gating means, responsive to a second input bit quartet operand, for selectively generating four bit signals representing either the second operand or its ls complement in ac-' cordance with input control signals specifying an add or subtract operation;
D. logical gating means responsive to the outputs of said conversion and complement operand gating means for generating four sets of signals, each set being derived from a pair of input signals, one each from said respective operand gating means, said set including the inclusive OR and AND functions of each of said pair of input signals;
E. carry gating means responsive to the outputs of said logical gating means for generating a carryout signal;
F. adder means responsive to the outputs of said logical gating means and a carry-in to the function generator for selectively generating the binary sum of or a logical function of the outputs of said first and second operand gating means, in accordance with the input control signals;
G. decimal correction means connected to said adder means for correcting the adder output in response to said carry-out signal representing no carry.
5. The function generator of claim 4 further comprisl. logic in said carry gating means, responsive to the ing: outputs of said first level logic, for generating carry H. first level logic in said logical gating means for P'opagate and generate signals for the function generating the AND and OR functions of respec- 5 generatortive bit pairs of said input operands;

Claims (5)

1. A function generator module comprising: A. a set of conversion gates, responsive to a first input quartet operand, for selectively adding the value six to said first operand; B. a set of elementary logical gates, responsive to the outputs of said set of conversion gates and a second input quartet of bits, for generating sets of functions, for respective bit pairs, each set of functions providing a complete logic set; C. logical gate means, responsive to the outputs of said set of elementary logical gates and a carry-in signal, for selectively generating the binary sum bits of the input operands and the carry-in or a selected logical function; D. a set of decimal correction gates, connected to said logical gate means for selectively adding ten modulo sixteen to said sum bits; E. a set of carry look-ahead gates, connected to said set of elementary logical gates, for generating a carry-out for said module; F. logic control means, responsive to input function selection signals, for selecting the desired logical gate means output, and for enabling said set of decimal correction gates for decimal arithmetic.
2. The function generator of claim 1 further comprising: G. logic in said set of carry look-ahead gates for generating carry propagate and generate signals for the function generator.
3. The function generator of claim 2 further comprising: H. a set of complement gates, responsive to said second input quartet of bits and said logic control means for selectively complementing said second input.
4. A function generator for performing signed binary and decimal arithmetic operations, together with basic logical operations on a pair of bit quartet operands comprising: A. conversion operand gating means, responsive to a first input bit quartet operand, for selectively generating four bit signals representing either the excess-6 coded representation or the true representation of a first input operand; B. first input control means responsive to input control signals representing binary/decimal and add/subtract functions and connected to said first operand gating means for selecting the excess-6 coded representation if and only if a decimal add operation is specified by the input control signals; C. complement operand gating means, responsive to a second input bit quartet operand, for selectively generating four bit signals representing either the second operand or its 1''s complement in accordance with input control signals specifying an add or subTract operation; D. logical gating means responsive to the outputs of said conversion and complement operand gating means for generating four sets of signals, each set being derived from a pair of input signals, one each from said respective operand gating means, said set including the inclusive OR and AND functions of each of said pair of input signals; E. carry gating means responsive to the outputs of said logical gating means for generating a carry-out signal; F. adder means responsive to the outputs of said logical gating means and a carry-in to the function generator for selectively generating the binary sum of or a logical function of the outputs of said first and second operand gating means, in accordance with the input control signals; G. decimal correction means connected to said adder means for correcting the adder output in response to said carry-out signal representing no carry.
5. The function generator of claim 4 further comprising: H. first level logic in said logical gating means for generating the AND and OR functions of respective bit pairs of said input operands; I. logic in said carry gating means, responsive to the outputs of said first level logic, for generating carry propagate and generate signals for the function generator.
US00158461A 1971-06-30 1971-06-30 Modular bcd and binary arithmetic and logical system Expired - Lifetime US3711693A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US15846171A 1971-06-30 1971-06-30

Publications (1)

Publication Number Publication Date
US3711693A true US3711693A (en) 1973-01-16

Family

ID=22568235

Family Applications (1)

Application Number Title Priority Date Filing Date
US00158461A Expired - Lifetime US3711693A (en) 1971-06-30 1971-06-30 Modular bcd and binary arithmetic and logical system

Country Status (5)

Country Link
US (1) US3711693A (en)
DE (1) DE2232222A1 (en)
FR (1) FR2144381A5 (en)
GB (1) GB1390428A (en)
IT (1) IT956112B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3752394A (en) * 1972-07-31 1973-08-14 Ibm Modular arithmetic and logic unit
US3811039A (en) * 1973-02-05 1974-05-14 Honeywell Inf Systems Binary arithmetic, logical and shifter unit
US3935438A (en) * 1973-10-20 1976-01-27 Vereinigte Flugtechnische Werke-Fokker Gmbh. Decimal adder
US3958112A (en) * 1975-05-09 1976-05-18 Honeywell Information Systems, Inc. Current mode binary/bcd arithmetic array
DE2708637A1 (en) * 1976-03-08 1977-09-15 Motorola Inc METHOD AND DEVICE FOR THE OPTION OF A BINARY OR A BCD ADDITION
DE2758130A1 (en) * 1976-12-30 1978-07-13 Fujitsu Ltd BINARY AND DECIMAL HIGH SPEED ADDERS
US4118786A (en) * 1977-01-10 1978-10-03 International Business Machines Corporation Integrated binary-BCD look-ahead adder
US4172288A (en) * 1976-03-08 1979-10-23 Motorola, Inc. Binary or BCD adder with precorrected result
US4218747A (en) * 1978-06-05 1980-08-19 Fujitsu Limited Arithmetic and logic unit using basic cells
US4263660A (en) * 1979-06-20 1981-04-21 Motorola, Inc. Expandable arithmetic logic unit
EP0044450A1 (en) * 1980-07-10 1982-01-27 International Computers Limited Digital adder circuit
EP0298717A2 (en) * 1987-07-09 1989-01-11 Digital Equipment Corporation BCD adder circuit
US4866656A (en) * 1986-12-05 1989-09-12 American Telephone And Telegraph Company, At&T Bell Laboratories High-speed binary and decimal arithmetic logic unit
EP0189912A3 (en) * 1985-01-31 1990-02-07 Unisys Corporation Fast bcd/binary adder
US20060179091A1 (en) * 2005-02-09 2006-08-10 International Business Machines Corporation System and method for performing decimal to binary conversion
US20060179090A1 (en) * 2005-02-09 2006-08-10 International Business Machines Corporation System and method for converting binary to decimal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3265876A (en) * 1962-12-24 1966-08-09 Honeywell Inc Parallel data accumulator for operating in either a binary or decimal mode
US3400259A (en) * 1964-06-19 1968-09-03 Honeywell Inc Multifunction adder including multistage carry chain register with conditioning means
US3596074A (en) * 1969-06-12 1971-07-27 Ibm Serial by character multifunctional modular unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3265876A (en) * 1962-12-24 1966-08-09 Honeywell Inc Parallel data accumulator for operating in either a binary or decimal mode
US3400259A (en) * 1964-06-19 1968-09-03 Honeywell Inc Multifunction adder including multistage carry chain register with conditioning means
US3596074A (en) * 1969-06-12 1971-07-27 Ibm Serial by character multifunctional modular unit

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3752394A (en) * 1972-07-31 1973-08-14 Ibm Modular arithmetic and logic unit
US3811039A (en) * 1973-02-05 1974-05-14 Honeywell Inf Systems Binary arithmetic, logical and shifter unit
US3935438A (en) * 1973-10-20 1976-01-27 Vereinigte Flugtechnische Werke-Fokker Gmbh. Decimal adder
US3958112A (en) * 1975-05-09 1976-05-18 Honeywell Information Systems, Inc. Current mode binary/bcd arithmetic array
DE2708637A1 (en) * 1976-03-08 1977-09-15 Motorola Inc METHOD AND DEVICE FOR THE OPTION OF A BINARY OR A BCD ADDITION
US4172288A (en) * 1976-03-08 1979-10-23 Motorola, Inc. Binary or BCD adder with precorrected result
DE2758130A1 (en) * 1976-12-30 1978-07-13 Fujitsu Ltd BINARY AND DECIMAL HIGH SPEED ADDERS
US4138731A (en) * 1976-12-30 1979-02-06 Fujitsu Limited High speed binary and binary coded decimal adder
US4118786A (en) * 1977-01-10 1978-10-03 International Business Machines Corporation Integrated binary-BCD look-ahead adder
US4218747A (en) * 1978-06-05 1980-08-19 Fujitsu Limited Arithmetic and logic unit using basic cells
US4263660A (en) * 1979-06-20 1981-04-21 Motorola, Inc. Expandable arithmetic logic unit
EP0044450A1 (en) * 1980-07-10 1982-01-27 International Computers Limited Digital adder circuit
US4441159A (en) * 1980-07-10 1984-04-03 International Computers Ltd. Digital adder circuit for binary-coded numbers of radix other than a power of two
EP0189912A3 (en) * 1985-01-31 1990-02-07 Unisys Corporation Fast bcd/binary adder
US4866656A (en) * 1986-12-05 1989-09-12 American Telephone And Telegraph Company, At&T Bell Laboratories High-speed binary and decimal arithmetic logic unit
EP0298717A2 (en) * 1987-07-09 1989-01-11 Digital Equipment Corporation BCD adder circuit
EP0298717A3 (en) * 1987-07-09 1991-01-16 Digital Equipment Corporation Bcd adder circuit
US20060179091A1 (en) * 2005-02-09 2006-08-10 International Business Machines Corporation System and method for performing decimal to binary conversion
US20060179090A1 (en) * 2005-02-09 2006-08-10 International Business Machines Corporation System and method for converting binary to decimal
US7660838B2 (en) 2005-02-09 2010-02-09 International Business Machines Corporation System and method for performing decimal to binary conversion

Also Published As

Publication number Publication date
IT956112B (en) 1973-10-10
GB1390428A (en) 1975-04-09
DE2232222A1 (en) 1973-01-18
FR2144381A5 (en) 1973-02-09

Similar Documents

Publication Publication Date Title
US3711693A (en) Modular bcd and binary arithmetic and logical system
US4168530A (en) Multiplication circuit using column compression
CA1120594A (en) Microprogrammable floating point arithmetic unit capable of performing arithmetic operations on long and short operands
US4594678A (en) Digital parallel computing circuit for computing p=xy+z in a shortened time
US4866656A (en) High-speed binary and decimal arithmetic logic unit
US3610906A (en) Binary multiplication utilizing squaring techniques
US4878192A (en) Arithmetic processor and divider using redundant signed digit arithmetic
US3935438A (en) Decimal adder
JPS62280930A (en) Digital multiplier
US4110831A (en) Method and means for tracking digit significance in arithmetic operations executed on decimal computers
US4879677A (en) Parallel adder circuit with sign bit decoder for multiplier
JPS6125245A (en) Rounding process circuit
US4709346A (en) CMOS subtractor
US3752394A (en) Modular arithmetic and logic unit
JPH0619685A (en) Parallel multiplying circuit
US5506800A (en) Self-checking complementary adder unit
US3629565A (en) Improved decimal adder for directly implementing bcd addition utilizing logic circuitry
GB963429A (en) Electronic binary parallel adder
US4873660A (en) Arithmetic processor using redundant signed digit arithmetic
US4118786A (en) Integrated binary-BCD look-ahead adder
US3249746A (en) Data processing apparatus
US3198939A (en) High speed binary adder-subtractor with carry ripple
JPH0346024A (en) Floating point computing element
US3462589A (en) Parallel digital arithmetic unit utilizing a signed-digit format
US5206825A (en) Arithmetic processor using signed-digit representation of external operands