首页> 外国专利> Bit searching through 8, 16, or 32 bit operands using a 32 bit data path

Bit searching through 8, 16, or 32 bit operands using a 32 bit data path

机译:使用32位数据路径通过8、16或32位操作数进行位搜索

摘要

A bit searching method shifts an operand and counts the number of shifts it takes to shift out the value one, thereby identifying the bit position in operand containing the value one. The operand is first compared to zero. If the operand is zero, the zero flag is set, otherwise, a register is initialized by being cleared for a bit search forward instruction or, for a bit search reverse instruction, being initialized to 15 for a 16-bit data length or 31 for a 32-bit data length For a bit search forward instruction, the operand is then shifted right one bit and the register is incremented, while for a bit search reverse instruction, the operand is shifted left one bit and the register is decremented. The operand is then examined to see if a 1 has been shifted out. If so, the register is read and decremented by 1 to yield the bit position of the operand where the first 1 was found. If not, then another shift and increment (decrement) step is performed.
机译:位搜索方法对操作数进行移位并计算将值移出1所需的移位次数,从而识别出操作数中包含值1的位位置。首先将操作数与零进行比较。如果操作数为零,则设置零标志;否则,通过清除寄存器来初始化位搜索正向指令,或清除位搜索反向指令,将其初始化为15表示16位数据长度或31表示初始值。 32位数据长度对于位搜索前向指令,操作数然后向右移一位,寄存器递增;而对于位搜索反向指令,操作数向左移一位,寄存器递减。然后检查操作数以查看是否已移出1。如果是这样,则读取寄存器并将其减1,以得到找到第一个1的操作数的位位置。如果不是,则执行另一个移位和增量(减量)步骤。

著录项

  • 公开/公告号US5831877A

    专利类型

  • 公开/公告日1998-11-03

    原文格式PDF

  • 申请/专利权人 NATIONAL SEMICONDUCTOR CORPORATION;

    申请/专利号US19950451204

  • 发明设计人 THOMAS WILLIAM SCHAW THOMSON;

    申请日1995-05-26

  • 分类号G06F7/00;G06F15/00;

  • 国家 US

  • 入库时间 2022-08-22 02:38:16

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号