# US 2020/0183650 A1 · Radix-1000 decimal floating-point numbers and arithmetic units using a skewed representation of the fraction

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0183650 A1
- Document ID: US20200183650A1
- Status: Published application
- Kind: A1
- Application number: 16/214,925
- Filed: 2018-12-10
- Published: 2020-06-11
- Earliest claimed: 2018-12-10
- Assignees: King Fahd University of Petroleum and Minerals
- Applicants: King Fahd University of Petroleum and Minerals
- Inventors: Muhamed Fawzi MUDAWAR
- Web page: https://patentgrep.com/patent/US20200183650A1

## CPC

- G06F 7/491: Computations with decimal numbers {radix 12 or 20. (G06F7/4824 takes precedence)}
- G06F 7/4912: {Adding; Subtracting (G06F7/492, G06F7/498 take precedence)}
- G06F 7/508: using carry look-ahead circuits
- G06F 2207/4911: Decimal floating-point representation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, structure and method using radix-1000 (instead of radix-10) are implemented to represent and operate on decimal floating-point numbers. Instead of using a 10-bit declet to encode a DPD, the system, structure and method herein use a declet to encode a BCK (Binary Coded 1000 values), where the letter K is the abbreviation of the number 1000. A skewed representation of the fraction field is then used to avoid the loss of decimal digits in arithmetic operations when shifting and rounding the fraction are required.

## Claims

### Claim 1

A processing circuit comprising logic circuitry for performing radix 1000 decimal floating point arithmetic; comprising:
an input fraction expanding circuit for expanding most significant bits and least significant bits of at least two input digital floating point radix-1000 inputs, the input fraction expanding circuit being configured to swap expanded fractions of the at least two digital floating point radix-1000 inputs in response to a swap signal based on the at least two input digital floating point radix-1000 inputs, thereby generating expanded fraction outputs corresponding to the at least two input digital floating point radix-1000 inputs;
an exponent difference circuit for determining a difference between biased exponents of the at least two digital floating point radix-1000 inputs in response to inputting the biased exponents and the input sign bits of the at least two input digital floating point radix-1000 inputs,
the exponent difference circuit being configured to generate at least one of a swap signal, a result exponent signal, a result sign data signal corresponding to a swapped expanded fraction data signal and a maximum exponent data signal, and right shift data signal, the swap signal being outputted to the input fraction expanding circuit to control swapping of the expanded fractions;
a right-shift circuit for right-shifting one of the expanded fraction outputs corresponding to the at least two digital floating point radix-1000 inputs in response to the right shift data signal, and for generating a sticky bit data signal and a shifted-out BCK data signal;
an add/subtract circuit for performing at least one of an adding and a subtracting computation with respect to the expanded fraction outputs to thereby generate an add/subtract result data signal;
a normalizing circuit for normalizing the add/subtract result data signal in response to the sticky bit data signal and the shifted-out BCK data signal, and generating a normalized add/subtract result data signal; and
a round and pack circuit for generating a normalized fraction output signal in response to the normalized add/subtract result data signal, the sign data signal and a round direction data signal.

### Claim 2 (depends on 1)

A processing circuit according to claim 1, further comprising:
an effective operation circuit for generating an effective operation data signal in response to the input sign bits of the at least two digital floating point radix-1000 inputs and an arithmetic operation select signal, the effective operation data signal being inputted into the add/subtract circuit, wherein the add/subtract circuit performs at least one of an adding and a subtracting computation with respect to the expanded fraction outputs to thereby generate an add/subtract result data signal in response to the effective operation data signal.

### Claim 3 (depends on 2)

A processing circuit according to claim 2, further comprising:
a sign circuit for determining the result sign data signal in response to at least a sign of a swapped expanded fraction data signal, a sign data signal corresponding to one of the at least two input digital floating point radix-1000 inputs, and the effective operation data signal.

### Claim 4 (depends on 1)

A processing circuit according to claim 1, wherein the exponent difference circuit includes:
an adder circuit for generating the difference between biased exponents of the at least two digital floating point radix-1000 inputs and an output carry signal,
a first multiplexer circuit for generating the maximum exponent data signal,
a second multiplexer circuit for generating the sign of a swapped expanded fraction data signal in response to the input sign bits of the at least two digital floating point radix-1000 inputs and the swap signal,
a third multiplexer circuit for generating the right shift signal in response to the difference between biased exponents from the adder circuit and an absolute value determination circuit, wherein
the swap signal is outputted from the adder circuit in response to the biased exponent difference from the adder circuit.

