Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method to Convert Signed Operand Division Algorithm to Work with Unsigned Operands

IP.com Disclosure Number: IPCOM000112102D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 38K

Publishing Venue

IBM

Related People

Vaden, MT: AUTHOR [+2]

Abstract

The following technique can be used to modify an existing 2's complement, non-restoring division algorithm to work with unsigned operands.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 80% of the total text.

Method to Convert Signed Operand Division Algorithm to Work with
Unsigned Operands

      The following technique can be used to modify an existing 2's
complement, non-restoring division algorithm to work with unsigned
operands.

      In a 2's complement algorithm, the divide compare step, the
quotient fixup, and the remainder fixup steps are all adjusted based
on the sign of the operands.  These steps are again adjusted to allow
division of unsigned operands.

      In the divide compare steps, the normal 2's complement method
will add the divisor if the exclusive OR of the divisor and dividend
sign bits is a b'1', and subtract if the exclusive OR is a b'0'.  The
divide compare step is modified to always perform a subtract when the
instruction specifies unsigned operands.

      In the remainder fixup step, the normal 2's complement method
will exclusive OR the sign of the last partial remainder with the
sign of the dividend to determine if a fixup is required.  (A fix up
is adding or subtracting the divisor to the final partial remainder.)
For this implementation, no remainder is required for instructions
that operate on unsigned operands.  (And therefore, no remainder
fixup is required.)

      In the quotient fixup step, the normal 2's complement method
will compare the expected sign of the quotient with the sign of the
quotient calculated.  If they are not the same, then the 2's
complement of the calculated quotient is performed to get the fina...