Systems and methods for a signed magnitude adder in one's complement logic
AssigneeMarvell International Ltd.
InventorEngling Yeo
Life of this patent
Estimating the term…
Abstract
Disclosed herein are systems and methods for a signed-magnitude adder based on one's complement logic, where the adder offers enhancements in both speed and chip area consumption. The one's complement based adder includes circuitry for converting operands from their signed-magnitude representations to their one's complement representations, circuitry for adding operands in their one's complement representations, and circuitry for converting the resulting sum into a signed-magnitude format.
Claims13
A method for adding a first operand and a second operand, comprising:
- obtaining the first operand in a signed-magnitude representation using a number of bits;
- converting the first operand from the signed-magnitude representation to a first one's complement representation by inverting magnitude bits of the signed-magnitude representation of the first operand in response to a determination that the first operand is a negative operand;
- converting the second operand to a second one's complement representation;
- adding, in a first addition operation, the first one's complement representation to the second one's complement representation to generate a first partial sum, wherein the first addition operation is performed using a plurality of full adders followed by a half adder, the half adder adding least significant bits from each of the first operand and the second operand;
- removing an overflow bit of the first partial sum to generate a second partial sum;
- adding, in a second addition operation performed using a plurality of half adders, the overflow bit to the second partial sum at a least significant position of the second partial sum to generate a sum in a one's complement representation, wherein a total number of carry operations performed in the first addition operation and the second addition operation is less than or equal to one plus the number of bits in the first one's complement representation;
- and
- converting the sum from its one's complement representation to a signed-magnitude representation by inverting magnitude bits of the sum in response to a determination that the one's complement representation of the sum is negative valued.
An adder for adding a first operand and a second operand, comprising:
- storage circuitry for storing the first operand in a signed-magnitude representation using a number of bits and storing the second operand in a second one's complement representation;
- operand conversion circuitry to convert the first operand from the signed-magnitude representation to a first one's complement representation by inverting magnitude bits of the signed-magnitude representation of the first operand in response to a determination that the first operand is a negative operand;
- a first adder to add, in a first addition operation, the first one's complement representation to the second one's complement representation to generate a first partial sum, the first adder comprising a plurality of full adders followed by a half adder, the half adder adding least significant bits from each of the first operand and the second operand;
- circuitry to remove an overflow bit of the first partial sum to generate a second partial sum;
- a second adder comprising a plurality of half adders to add, in a second addition operation, the overflow bit to the second partial sum at a least significant position of the second partial sum to generate a sum in a one's complement representation, wherein a total number of carry operations performed in the first addition operation and the second addition operation is less than or equal to one plus the number of bits in the first one's complement representation,
- wherein the operand conversion circuitry is further able to convert the sum from its one's complement representation to a signed-magnitude representation by inverting magnitude bits of the sum in response to a determination that the one's complement representation of the sum is negative valued.
A device for adding a first operand and a second operand, comprising:
- means for storing the first operand in a signed-magnitude representation using a number of bits and for storing the second operand in a second one's complement representation;
- means for converting the first operand from the signed-magnitude representation to a first one's complement representation by inverting magnitude bits of the signed-magnitude representation of the first operand in response to a determination that the first operand is a negative operand;
- means for adding, in a first addition operation, the first one's complement representation to the second one's complement representation to generate a first partial sum, wherein the means for adding the first one's complement representation to the second one's complement representation comprises a plurality of full adders followed by a half adder, the half adder comprising means for adding least significant bits from each of the first operand and the second operand;
- means for removing an overflow bit of the first partial sum to generate a second partial sum;
- means for adding, in a second addition operation, the overflow bit to the second partial sum at a least significant position of the second partial sum to generate a sum in a one's complement representation, wherein the means for adding the overflow bit to the second partial sum comprises a plurality of half adders, and wherein a total number of carry operations performed in the first addition operation and the second addition operation is less than or equal to one plus the number of bits in the first one's complement representation;
- and
- means for converting the sum from its one's complement representation to a signed-magnitude representation by inverting magnitude bits of the sum in response to a determination that the one's complement representation of the sum is negative valued.
Dependencies are inferred from the claim text.