How is unsigned integer max implemented in hardware?
A very simple approach would be to implement (a>b)?a:b. a>b can be implemented by starting at the left and check each bit pair of (a,b):


both 0 or both 1 : continue to next lower pair
a is 1 : a is highest; b is 1 : b is highest


When you know which one is the highest you can select that one by a 2N->N mux.

With some clever tricking the checking of the bit pairs can be combined with the muxer for the same bit pair.