Patent ID: 6865272

Claim:
A method for changing the bit-order of a data value in a data processing system having a register capable of storing data strings which each comprise a plurality of sub-strings that are not individually addressable, the method comprising assigning an output data string by the steps of: loading the data value into a first data string; generating, for each sub-string of the output data string, a corresponding intermediate data string, each sub-string of which corresponds to a selected bit in the first data string and has all its bits equal to the value of the selected bit; generating, for each intermediate data string, a corresponding second intermediate data string by masking all but one unmasked bit in each sub-string of the respective intermediate data string; and generating the output data string, in each sub-string of which each bit has the same value as the unmasked bit in a selected sub-string of the second intermediate data string that corresponds to that sub-string of the output data string.