Thread: HIgh and low bits of an HEX value

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    37

    HIgh and low bits of an HEX value

    can anyone tell me how to get?

  2. #2
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    How do you input the Hex value? From a file/user? In what format?
    If it not from file/user or other IO, then it is in the memory. That means it is in binary format. If it is then it just characters.

  3. #3
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    first figure out which end is high and which end is low, then read a reference for bitwise operators.

  4. #4
    Weak. dra's Avatar
    Join Date
    Apr 2005
    Posts
    166
    Not sure what you mean, but if your values are stored in memory, then AND'ing will get you the desired effect.

    Code:
    //check if 8th bit is set
    if(randomValue & 0x80)
    { //do stuff }

  5. #5
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by punkywow View Post
    can anyone tell me how to get?
    How To Ask Questions The Smart Way
    That link contains info about how you'll "get" anything.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    37
    its a hex value from the memory its 4bytes long and i need the low and high part of it btw can u tell me to find refenreces about this?
    anyway isnt in each value a high and a low bit?

    any help welcome

    thnx


    @C_ntua:
    the value is directly from the ram if u wanna know

  7. #7
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    Quote Originally Posted by punkywow View Post
    its a hex value from the memory its 4bytes long and i need the low and high part of it btw can u tell me to find refenreces about this?
    anyway isnt in each value a high and a low bit?

    any help welcome

    thnx


    @C_ntua:
    the value is directly from the ram if u wanna know
    google is your friend.

    hey look at that, the top hit for "c++ bitwise operators" is a link on this very site!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ace high and low in card game
    By ninety3gd in forum C Programming
    Replies: 3
    Last Post: 05-10-2009, 08:16 PM
  2. C/C++, low or high level?
    By Sentral in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-23-2007, 11:43 PM
  3. what is the significance of low order and high order bits
    By Shadow12345 in forum Windows Programming
    Replies: 1
    Last Post: 11-16-2002, 11:46 AM
  4. high or low !
    By Beginner2002 in forum C Programming
    Replies: 3
    Last Post: 07-29-2002, 01:24 PM
  5. low value, high value and increment
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 11-25-2001, 09:01 AM