### Claim 5 (depends on 2)

A processing circuit according to claim 2, wherein the right-shift circuit includes first and second stages of multiplexers, wherein
the first stage of multiplexers are configured to generate a first stage right-shift output and a first stage right-shift last BCK output based on a second one of the expanded fraction outputs that is right-shifted in response to least significant bit data of the right shift signal,
the second stage of multiplexers are configured to generate a second stage right-shift output and a second stage right-shift BCK output based on the first stage right-shift output that is right-shifted in response to most significant bit date of the right shift signal to then generate a shifted fraction portion of the shifted-out BCK data signal,
the first stage of multiplexers are further configured to generate a first stage sticky bit data signal that is right-shifted in response to least significant bit data of the right shift signal,
the second stage of multiplexers are further configured to generate the sticky bit data signal that is right-shifted in response to most significant bit date of the right shift signal.

### Claim 6 (depends on 5)

A processing circuit according to claim 5, wherein the add/subtract circuit includes
a plurality of 10-bit BCK add/subtract sub-circuits and a plurality of post-correct sub-circuits each connected to a corresponding one of the plurality of 10-bit BCK add/subtract sub-circuits, and
a carry look ahead circuit that compares magnitudes of the swapped fraction expanded fraction with the shifted-out BCK data signal to then generate a plurality of carry output data signals corresponding to each of the plurality of 10-bit BCK add/subtract sub-circuits and post-correct sub-circuits.

### Claim 7 (depends on 1)

A processing circuit according to claim 1, wherein the normalizing circuit includes
an exponent correction circuit configured to generate an exponent correction signal in response to the add/subtract result data signal, a leading zero count signal, a carry-out bit signal and a leading-zero flag bit, and
a multiplexer circuit that generates the normalized add/subtract result data signal in response to the add/subtract result data signal concatenated with a result extension of the add/subtract result data signal that is left-shifted.

### Claim 8 (depends on 1)

A processing circuit according to claim 1, wherein the round and pack circuit includes
a rounding decision circuit for generating a rounding value data signal in response to the normalized add/subtract result data signal and a rounding direction signal, and
a plurality of BCK incrementer circuits for generating a corresponding plurality of temporary BCK data signals and propagate bits in response to the normalized add/subtract result data signal, the plurality of BCK incrementer circuits each being configured to output 10-bit segments of a rounded normalized add/subtract result data signal.

### Claim 9 (depends on 1)

A processing circuit according to claim 1, wherein each of the digital floating point radix-1000 inputs includes a fraction field comprising a plurality of declets representing numbers 0-999 and a format indicator.

### Claim 10 (depends on 1)

A processing circuit according to claim 1, wherein the input fraction expanding circuit is configured to expand a skewed fraction field into an expanded representation of a fraction field F[! 15:0] into a number representation X[119:0] according to:
fmt[1:0]=F[115:114]
if fmt[1:0]=11 then X[119:117]=F[5:3] else X[119:117]=000;
if fmt[1]=1 then X[116:114]=F[2:0] else X[116:114]=concat {0,0,F[114]};
X[113:6]=F[113:6];
if fmt[1:0]=11 then X[5:3]=000 else X[5:3]=F[5:3];
if fmt[l]=1 then X[2:0]=000 else X[2:0]=F[2:0],
wherein fmt[1:0] is the format indicator.

### Claim 11

