Decimal arithmetic apparatus and method
AssigneeInternational Computers Limited
InventorsJohn Richard Eaton, Kevin Hughes
Life of this patent
Estimating the term…
Abstract
An apparatus for adding two BCD numbers, avoids the need for special adders with detection of carries between BCD digits. First, a sum without carries is generated, by forming the binary sum of the two numbers and an all-sixes pattern, without any carries between BCD digits. Next, a sum with carries is generated, by forming the binary sum of the two numbers and an all-sixes pattern, with carries between BCD digits. A mask pattern is then generated, comprising a six in each BCD digit where the sum without carries is unequal to the sum with carries. A result is then generated by forming the binary sum of the two numbers and the mask pattern, with carries between BCD digits.
Claims4
Apparatus for adding first and second BCD numbers comprising:
- means for generating a sum without carries, by forming the binary sum of said numbers and an all-sixes pattern, without any carries between BCD digits;
- means for generating a sum with carries, by forming the binary sum of said numbers and an all-sixes pattern, with carries between BCD digits;
- means for generating a mask pattern comprising a six in each BCD digit where said sum without carries is unequal to said sum with carries;
- and
- means for generating a result by forming the binary sum of said numbers and said mask pattern, with carries between BCD digits.
A method of adding first and second BCD numbers comprising the steps:
- (a) generating a sum without carries, by forming the binary sum of said numbers and an all-sixes pattern, without any carries between BCD digits;
- (b) generating a sum with carries, by forming the binary sum of said numbers and an all-sixes pattern, with carries between BCD digits;
- (c) generating a mask pattern comprising a six in each BCD digit where said sum without carries is unequal to said sum with carries;
- and
- (d) generating a result by forming the binary sum of said numbers and said mask pattern, with carries between BCD digits.
Dependencies are inferred from the claim text.