Re: hex to binary and extract sequence of bits



Hello

thanks for the answers. I think I have to explain myself a bit more clearly.
I am tapping the read display input of the CAN-SendandReceive.vi which shows for example the following string (ASCII I assume) :
3C0118D0  8  00 00 12 12
where the first eight characters are the hex display of a message ID
consisting of 32 bits. My problem is that I have to extract out of
these characters a sequence of bits which are not aligned to the hex
boundaries, i.e. bit 3 to 13.  So what has to happen is that each
of the eight ASCII characters, representing a hex value, has to be
converted into binary value, out of which I can extract the bit I need.
However, the binary representation has to be that of the hex value, not
the ASCII code, meaning for example that the "C" in the string has to
be converted into "1100" (hex to binary) and not "0100 0001" (ASCII
code binary) .

Hope that helps to get a solution.
.



Relevant Pages

  • Re: Can connect to router but not internet!
    ... Hex is 0-9 and A thru F only. ... must be exactly 10 characters long for WEP64, ... I recently switched it to a 128-bit WEP because my ... Use the 26 character Hex WEP key instead of the 13 character ASCII WEP ...
    (alt.internet.wireless)
  • Re: writing hex to file
    ... Well, if you want it to display as an "L" in anASCII-based text editor, ... there darned well has to be an ASCII "L" written to the file. ... way to convert character Hex data into the corresponding ASCII ... convert the hex characters into integer values. ...
    (comp.lang.fortran)
  • Re: New laptop, having trouble with WiFi
    ... instead of the ASCII version. ... Hex always works. ... characters long, ... Jeff Liebermann jeffl@xxxxxxxxxxxxxxxxxxxxxx ...
    (alt.internet.wireless)
  • Re: writing hex to file
    ... Well, if you want it to display as an "L" in anASCII-based text editor, ... there darned well has to be an ASCII "L" written to the file. ... way to convert character Hex data into the corresponding ASCII ... convert the hex characters into integer values. ...
    (comp.lang.fortran)
  • Re: Fw: Hex to Decimal Conversion in COBOL
    ... I don't know why a COBOL source solution is absolute- ... the "abcde" string would be replaced by the entire 255 hex ... in unprintable characters also. ...
    (bit.listserv.ibm-main)