How to convert Binary Array to Hexadecimal Value in C Language

Discussion in 'C' started by pra84veen, Jul 13, 2009.

  1. pra84veen

    pra84veen New Member

    Joined:
    Jul 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hello friends, please help me..

    Iam having an char array Arr[16] having binary values Arr[0]=0, Arr[1]=0, Arr[2]=1.....Arr[15]=1.
    how to convert this array into the hexadecimal in C language only

    Please help me...
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    How far have you got and where are you stuck?
    We won't write the code for you but we will help you work it out.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Moved to C-C++ forum
     
  4. pra84veen

    pra84veen New Member

    Joined:
    Jul 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0

    Hello, i tried it out..i got it....thanks for ur concern...
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Well done! It's much better if you can figure stuff out for yourself than if you need to be shown it.
     
  6. night.rider

    night.rider New Member

    Joined:
    Jul 13, 2009
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    create and implement Logic..
    Location:
    somewhere
    do u want to convert whole array to hex or some combi of thar arr values..??
    it is easy it'll be worked out
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice