How to convert fractional decimal number to hex number?

Hi,
Can any one help me to convert the fractional decimal number to its equivalent hex number and vice versa ?
if u have any code please share.
thanks
neethu

neethukk wrote:
Can any one help me to convert the fractional decimal number to its equivalent hex number and vice versa ?
if u have any code please share.
This question is not clear at all.
"Fractional decimal" is not a data type, but a way of formatting in readable form using numeric characters and a decimal separator.
Same to "hex number", but only for integers.
What do you mean by "convert"? Do you want to keep the value the same or retain the bit pattern of the numeric data type?
Hexadecimal is for integers. Are you talking about fixed point?
We clearly need significantly more information. What are the input and output data types? What are you actually trying to do?
Do you have an example input and corresponding output?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to convet a decimal number of in to base 64.

    Hi friends,
    my requirement is how to convet a decimal number of in to base 64.
    ex:decimal number could be any type 1,1.2,-1,-1.2 etc
    i found an API Base64.java but iam not able to use .
    Please Help me out.

    try this
    Typecast your array of integers to Byte[] and use method byteArrayToBase64() as:
    String encodeArray = Base64.byteArrayToBase64( new byte[]{ 3, 34, 116, 9 } );Also, browse the below link for more details
    http://kickjava.com/src/java/util/prefs/Base64.java.htm
    Message was edited by:
    Mayank_03

  • How to convert exponent to number format

    Hi,
    how to convert exponent to number format.My column is in number and the data is in exponent format .for example  data is 2.44705130197009E18 .when i do field name haveing this data like
    select * from table name where filed name =2.44705130197009E18 ,field name  is of number (20) data type .but i am not getting any data fectched .
    your advice is at most appriciated .
    Regards,
    Suja

    Example of what I was saying...
    SQL> create table myexp (name number);
    Table created.
    SQL> insert into myexp values (2447051301970090001);
    1 row created.
    SQL> select name from myexp;
          NAME
    2.4471E+18
    SQL> col name format 9999999999999999999999999999999999999
    SQL> select name from myexp;
                                      NAME
                       2447051301970090001
    SQL>
    The number you are seeing as an exponent is not just the number that is stored with lots of 0's on it, there's other information you are missing, so you need to change your format to see the true value.

  • Do anyone know how to convert a decimal to binary, 1 into 01

    do anyone know how to convert a decimal to binary
    i wants to convert 1 into 01, but the computer print out 1, it didn't print 0
    also 0 it also print only 0, and 3 it print11
    so decimal of 3, the computer print correct, but 0 and 1 it print wrong
    how can i print 01 if my decimal is 1
    int a=1;
    System.out.print(Integer.toBinaryString(a));
    can anyone help me solve this question
    and
    you can use java or jsp
    if you can use jsp it would be better, if not use java

    it's not printing anything 'wrong'.
    0 in binary is 0
    1 in binary is 1
    All it's doing is cutting off leading zeros since they don't change the value.
    1 is the same as 01 is the same as 00000001...no difference
    Similarly, when you print decimal 3 as 11, it could just as easily say 00000011 and be correct, since the zeros don't change anything.

  • How to convert raw to number in oracle 8

    Does anyone know how to convert a raw data to number format ???
    If i do: select dump(50,16) from dual, it will return bytes c1 33.
    With this bytes in a raw variable, how can i convert it to a number variable in Oracle 8.
    PS: Oracle 8 doesn't have utl_raw.cast_to_number function...
    Thanx.

    Thanx for help... But...
    This examples are very usefull, but only converts a value in HEX to number.
    In my case, i need a routine that convert the bytes of value 50 (i.e. 2 bytes -> C1 33) into a number variable. If i only use hex to number, will return wrong value. I need to convert this bytes (C1 33) into original number, i mean, value 50.
    Using dump function for 50, will return C1 33...
    How can i make to convert C1 33 back to value 50??
    I think that is the same of the utl_raw.cast_to_number, but i'm using Oracle 8, and this function is in Oracle 9...
    Anyone have idea ??

  • How to convert workflow template number into transation code?

    Hi Experts,
    We are using WS20000081 Leave request workflow in SAP 4.7.I created one customized workflow according to the client requirement.How can i convert WS99900009 into Transaction?
    I created one absence type with workflow template WS99900009.While applying a leave it is showing the erroe as "WS99900009 is unknown" .
    Please help me to resolve this problem.
    Thanks,
    Hemalatha

    Hi Arun
    WS20000081  and WS04200009 are triggering  when i applied a leave.But i need to add some amore task in that.For that i created the Customized workflow.Then we tried to create Rule groups with custom workflow id number in ESS settiongs.It was saying that ws99900009 is unknown.And we tried to replace the WS20000081 by ws99900009.It was alos saying that ws99900009 transaction is unknown.
    So pls guide me how to convert ws99900009 into transaction?
    Thanks in advance
    Regards,
    Hemalatha

  • How to convert date to number

    Hai
    How to convert the given date into number.
    Thanks & regards
    srikkanth.M

    Look at these posts
    Please help me in Converting Lilian Format to Date
    converstion to date
    and try something like this.
    SELECT sysdate,sysdate-to_date('15-10-1582','DD-MM-YYYY') lilian_dt FROM dual;

  • How to convert an int number to a byte array, and how to convert back?

    Hello, everybody,
    Just as the topic, if I have an int number(which should have 32-bit, or 4-byte), how can I convert it into a byte array. And also, how to convert it back.
    Thank you in advance!

    Alternatively you can use ByteBuffers to do this work for you
    // to a Byte Array
    int originalInt =...;
    ByteBuffer myBuffer = ByteBuffer.allocate(4);
    myBuffer.putInt( originalInt );
    byte myArray[] = myBuffer.array();
    // and back to an int
    ByteBuffer myOtherBuffer = ByteBuffer.wrap(myArray);
    int finalInt = myOtherBuffer.getInt();

  • How to get a decimal number from three single byte numbers

    i'am in a difficult situation. I have motor which provides me the number of steps moved as three numbers of length one byte.I 'am attaching the program with this message. Here the commands from index 2-4 outputs will provide the number of steps moved. But these are numbers with a single byte length(<256). So how can I get the corresponding decimal number from these three single byte length numbers. please reply
    Attachments:
    stop2.vi ‏11 KB

    Without knowing what motor you are using, I'm guessing that you probably need to use the Join Numbers to combine the bytes into a U32.  The other option is to use the Type Cast function.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Regarding Converting the Decimal number into rounded value...

    Hi,
       i have a decimal number as "   58240990.00 " , i wanted this to rounded value .
      for example I am expecting to see 58241 for the above number.
      shell we can do in any way.. if so please let me knw fast.. it is urgent..
      thanks in advance.
    thanks,
    Suresh..

    Dear Suresh,
    Go through the following code chunk:
    DATA : p TYPE p DECIMALS 2 VALUE '2.49'.
    DATA i TYPE i.
    i = CEIL( p ).
    WRITE : i.
    Regards,
    Abir
    Don't forget to award Points *

  • How to convert a large number to hex without truncating to 32-bit.

     I am trying to convert a very large number to hexadecimal (string). The number gets truncated to 32-bit, which is not what I want. For example, the number 28037546508295 (double) should be 0x198000000007. Labview truncates it and the resulting string is 0x7FFFFFFF, using Number To Hex String.vi. I am stuck. Thanks.
    Solved!
    Go to Solution.

    You can split your dbl into two 32bit integers using quotient&remainder (divide by 2^32 followed by "toU32").
    Now format each with %032x and concatenate the strings.
    Remove leading zeroes if needed.
    (Sorry, posting via phone. I can show an example later)
    LabVIEW Champion . Do more with less code and in less time .

  • Converting to decimal number

    Hi to all,
    I am diplaying data from the DataControl on a page, these data is numbers and are shown as:
    number1: 12.154
    number2: 125.25
    number3: 1.254
    as seen with a decimal point, are not aligned and with more than two decimal numbers.
    How can I make show like this?
    number1: 12,15
    number2: 125,25
    number3: 1,25
    numbers with decimal comma, aligned and only two decimal numbers. I saw that this is possible using UI Hints,but I can not get it, someone can help me?

    krd12 wrote:
    I am trying to convert a string with a lot of digits (ex 324.41897635) into a number and want to get back the same precision in the number as in the string. I tried the "Decimal String to Number" (get back no digits after decimal point ex 324) and "Frac/Exp String to Number" (get back three decimal places rounded ex 324.419) 
    Not a trivial exercise!
    Here is 1 possible solution I've limited it to non-trivial digits (ext floats are only 15 digits precise on some OS's.)  But you can see the steps necessary.  I assume the radix symbol is "." but the vi could be modified to use"System Decimal Seperator"
    Jeff
    Attachments:
    Max Str-Ext.vi ‏11 KB

  • How to convert DBSequence to Number

    my case is
    i can not convert DBSequence (id) primary key to Number
    public String confirm()
    AttributeBinding id = (AttributeBinding)getBindings().getControlBinding("Id");
    AttributeBinding emp_id = (AttributeBinding)getBindings().getControlBinding("emp_id");
    Number confirm_id = (Number)id.getInputValue();
    emp_id .setInputValue(confirm_id );
    return null;
    }

    sorry but it does not work correctly
    1- i already got(read) id from the binding by
    AttributeBinding id = (AttributeBinding)getBindings().getControlBinding("Id"); -------> "Id is of type sequence"
    2- i got emp_id
    AttributeBinding emp_id = (AttributeBinding)getBindings().getControlBinding("EmpId");--------> "EmpId is of type Number"
    3- i want assign id to EmpId so i should read value of id
    Number confirm_id = (Number)id.getInputValue();
    4- finally i want assign confirm_id to emp_id
    emp_id .setInputValue(confirm_id );
    the problem is in step 3 because id is not Number and when i try to read another attribute instead of id (phone_no for example )
    it work correctly becuase the phone number is of type Number.
    so how can i assign id of type sequence to emp_id of type Number !!!

  • How to convert varchar2 to number '123,234,345')

    Hey
    I have a
    v_string : '1,2,3';
    I want use it in sql like:
    select * from test where numbers in (v_string)How can I convert this string do numbers?

    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:210612357425
    http://tkyte.blogspot.com/2006/06/varying-in-lists.html

  • How to convert an exponential number into a simple double number

    in my database there is a value, say, 15958885 and what i am getting in my java class is 1.5958885E7 now the problem is that i want to display this value without this exponential form, please help me for this as I am not getting how to do it

    please tell me if you have any other solution for
    this. well i am ok with the solution i got but sill
    if you have something.The first response (by Kaj) told you exactly how this is done in Java. Just in case you missed it, you use the java.text.DecimalFormat class. Go read the Javadoc.

Maybe you are looking for

  • Difference between void and null?

    wht is da difference between void and null w.r.t java?

  • Upgrading from Powerbook to MacBookPro

    Hi! I have ordered a new MacBook Pro wish is replacing my Powerbook G4. Is there som fast way to get started with my new MacBookPro? Can I use Carbon Copy Cloner to clone my old and new computer?

  • How do I download a newer itunes?

    I'm running OS 10.4.11 and currently have iTunes version 9.0.2 installed. I got an Ipod Touch witch requires Itunes 10.3 witch doesn't seem to work on the mac Os x i have. What can I do? thank you

  • CD Drive won't open; can't eject from Finder.

    I'm fairly new to Macs, and I placed a CD-R into my drive which won't load up. The disk image is on the desktop, but when I open it up, my Finder freezes. I've also tried using the keyboard eject button, and dragging the disk image into the trash, bu

  • Odd little problem

    So I've been rebuilding my itunes library, trying to get rid of the doubles out of it, and for some strange reason I'll search in the music folder, and can't find an album, but I will search a playlist... and find it there. Why is that?