首页> 外国专利> Limiting the valve of a 64-bit number to a maximum value, a minimum value, or both in a 32-bit environment

Limiting the valve of a 64-bit number to a maximum value, a minimum value, or both in a 32-bit environment

机译:在32位环境中,将64位数字的阀限制为最大值和/或最小值

摘要

In one embodiment of the present invention, logic for limiting the value of a 64-bit number to a maximum limit in a 32-bit environment allocates one or more bit flags in a first operation. The logic accesses a most significant 32-bit portion of a first 64-bit number including a first value. The logic accesses a most significant 32-bit portion of a second 64-bit number including a maximum limit and a second value. The logic compares the first value with the second value and, if the first value is greater than the second value, sets the bit flags accordingly and changes the most significant 32-bit portion of the first 64-bit number to match the same of the second 64-bit number. If the first value is equal to the second value, the logic sets the one or more allocated bit flags accordingly. In a second operation following the first operation, the logic accesses the bit flags. If the bit flags indicate that the first value is greater than the second value, the logic accesses a least significant 32-bit portion of the first 64-bit number, accesses a least significant 32-bit portion of the second 64-bit number, and changes the least significant 32-bit portion of the first 64-bit number to match the same of the second 64-bit number. If the bit flags indicate that the first value is equal to the second value, the logic accesses the least significant 32-bit portion of the first 64-bit number including a third value. The logic accesses a least significant 32-bit portion of the second 64-bit number including a fourth value. The logic compares the third value with the fourth value and, if the third value is greater than the fourth value, changes the least significant 32-bit portion of the first 64-bit number to match the same of the second 64-bit number.
机译:在本发明的一个实施例中,用于在32位环境中将64位数字的值限制为最大限制的逻辑在第一操作中分配一个或多个位标志。该逻辑访问包括第一值的第一64位数字的最高有效32位部分。逻辑访问第二个64位数字的最高有效32位部分,其中包括最大限制和第二个值。该逻辑将第一个值与第二个值进行比较,如果第一个值大于第二个值,则相应地设置位标志,并更改第一个64位数字的最高有效32位部分以与第一个64位数字相匹配。第二个64位数字。如果第一值等于第二值,则逻辑相应地设置一个或多个分配的位标志。在第一操作之后的第二操作中,逻辑访问位标志。如果位标志指示第一值大于第二值,则逻辑访问第一64位数字的最低有效32位部分,访问第二64位数字的最低有效32位部分,并将第一个64位数字的最低有效32位部分更改为与第二个64位数字相同的部分。如果位标志指示第一值等于第二值,则逻辑访问包括第三值的第一64位数字的最低有效32位部分。逻辑访问第二个64位数字中的最低有效32位部分,其中包括第四个值。该逻辑将第三值与第四值进行比较,如果第三值大于第四值,则将第一64位数字的最低有效32位部分更改为与第二64位数字的最低有效位匹配。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号