binary to hex implementation