If you just need a simple hex dump and cannot install packages:
On Debian-based systems, the default Vim installation sometimes omits xxd to reduce dependencies. You need to install the xxd package explicitly. xxd command not found
brew install vim