A method for searching for a desired extreme value, the desired extreme value being one of a minimum value and a maximum value, among a set of numbers each coded in a binary format on q bits, the method comprising the steps of:
- (a) splitting each number into K sub-values each coded on n bits and characterized as n-bit sub-values, where n, q and K satisfy the relation q≦K×n, and assigning a rank to each said n-bit sub-value of a given number, the rank designated by a variable k intialized at k=1, said splitting not being performed when K=1;
- (b) forming a kth slice including all the n-bit sub-values of the kth rank;
- (c) encoding each n-bit sub-value of the slice formed in step (b) on m bits, where m>n, to form a slice of m-bit encoded sub-values using a coding technique that allows evaluation of the desired extreme value by a logical function selected from the group consisting of AND and OR;
- (d) when the minimum value among the set of numbers is desired, searching said slice of m-bit encoded sub-values in parallel to evaluate the minimum m-bit encoded sub-value thereof, and when the maximum value among the set of numbers is desired, searching said slice of m-bit encoded sub-values in parallel to evaluate the maximum m-bit encoded sub-value thereof;
- (e) when the minimum value among the set of numbers is desired, deselecting all the numbers whose m-bit encoded sub-value is greater than the minimum m-bit encoded sub-value evaluated in step (d), and when the maximum value among the set of numbers is desired, deselecting all the numbers whose m-bit encoded sub-value is less than the maximum m-bit encoded sub-value evaluated in step (d);
- and
- (f) repeating steps (b) to (e) with a next slice of n-bit sub-values, k being incremented by 1, until all said slices are processed, the desired extreme value thus corresponding to the value of the number not deselected.