发明名称 Overflow control for arithmetic operations
摘要 A computer system provides handling of positive and negative overflow. A first arithmetic operation is performed on a first n-bit unsigned binary operand and a second n-bit signed binary operand to produce an n-bit unsigned binary result. Overflow detection logic circuitry (300,310,320,330) within the arithmetic logic unit (26) detects positive overflow or negative overflow resulting from the arithmetic operation. When there is a positive overflow, saturation logic (340,341,350,351) replaces the output of the two's complement adder (60,61,65,66,69) with a value of 2<n>-1. When there is a negative overflow, the saturation logic (340,341,350,351) replaces the output of the two's complement adder (60,61,65,66,69) with a value of 0. In the same embodiment, a second arithmetic operation is performed on two n-bit signed binary operands to produce an n-bit signed binary result. The arithmetic operation is for example an addition or subtraction performed by a two's complement adder (60,61,65,66,69). Overflow detection logic circuitry (300,310,320,330) within the arithmetic logic unit (26) detects positive overflow or negative overflow resulting from the arithmetic operation. When there is a positive overflow, saturation logic (340,341,350,351) replaces the output of the two's complement adder (60,61,65,66,69) with a value of 2<n-1>-1. When there is a negative overflow, the saturation logic (340,341,350,351) replaces the output of the two's complement adder (60,61,65,66,69) with a value of -2<n-1>. <IMAGE>
申请公布号 EP0657804(B1) 申请公布日期 1999.01.27
申请号 EP19940309025 申请日期 1994.12.05
申请人 HEWLETT-PACKARD COMPANY 发明人 LEE, RUBY BEI-LOH;LAMB, JOEL DAVID
分类号 G06F7/38;G06F7/505;G06F7/57;G06F9/302;(IPC1-7):G06F7/48 主分类号 G06F7/38
代理机构 代理人
主权项
地址