perl -ne'printf "%012b",hex $_' input.hex > output.bin