发明名称 Method and apparatus for floating point to fixed point conversion with compensation for lost precision
摘要 A floating point binary number that is to be converted to a fixed point representation, or a fixed point number to be reduced in precision, is originally located in a source register. A conversion mechanism connects the source register to a destination register. After the conversion the least significant bit of the fixed point representation may deliberately retain an indication of the existence of less significant non-zero bits that were truncated. When such retention is desired it is accomplished by forcing that least significant bit to be a one if the fractional portion of the converted number is zero and there were such truncated non-zero bits of lesser significance. To do this the direction and amount of mantissa shift needed during conversion are inspected to reveal which bit positions in the original floating point number are going to be truncated. An array of two-input AND gates has one AND gate per possible truncated bit. A mask is generated by a lookup table according to the number of bits to be truncated. The mask supplies a logic 1 to one input of each such corresponding gate; the other input of each gate is driven by the bit to be truncated. If any such bit to be truncated is a one, then the output of the corresponding gate will be true. The outputs of all these AND gates or OR'ed together and the result stored in a latch; a SET latch then indicates the impending truncation of at least one 1. After the conversion the fractional portion of the destination register is checked to see if it is all zeros. If it is, and if the latch is also SET, then the least significant bit of the fractional portion of the destination register is forced to be understood as a 1 when the register is read.
申请公布号 US5561615(A) 申请公布日期 1996.10.01
申请号 US19940348437 申请日期 1994.12.02
申请人 HEWLETT-PACKARD COMPANY 发明人 KUO, DONG-YING;KOSS, LOUISE A.
分类号 H03M7/24;(IPC1-7):G06F7/00;G06F7/38;G06F15/00 主分类号 H03M7/24
代理机构 代理人
主权项
地址