Python Forum
python3 convert hex to binary 32 bit
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python3 convert hex to binary 32 bit
#4
(Aug-27-2020, 01:15 PM)DeaD_EyE Wrote: What do you mean with 32 bit binary?

import binascii


result = binascii.unhexlify("d0e66bfafaf5253157d1b5464e34b0d8d1b53bafc88ae4b7adb0f62d6812c24c")
print(result)
Output:
b'\xd0\xe6k\xfa\xfa\xf5%1W\xd1\xb5FN4\xb0\xd8\xd1\xb5;\xaf\xc8\x8a\xe4\xb7\xad\xb0\xf6-h\x12\xc2L'
Read the docs of binascii.

Thank you very much, this is the solution.
I was misled by the data in the documentation.
Reply


Messages In This Thread
python3 convert hex to binary 32 bit - by Mkt - Aug-27-2020, 12:32 PM
RE: python3 convert hex to binary 32 bit - by Mkt - Aug-28-2020, 02:34 PM
RE: python3 convert hex to binary 32 bit - by Mkt - Aug-27-2020, 01:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to convert binary data into text? ZYSIA 3 2,657 Jul-16-2021, 04:18 PM
Last Post: deanhystad
  Convert file of hex strings to binary file medatib531 4 13,780 Oct-09-2020, 05:42 PM
Last Post: DeaD_EyE
  convert string into multiple columns in python3 VAN 2 2,781 Sep-26-2020, 11:14 PM
Last Post: scidam
  Python3 binary tree not replacing parent nodes with child nodes Aspect11 0 1,786 Sep-23-2020, 02:22 PM
Last Post: Aspect11
  Binary data to Image convert Nuwan16 1 5,699 Aug-24-2020, 06:03 AM
Last Post: millpond
  How to convert a python code to binary? rsurathu 0 1,812 Aug-02-2020, 08:09 AM
Last Post: rsurathu
  can anyone help convert to python3 corsasri 24 167,741 Jul-17-2020, 07:28 AM
Last Post: corsasri
  Python3: how to read binary? alexel 0 1,516 Feb-03-2020, 09:18 PM
Last Post: alexel
  hex file to binary or pcap to binary baran01 1 5,712 Dec-11-2019, 10:19 PM
Last Post: Larz60+
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,936 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020