md: use proper little-endian bitops