Method and apparatus for determining a minimum/maximum of a plurality of binary values
AssigneeAdvantest (Singapore) Pte Ltd
InventorMichael Mueller
Life of this patent
Estimating the term…
Abstract
For determining a minimum/maximum of a plurality of binary values a bit position in the plurality of binary values is determined subsequent to which all bit values are the same. From the plurality of binary values those binary values are selected the bit values of which at the bit position determined in the preceding step and all subsequent positions, if any, has a predetermined value. The preceding steps are then repeated until only one binary value remains which is provided as the minimum or maximum.
Claims12
A method for determining a minimum/maximum of a plurality of binary values held by a plurality of processor memories or memories associated with respective processors, the method comprising:
- determining a bit position in the plurality of binary values subsequent to which all bit values are the same, wherein the determining including,
- commonly reading all binary values from all memories and generating a bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of binary values and based on the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values, determining the bit location in the plurality of binary values subsequent to which all bit values are the same;
- selecting from the plurality of binary values, those binary values, the bit value of which at the bit position determined in the determining and all subsequent bit positions, if any, comprises a predetermined value;
- repeating the determining and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
A non-transitory computer storage medium comprising a computer readable program code for carrying out, when executing the program code by a processor, a method for determining a minimum/maximum of a plurality of binary values held by a plurality of processor memories or memories associated with respective processors, the method comprising:
- determining a bit position in the plurality of binary values, subsequent to which all bit values are the same, wherein the determining initially including,
- commonly reading all binary values from all memories and generating a bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of binary values, and based on a comparison between the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values, determining the bit location in the plurality of binary values subsequent to which all bit values are the same;
- selecting from the plurality of binary values, those binary values, the bit value of which at the bit location determined based upon the comparison between the bit-wise OR combination and the bit-wise AND combination, and all subsequent bit positions if any, comprises a predetermined value;
- repeating the determining and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
A non-transitory computer readable medium, comprising a computer readable program code for carrying out, when executing the program code by a processor, a method for determining a minimum/maximum of a plurality of binary values held by a plurality of processor memories or memories associated with respective processors, the method comprising:
- commonly reading all binary values from all memories;
- generating a bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of binary values;
- determining the bit location in the plurality of binary values subsequent to which all bit values are the same, based on a comparison between the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values;
- selecting from the plurality of binary values, those binary values, the bit value of which at the determined bit location, and all subsequent bit positions if any, comprises a predetermined value;
- repeating the determining and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
A non-transitory computer readable medium, comprising a program code for carrying out, when executing the program code by a processor, a method for determining a minimum/maximum of a plurality of binary values held by as plurality of processor memories or memories associated with respective processors, the method comprising:
- determining a bit position in the plurality of binary values subsequent to which all bit values are the same, wherein the determining initially comprises:
- commonly reading all binary values from all memories and generating a bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of binary values, and determining the bit location in the plurality of binary values subsequent to which all bit values are the same based on a comparison between the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values;
- selecting from the plurality of binary values, those binary values, the bit value of which at the bit location determined in the determining and all subsequent bit positions, if any, comprises a predetermined value;
- repeating the determining and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
A system comprising:
- a central processor;
- a logic coupled to the central processor and configured to output a bit-wise OR combination and a bit-wise AND combination of a plurality of input values to the central processor;
- and
- a plurality of memories associated with respective processors, each of the memories being coupled to the logic and configured to hold one of the plurality of binary values, wherein the central processor is configured to operate in accordance with a method for determining a minimum/maximum of a plurality of binary values held by a plurality of processor memories or memories associated with respective processors, the method including
- determining a bit position in the plurality of binary values subsequent to which all bit values are the same, wherein the determining initially including,
- commonly reading all binary values from all memories and generating bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of him values, and
- determining the bit location in the plurality of binary values subsequent to which all bit values are the same based on a comparison between the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values;
- selecting from the plurality of binary values, those binary values, the bit value of which at the bit location determined in the determining and all subsequent bit positions, if any, comprises a predetermined value;
- repeating the determining and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
An apparatus comprising:
- a plurality of processor memories or memories associated with respective processors;
- and
- a processor configured to operate in accordance with a method for determining a minimum/maximum of a plurality of binary values held by the plurality of processor memories or memories associated with respective processors, the method including,
- commonly reading all binary values from all memories;
- generating a bit-wise OR combination of the commonly read plurality of binary values and a bit-wise AND combination of the commonly read plurality of binary values;
- determining the bit location in the plurality of binary values subsequent to which all bit values are the same based on a comparison between the bit-wise OR combination and the bit-wise AND combination of the commonly read plurality of binary values;
- selecting from the plurality of binary values, those binary values, the bit value of which at the determined bit location, and all subsequent bit positions if any, comprises a predetermined value;
- repeating, the determining, and selecting, wherein the determining is repeated on the basis of the binary values selected in the selecting, until only one selected binary value, or a plurality of matching binary values, remain;
- and
- providing the remaining binary value as the minimum/maximum.
Dependencies are inferred from the claim text.