Absolute value calculating circuit having a single adder
AssigneeNEC Corporation
InventorToshiyuki Kanoh
Life of this patent
Estimating the term…
Abstract
An absolute value calculating circuit for producing an absolute value of the difference between first and second numerical values. The circuit includes a first inverter for inverting the first numerical value, a first adder for adding the inverted first numerical value and the second numerical value, and a second inverter for inverting the output of the first adder. The circiuit further includes a second adder for adding 1 to the output of the adder and a selector for selecting and outputting, as the absolute value of the difference between the first and second numerical values, either the inverted output of the first adder or the output of the second adder in accordance with a sign of the output of the first adder.
Claims7
An absolute value calculating circuit for producing an absolute value of a difference between a first and a second numerical value which have a predetermined bit length and are represented by 2's complement notation, comprising:
- first inverting means for inverting the first numerical value to output an inverted numerical value:
- first adding means for adding the second numerical value to the inverted numerical value to output an addition result;
- second inverting means for inverting the addition result to output a first calculation result;
- second adding means for adding 1 to the addition result to output a second calculation result;
- and
- selecting means for selecting and delivering as an absolute value of a difference between the first and second numerical values, one of the first and second calculation results, said selecting means selecting one of the first and second calculation results in accordance with a sign of the addition result.
Dependencies are inferred from the claim text.