A method implemented in a computer or data processing system for performing radix 1000 decimal floating point arithmetic; comprising the steps of:
inputting at least two input digital floating point radix-1000 inputs;
expanding most significant bits and least significant bits of the at least two input digital floating point radix-1000 inputs, the step of expanding including swapping expanded fractions of the at least two digital floating point radix-1000 inputs in response to a swap signal based on the at least two input digital floating point radix-1000 inputs, thereby generating expanded fraction outputs corresponding to the at least two input digital floating point radix-1000 inputs;
determining a difference between biased exponents of the at least two digital floating point radix-1000 inputs in response to inputting the biased exponents and the input sign bits of the at least two input digital floating point radix-1000 inputs;
generating at least one of a swap signal, a result exponent signal, a result sign data signal corresponding to a swapped expanded fraction data signal and a maximum exponent data signal, and right shift data signal;
inputting the swap signal to control swapping of the expanded fractions;
right-shifting one of the expanded fraction outputs corresponding to the at least two digital floating point radix-1000 inputs in response to the right shift data signal;
generating a sticky bit data signal and a shifted-out BCK data signal;
performing at least one of an adding and a subtracting computation with respect to the expanded fraction outputs to thereby generate an add/subtract result data signal;
normalizing the add/subtract result data signal in response to the sticky bit data signal and the shifted-out BCK data signal;
generating a normalized add/subtract result data signal; and
generating a normalized fraction output signal in response to the normalized add/subtract result data signal, the sign data signal and a round direction data signal.

### Claim 12 (depends on 11)

A method according to claim 11, further comprising the steps of:
selecting an arithmetic operation;
generating an effective operation data signal in response to the input sign bits of the at least two digital floating point radix-1000 inputs and an arithmetic operation selection;
performing at least one of an adding and a subtracting computation with respect to the expanded fraction outputs to thereby generate an add/subtract result data signal in response to the effective operation data signal and the arithmetic operation selection.

### Claim 13 (depends on 12)

A method according to claim 12, further comprising the steps of:
determining the result sign data signal in response to at least a sign of a swapped expanded fraction data signal, a sign data signal corresponding to one of the at least two input digital floating point radix-1000 inputs, and the effective operation data signal.

### Claim 14 (depends on 11)

A method according to claim 11, wherein the step of determining a difference between biased exponents includes:
generating the difference between biased exponents of the at least two digital floating point radix-1000 inputs and an output carry signal,
generating the maximum exponent data signal,
generating the sign of a swapped expanded fraction data signal in response to the input sign bits of the at least two digital floating point radix-1000 inputs and the swap signal,
generating the right shift signal in response to the difference between biased exponents, wherein
the swap signal is outputted in response to the biased exponent difference.

### Claim 15 (depends on 12)

A method according to claim 12, wherein the step of right-shifting circuit includes
generating via a first stage of multiplexers a first stage right-shift output and a first stage right-shift last BCK output based on a second one of the expanded fraction outputs that is right-shifted in response to least significant bit data of the right shift signal,
generating via a second stage of multiplexers a second stage right-shift output and a second stage right-shift BCK output based on the first stage right-shift output that is right-shifted in response to most significant bit date of the right shift signal;
generating a shifted fraction portion of the shifted-out BCK data signal;
generating a first stage sticky bit data signal that is right-shifted in response to least significant bit data of the right shift signal; and
generating the sticky bit data signal that is right-shifted in response to most significant bit date of the right shift signal.

### Claim 16 (depends on 15)

A method according to claim 15, wherein the step of performing at least one of an adding and a subtracting computation includes
comparing magnitudes of the swapped fraction expanded fraction with the shifted-out BCK data signal to then generate a plurality of carry output data signals.

### Claim 17 (depends on 11)

A method according to claim 11, wherein the step of normalizing includes
generating an exponent correction signal in response to the add/subtract result data signal, a leading zero count signal, a carry-out bit signal and a leading-zero flag bit, and
generating the normalized add/subtract result data signal in response to the add/subtract result data signal concatenated with a result extension of the add/subtract result data signal that is left-shifted.

### Claim 18 (depends on 11)

A method according to claim 11, wherein the step of rounding circuit includes
generating a rounding value data signal in response to the normalized add/subtract result data signal and a rounding direction signal,
generating a corresponding plurality of temporary BCK data signals and propagate bits in response to the normalized add/subtract result data signal, and
outputting 10-bit segments of a rounded normalized add/subtract result data signal.

### Claim 19 (depends on 11)

A method according to claim 11, wherein each of the digital floating point radix-1000 inputs includes a fraction field comprising a plurality of declets representing numbers 0-999 and a format indicator.

### Claim 20 (depends on 19)

A method according to claim 19, wherein performing of the radix 1000 decimal floating point arithmetic uses skewed representations of operands as indicated by the format indicator.
