发明名称 Calculating the average of four integer numbers rounded away from zero in a single instruction cycle
摘要 The n-bit average of four signed or unsigned n-bit integer operands (A, B, C and D) rounded away from zero as prescribed in the MPEG standard is calculated in one instruction cycle by appending two bits to a left side of each of the operands to provide four n+2 bit extended operands, summing the extended operands to provide an n+2 bit sum, removing the two least significant bits of the n+2 bit sum to provide an n-bit sum, and incrementing the n-bit sum as appropriate. An append circuit (302) appends two bits to the left sides of the operands, and the extended operands are coupled to an adder circuit (306) that includes adder logic (308) and an n-bit carry lookahead adder (310). The adder logic (308) provides the two least significant bits of the sum of the extended operands, along with n partial sum bits and n partial carry bits to the adder (310). The adder (310) provides a sum output, representing the n most significant bits of the sum of the extended operands, and a sum-plus-one output representing the sum output incremented by one. A multiplexer (314) under control of a control circuit (312) selects one of the sum and sum-plus-one outputs as the n-bit average based on inspection of the two least significant bits and the most significant bit of the sum of the extended operands, and a mode signal indicative of whether the operands are signed or unsigned values.
申请公布号 US5710732(A) 申请公布日期 1998.01.20
申请号 US19960635999 申请日期 1996.04.22
申请人 SAMSUNG ELECTRONICS CO., LTD. 发明人 WONG, RONEY S.
分类号 G06F17/18;(IPC1-7):E06F7/38 主分类号 G06F17/18
代理机构 代理人
主权项
地址