Thread: Utility to Convert hex to binary

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    2

    Utility to Convert hex to binary

    Hi,
    I have the following format of data that I need to convert to binary(numerical value).

    0x1234 #00 comemnts for the data
    0x4569 #01
    0x5698 #02
    and so on. I just need to convert only this [0x1234 #00] part (ignore the comments) to binary and represent it as a numerical value.
    I need to write C code to do this.

    Thanks in advance.

  2. #2
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    Thanks for what? For reading your post and failing to find a question?

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    2
    I need to write a C code to convert(parse) the hex and decimal values to binary and write them to a file.

  4. #4
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    I know that. You've said that before. But where exactly is your problem?

    Hint: sscanf()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. convert char to binary???
    By chloe in forum C Programming
    Replies: 8
    Last Post: 09-24-2009, 12:31 PM
  2. hex to dec to binary
    By vijlak in forum C Programming
    Replies: 2
    Last Post: 10-26-2006, 09:38 AM
  3. hex and binary functions
    By 00Sven in forum C Programming
    Replies: 14
    Last Post: 02-25-2006, 11:36 AM
  4. Printing Hex as Binary
    By Mystic_Skies in forum C Programming
    Replies: 6
    Last Post: 11-22-2004, 04:18 PM
  5. Utility to see the file content in HEX Format.
    By mehuldoshi in forum C Programming
    Replies: 7
    Last Post: 07-30-2002, 10:42 PM