This problem (most likely) would show a huge contrast, between using a coding solution, paying basically very little for uP hardware, while a solution using hardware is complex.
Assuming you are encountering an analog to digital conversion output stream, you would need a digital comparator, perhaps 10 bits or 12 bits to compare for greater than, less than, and equal to, with a store operation for case when the newer value is larger. (That's ignoring any polarity, (plus or minus voltage value). Just accounting for the value sign is going to be a mess.
You would 'save' a latest, largest value, which calls for some BUS hardware resembling a processor type set-up. Plus you need a flag or two, indicating what stage or state the process is in. Like, when first starting out, save a sample value, then set the flag that indicates this is the biggest (biggest positive or biggest negative) and then proceed to repeat converting and testing each next value.
Coding that would, also be messy, but would not require that each little functional fragment has to involve more IC's hardware.