Browse Prior Art Database

Fast Masked-Based Bit Extraction and Justification

IP.com Disclosure Number: IPCOM000013825D
Original Publication Date: 2000-Nov-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 2 page(s) / 29K

Publishing Venue

IBM

Abstract

The idea involves a software-oriented method to extract and justify bits from a bit vector based on a mask. The objective of the invention is to improve the speed of the extract and justify operation. The following example illustrates an extract and right-justify operation in which bits are extracted from an 8 bit vector based on an 8 bit mask. The bits that are set to one in the mask indicate which bits have to be extracted and right-justified from the bit vector. For example, if the bit vector and mask equal the following binary values: bit vector: b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 mask: 0 1 0 0 1010

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 69% of the total text.

Page 1 of 2

Fast Masked-Based Bit Extraction and Justification

  The idea involves a software-oriented method to extract and
justify bits from a bit vector based on a mask. The objective of
the invention is to improve the speed of the extract and justify
operation.

The following example illustrates an extract and right-justify
operation in which bits are extracted from an 8 bit vector based
on an 8 bit mask. The bits that are set to one in the mask
indicate which bits have to be extracted and right-justified from
the bit vector.

For example, if the bit vector and mask equal the following
binary values:

bit vector: b0 b1 b2 b3 b4 b5 b6 b7
mask: 0 1 0 0 1010

(where bi equals '0' or '1') then the 8 bit result of the
extraction and justification operation has to be:
result: 0000 0b1 b4 b6

The idea is the following: for each possible mask value, a
separate function is created that implements the required
operations to perform the extraction and justification for that
specific mask value. The code for all the functions, or pointers
to the code for all the functions, are stored in a table, which
is indexed by mask value. During the execution of the software
routine to extract and justify bits from a bit vector, the
required mask value is used as an index into the table of
functions, and the corresponding function is invoked to obtain
the desired result.

8For the described example, 2 different functions would have to
be created and stored in a 256-entry table. These functions can
be based on shift, mask, a...