Skip to content

Convert binary file to hex format

Nilesh Jagdale

Asked Apr 10, 2006, 1:34 AM EDT2 answers
Share
LinkedInX


Hi,
 I need to convert binary file to hex format.Can anyone guide me .
 Description-Just accept binary.dat file as input and convert each characher in binary file to hex format.
 Waiting for urgent reply.
 Thanx.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mike Gold
    +1
    not sure what you mean here.  Do you want to create a binary file to a ascii file containing hex representation of each byte?

    e.g.

    0xff 0x33 0xC0


    or

    ff  33 C0


    I think you need to be more specific about the question.

    -Mike G.
    (Microsoft MVP)
    +1
  • +1
    this code in my program,maybe can help you.
     long i = Convert.ToInt64(trackBar1.Value);
    string j = Convert.ToString(i, 2);//convert binary

    maybe you can try it.
    +1