Thread: Hex Chars to Binary

  1. #1
    Registered User
    Join Date
    Oct 2005

    Hex Chars to Binary

    Alright, i have a problem here. somehow i need to exclusive or the decimal number 111 and the hex number F6E together. Both are stored as char arrays.

    I assume this means converting both values to binary values and then doing the operation, which is really where i am running into trouble. Also once i get the exclusive or value it needs to be converted back to a string of hex chars for use later.

    any help would be appreciated.

  2. #2

  3. #3
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    sscanf() to convert to binary and snprintf() to convert back to a string.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 03-24-2006, 11:26 AM
  2. Hex Chars to Binary (XOR Swap split)
    By fischerandom in forum C Programming
    Replies: 29
    Last Post: 11-26-2005, 07:13 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Is binary HEX?
    By Budgiekarl in forum Tech Board
    Replies: 11
    Last Post: 11-23-2003, 09:02 AM