摘要 |
<p>A format converting circuit for numeric data comprises an operation unit (9) which operates according to a mode decision signal to output an input data as it is or a two's complement of the input data; a storage device (11) which stores a positive or negative sign data to be read out and is reset by an initializing signal to a positive data storing state; and a control circuit (13) which operates in two conversion modes. One of the modes is a signed-to-unsigned conversion mode in which the control circuit (13) controls the operation unit (9) with the mode decision signal such that, if a sign bit of the input data is 0, the operation unit (9) outputs the data as it is while, if the sign bit is 1, the operation unit (9) outputs a two's complement of the input data. At the same time, the control circuit (13) inverts the data stored in the storage device if the above-mentioned sign bit is 1. The other mode is an unsigned-to-signed conversion mode in which the control circuit (13) controls the operation unit (9) with the mode decision signal such that, if the data stored in the storage device (11) is positive, the operation unit (9) outputs the input data as it is while, if the data stored in the storage device (11) is negative, the operation unit (9) outputs a two's complement of the input data.</p> |