You should indeed indicate what exactly you're trying to do here.
I believe indeed the median of a list is the center number, or the average value.
What kind of list are you using?

Right on Ghostdog, he ain't gonna get it done using SHR and SHL.

Grtz.