Conversion of binary string into headecimal

Ho will i convert binary string into hexadecimal fromat

HI,
Thanks but the above module is not present my system.
I have number which needs to be converted into binary first and then into Hex.
I have written it code for conversion of decimal number into Binary.But i am not able to convert it into Hex.
My rough code is ....
types : begin of t_temp,
        r1 type i,
        end of t_temp.
data : ty_temp type standard table of t_temp ,
       wa_temp type t_temp.
DATA : num TYPE i,
       temp1 TYPE string,
       temp2 TYPE string,
       temp3 TYPE string,
       temp4 TYPE x.
temp1 = 0.
temp2 = ''.
num = 64.
while num ne 1.
  temp1 = num MOD 2.
  num = num / 2.
  If temp1 = 1.
    num = num - 1.
  endif.
  concatenate temp1 temp2 into temp2 .
endwhile.
  temp1 = 1.
  concatenate temp1 temp2 into temp2 .
  condense temp2 no-gaps .
  WRITE : temp2 .

Similar Messages

  • Converting a binary string into a JPEG image in Crystal Reports 2008

    Hi Gang
    Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
    I have JPEG images stored in ECC.  ECC stores the data in binary format.
    Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data.  This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data.  Each line contains a maximum of 1,024 characters.
    When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table.  (in my case, 19 lines are displayed.)
    I created a formula to collect all the data into a single string.
    whileprintingrecords;
    stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
    I added the formula to the detail section and itu2019s doing a great job collecting the data.
    I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
    whileprintingrecords;
    stringvar data:=data;
    data
    My clever idea turned out to be a disappointment . . . . my picture object is blank.
    Does anyone have a solution for converting a binary string into a JPEG image?

    Save the JPEG in a format CR supports. Refer to the help file for the file types.

  • Convert binary string into binary array

    Dear I am looking for a way to convert my ten bit string array into 10 bit array.
    Any idea?

    Yes, but you need to tell us in more details what you have and what you want.
    There is no "10bit string", they come in integer multiples of 8 bits. Some possible interpretations:
    Maybe you have a 2 character string (16bits). Do you want the 10 low order bits?
    Maybe you have a 10 character formatted string of zeroes and ones, one character for each bit.
    Do you have a long string and every 10 consecutive bits are one 10bit number that you want as integer?
    Please clarify!
    There is no "10bit array". Do you want:
    a boolean array with 10 elements, one element per bit?
    An integer array if ones and zeroes?
    An array of U16, each element corresponding to 10bits of the original string?
    something else?
    It might help if you could attach a small example containing typical data. (make current values default before saving and attaching here).
    LabVIEW Champion . Do more with less code and in less time .

  • Converting a binary string to a number...

    Hi guys,
    I'm trying to convert a binary string into a decimal integer. I'm not sure if LabVIEW has a VI that does that. I haven't found one yet. Basically, say I have the string '0101'. I want to convert that to the value '5'. Or say I'm using hex, I want '10101111' to be converted to 'AF'. So that's my dilemma. I'm hoping I'm not going to have to make my own VI. Thanks a lot!
    -Mike

    LabVIEW has exactly what you want even if it can be hard to find it.
    To convert a binary text string like "0101" to a decimal value can easily be done using the Scan Value function found under the String/Number conversion section. If you provide the format %b to it (not mentioned in the manual) you will get the decimal value of your binary string.
    Also, on your front panel you can change the format of your numerical indicators by right clicking on it and selecting Format & Precision. If you have a numerical indicator you can set it do display the numbers in e.g. hexadecimal form.
    However, if you want to convert a number to a hexadecimal text string you can use the Number to Hexadecimal String function also found under the String/Number conversion section.
    I
    attached a simple example, Conversions.vi, that shows how it works. I hope this helps. /Mikael
    Attachments:
    conversions.vi ‏14 KB

  • Decoding binary strings from 10 bit A/D converter

    Hi all,
    I'm working on a project for school that requires me to take data from an A/D converter ( the A/D is on a Motorola HCS12 microcontroller) and send it to a PC running LABVIEW to decode the binary string into a numerical value.  The value will be plugged into an equation.  I planned on using the serial port on the PC for the comm port.  Are there any examples available or any advice to get me started in the right direction. 
    While I have programmed with LABVIEW in the past (academically) I am not proficient.  And this type of interfacing I have not done before, only GPIB.
    The A/D is 10 bit.  How quick LABVIEW decodes the binary string and returns a value is not important. 
    If any more info. is needed let me know.    

    Be confident. That should not be a big problem, since you'll get the help of the LV community
    The most difficult part will be to establish the communication with your micro-controler. But if you can do that with Windows hyperterminal, then you are nearly done ! There are examples of serial com in the examples shipped with LV.
    The string to decimal conversion will not be a problem, whatever the string format : the conversion is done using functions also shipped with LV.
    Hope to see you soon with more specific questions.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Binary data into photo

    hi,
        to all  am facing the problem in Conversion of binary data into photo in sap
    FFD8FFE000104A46494600010101006000600000FFDB004300080606070605080707070909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C20242E2720
    could you please help me in finding the solution for it. i will be very thankful and will be waiting for ur reply.
    thanks in advance.

    Hi Praveen,
    what is exactly  the problem? (dump, the output isn't right,..)
    what function are you using?
    Please be more specific in order we can help you.
    Regards!
    Andrez.

  • Conversion of Decimal to Binary String

    Hello Labview People:
    I'm rather new to Labview, so this may be a simple-minded question . . .
    I would like to take a numeric control and have the decimal input
    converted to a binary string of 8 bits. So, for example, if I were to
    put in the number '127', I would get out (on an indicator) the string:
    01111111
    The number '128' would show on the indicator as:
    10000000
    It seems to me that this should be simple, but somehow I cannot figure
    out how to do it. Must an array be built bit by bit to accomplish this?
    (I'm afraid I don't yet know how to build arrays.)
    Thanks in advance for any help you provide!
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    Or, you can go under the numeric function, and look for conversions, get
    decimal to byte array conversion.
    Then what you need to do is to get an array selection vi, and index to zero.
    I don't remember the exact name of the VI's because I don't have LabView
    here with me.
    Perhaps this complicates things
    Steven
    "Timo Miettunen" wrote in message
    news:[email protected]..
    > use format into string VI from string palette
    >
    > format string should be "%08b" for 8 bits, "%016b" for 16 bits etc.
    >
    > timo
    >
    > Ananda Dave wrote:
    > >
    > > Hello Labview People:
    > >
    > > I'm rather new to Labview, so this may be a simple-minded question . . .
    > >
    > > I would like to take a numeric control and have the decimal input
    > >
    converted to a binary string of 8 bits. So, for example, if I were to
    > > put in the number '127', I would get out (on an indicator) the string:
    > >
    > > 01111111
    > >
    > > The number '128' would show on the indicator as:
    > >
    > > 10000000
    > >
    > > It seems to me that this should be simple, but somehow I cannot figure
    > > out how to do it. Must an array be built bit by bit to accomplish this?
    > > (I'm afraid I don't yet know how to build arrays.)
    > >
    > > Thanks in advance for any help you provide!
    > >
    > > Sent via Deja.com http://www.deja.com/
    > > Before you buy.
    >
    > --
    > -------------------------------------------------
    > Timo Miettunen
    >
    > Fincitec Oy Production Department
    > e-mail: [email protected]
    > Address:
    > Lumikontie 2 Tel: +358-16-2151245
    > PO BOX 11 Fax: +358-16-221561
    > FIN-94600 KEMI Finland
    > -------------------------------------------------

  • How can I convert a U32 array into binary string?

    Hi
    I would like to find an efficient way to convert an array of 8192 U32 into a single binary string!!!
    the solution below  last 550 ms on an RT target to convert 8192 U32.
    The same code running on Labview (not RT) last 100ms. I don't understand why there is such a difference.
    I've tryed to replace the inner loop and convert by a format string whith U32 on entry and %032b as parameter but it lasted same time.
    Thanks a lot

    Your picture of your code didn't come through. You can't link to a picture that's on your computer, as a server on the internet cannot access your computer to display the picture for others to see. You have to upload the picture as an attachment. Then, if you want to actually display the picture in the message you have to edit your post, insert a picture, and when it asks for the URL you enter the URL of the picture. You can get the URL when viewing the message, as the link is within the message itself.
    As for your question, can you just use the TypeCast function?

  • Best way to put binary-data into string?

    Hi there!
    What I want to do is to transfer binary data via HTTP/GET so what I have to do is to transfer binary data into a string.
    Currently I do this the follwing way:
          byte[] rawSecData = new byte[4]; //any binary datas
          ByteArrayOutputStream secBOS = new ByteArrayOutputStream(4);
          DataOutputStream secDOS = new DataOutputStream(secBOS);
          for(int i=0; i < rawSecData.length; i++)
            secDOS.writeByte(rawSecData);
    secDOS.flush();
    String secData = secBOS.toString();
    System.err.println("Lenght of resulting String: "+secData.length());
    I know that this way already worked fine, however I now set up my system up again with another linux-distro and now strange things happen.
    e.g. the secData string differs in lenght from run-to-run between 2 and 4 and I don know at all why?
    Transferring the binary-stuff into string-stuff (e.g. short-binary 255 255, String: 65536) is not possible for me because of various reasons.
    The funny thing is that I remeber that this already worked some time ago and I can figure out why it now doesnt...
    Please help!

    First of all thanks a lot for your help!
    Yes, I already think its an encoding problem, but how can I specify the encoding in my application in a portable way. I dont have an idea what to do.
    My applikation should run as applet on many different 1.1+ VMS (msjvm, netscape-1.1.5, ...).
    Thanks again, lg Clemens

  • Conversion of string into date????????????

    Can anyone tell how to convert a String into date??
    if the string is in the format "Thu Mar 25 17:11:34 GMT+05:30 2004"
    i have converted it. code is
    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM d yyyy HH:mm:ss");
         dateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
    Date date = null;
    try
              //date = dateFormat.parse(new Date().toString());
              date = dateFormat.parse(dateLine);
         catch(ParseException ex)
    but i am not able to specify the year.
    so when i getYear on the new Date it return 1970.

    @duffymo, I'm pretty sure "d" is good for a two digit date, "dd" gives you zero-padding.
    The problem, presumably, is that the format string "EEE MMM d yyyy HH:mm:ss" does not match the actual format "Thu Mar 25 17:11:34 GMT+05:30 2004".
    The correct format string would be "EEE MMM d HH:mm:ss z yyyy"

  • HELP Conversion of string into SOAPMessage/SOAPPart

    I'm trying to convert a soap message that is stored in a String into a SOAPPart object, but I have some troubles.
    I thought this (code below) should work, but it gives a java.lang.ClassCastException at org.apache.axis.utils.XMLUtils.sourceToInputSource(XMLUtils.java:651)
    Can anyone help me, please??? Isn't there an easier way to convert a String into a SOAPPart?
    SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();
    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage message = factory.createMessage();
    SOAPPart soapPart = message.getSOAPPart();
    String input = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"......... etc
    DOMParser domParser = new DOMParser();
    Reader read = new StringReader(input);
    InputSource in = new InputSource();
    in.setCharacterStream(read);
    domParser.parse(in);
    Document doc = domParser.getDocument();
    DOMSource domSource = new DOMSource(doc);
    soapPart.setContent(domSource);                

    Why would you want to convert a String into a SOAPPart ?

  • Conversion of binary to number

    Hello,
    I have a signal conditioner controlled through serial communication with ASCII commands. Once the start command is received, there is a continuous stream of offset binary data sent and read through the serial Read Indicator. The manual informs me that I must first condition the offset binary values by subtracting 2048 from the raw values to produce a 2's complement value,  it also mentions that the data is encoded in 12 bits so negative numbers must be properly sign extended to move the data into 16 bit words used by the PC. I am not familiar with binary numbers and am unsure on where to start. If someone could provide some insight and suggestions on what my first step would be to converting the binary values into number format, that would be greatly appreciated.
    Thank you in advance,
    Jena

    That won't work because he's not receiving the string the way you think it is. The hex display is an interpretation of the underlying byte values. It is not the same as number written out in hex as a string. Your conversion assumes he's getting the character 1, followed by the character 8, followed by the character 0, followed by the character 0, followed by a space character.
    The simplest way is to use the Type Cast function, 'cause that's what it's there for. Wire in an array of the datatype you want. The thing to keep in mind is that even though the data may be fundamentally 12 bits you need to deal with multiples of 8 because a serial read will read bytes, not bits. Thus, you can convert your string to an array of I16 numbers like this:
    Message Edited by smercurio_fc on 04-08-2008 01:07 PM
    Attachments:
    Example_VI_BD2.png ‏2 KB

  • Converting a Hexadecimal String to a Binary String

    Hello NG,
    I would like to convert an 8 Bit Hexadecimal String (example C0034000)
    to it´s equivalent in binary (in this case---> 1100 0000 0000 0011...
    and so on), I didn´t find any possible way to do this. I´am not
    talking about the simple representation on the front pannel. Some
    Postings say that this ist possible with the "Format Value" Function
    adding an "%b" to the entring, but in my case it does not function.
    Could someone help me, thanks in advance!

    > I would like to convert an 8 Bit Hexadecimal String (example C0034000)
    > to it´s equivalent in binary (in this case---> 1100 0000 0000 0011...
    > and so on), I didn´t find any possible way to do this. I´am not
    > talking about the simple representation on the front pannel. Some
    > Postings say that this ist possible with the "Format Value" Function
    > adding an "%b" to the entring, but in my case it does not function.
    The task here is to convert a string to a different string. The easiest
    way to do this is to convert the string to a numer, then format the
    number as a binary string.
    On the string palette the Scan from String using %x can be used to
    change a hex string into a numeric integer. The Format to String with
    %b and other nodes can take a numeric i
    nteger and return a string of
    binary characters. These two nodes wired together with the correct
    constants should do what you want.
    Greg McKaskle

  • Loading Labview Binary Data into Matlab

    This post explains the Labview binary data format. I couldn't find all of this information in any one place so this ought to help anyone in the future.  I didn't want to add any overhead in Labview so I did all of my conversion in Matlab.
    The Labview VI "Write to Binary File" writes data to a file in a linear format using Big Endian numbers of the type wired into the "Write to Binary File" VI. The array dimensions are listed before the actual array data. 
    fid = fopen('BinaryData.bin','r','ieee-be'); % Open the binary file
    Dim1 = fread(fid,4); % Reads the first dimension
    Dim2 = fread(fid,4); % Reads the second dimension
    Dim3 = ...
    Each dimension's length is specified by 4 bytes. Each increment of the first, second, third, and fourth byte represent 2^32, 2^16, 2^8, and 1 respectively. 0 0 2 38 equates to 2*256 + 38 = 550 values for that particular dimension.
    As long as you know the number of dimensions and precision of your binary data you can load it.
    Data = fread(fid,prod([Dim1 Dim2 Dim3]),'double',0,'ieee-be'); % Load double precision data
    If you have appended multiple arrays to the same file in Labview you would repeat this procedure. Load each dimension then load the data, repeat.
    Data = fread(fid,prod([Dim1 Dim2 Dim3]),'int8',0,'ieee-be'); % Load int8 precision data or boolean data
    I had to create a function for my own purposes so I thought I'd share it with everyone else too.  I uploaded it to the Matlab File Exchange.  The file is named labviewload.m.
    This was tested on Matlab R2007a and Labview 8.2.

    Thanks. I have the same questions as I tried to load labview binary data into Matlab. 
    -John

  • Convert Binary Data into Pdf & send it as attachment in a mail

    Hi Friends,
    Scenario :
    The interactive form saved in WebDynpro Application is sent to R/3 in binary format. It has to be converted into pdf and sent it as an attachment in mail to the respective person.
    Kindly help on these issues :
    1. How to receive the binary data in R/3 sent by the WebDynpro Application ?
    2. How do i convert the received binary data into pdf ?
    Regards & Thanks,
    Bharath Kaushik Krishnan

    Check thread Data Conversion
    if it is useful for you.

Maybe you are looking for

  • Strange box appears

    Wherever I put my cursor in any DW page, design, split, or code presentation, a strange little box appears near the cursor and only goes away when I click the cursor in another place on the page and this it reappears within about 2 seconds. I had tro

  • 10 customer and 10 employed sales

    Hi experts, I would like sorting 1. consumer sales and 2. employed sales only for the 10 best every day how to make a query, because the existing Query Engadget incompatible with the existing results on the sales analysis SELECT top 10 T0.Cardcode,ma

  • Oracle Planning gives error when trying to open application from Workspace.

    Hello, We have version 11.2.2.0.0 of Planning installed. After the install of Essbase Studio Server we have hit some issues where Planning does not seem to be available. Despite re-deploying several times and other things, we cannot connect to the Pl

  • TS2755 Imessaging app is hung and application closes. large message in queue.  Restarted didn't help.

    My kids were emoji bombing each other with iMessage.  now application is hung up.  Tried closing it, restart phone, turn on and off I messaging and Sms messaging in settings.  Deleted photos to make more room.., I just have a blank screen in message

  • Blackberry model difference​s

    Hi All, Can anybody explain me are there any differences why linphone sources can be applied only on Bold models. Because when I use them with simulators then they also run in other models. Regards, Arsen