Number to a binary base number

How can I convert a numeric data to a binary base number?
Ex.: A into 0001010
Thank you in advance

OK, only conversion to a string is needed to solve the problem. (Everything else is just a cosmetic feature of the indicator where you set the formatting. This does not change the underlying data.)
Just use "format into string" with a format code of "%07b" (=show seven binary digits and pad with zeroes to the left).
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

  • Convert any base number to decimal

    Is there a way to convert any number of base 2-16 into decimal?
    The numbers can be input using scanner
    Anyone has any code for this?

    Hey, guys this is what I got so far for this. But, of course there are issues
    1. I'm not sure how to show "invalid" message if a character or floating point number is entered
    2. I'm not sure about the code that will only allow the relevant numbers to be entered for each base.
    E.g - If base = 2 then number == 1 || 0
    This has to be repeated for all allowed base from 2-16
    Please help!!!
    import java.util.Scanner;
    public class BaseConverter {
    public static void main(String[] args) {
    int base;
    String number;
    Scanner scanner = new Scanner(System.in);
    System.out.print("Enter base value (Integer between 2 to 16): ");
    base = scanner.nextInt();
    if (base < 2 || base > 16) {                     // how to get same invalid message for character or float (e.g. -12.2)
    System.out.println("Invalid base. Please retry");
    return;
    System.out.print("Enter the number in base : ");
    number = scanner.next();
    if (scanner.hasNext()) {           // not sure how to validate in relation to entered base
    } else {
    System.out.println("Invalid number. Please retry");
    return;
    int decimalValue = 0;
    int step = 0;
    for (int i = number.length() - 1; i >= 0; i--) {
    char c = number.charAt(i);
    int cValue = Character.digit(c, base);
    decimalValue = decimalValue + (cValue * (int) Math.pow(base, step));
    step = step + 1;
    System.out.println("Decimal value: " + decimalValue);
    }

  • Binary or number string

    Hi...
    How can I know if a string is a binary or number?
    thank you.

    You can only test for a String not containing a binary number like this..
    boolean isNotBinary = ( someString.indexOf( "0" ) == -1 && someString.indexOf( "1 ) == -1 );As a number can be anything with "-012345678eE." and has to adhere to a specific format to qualify as a number AND the fact that the radix makes everything ambiguous determining if a String contains a number and is binary becomes horribly complicated.
    Your definition of number needs to be more tightly defined, integer/long, float/double, fixed decimal and integer/long numbers with different radix need to be considered before you can test for numberness.

  • Number of detail lines base on qty required

    Hi Forum,
    I have a Picking sheet form that i need to print detail lines base on the qty required.  I need to print serial numbers based on the Qty.
    i.e..
    Qty required = 3
    i need to print:
    Serial #: ____________
    Serial #: ____________
    Serial #: ____________
    Is there any magic that someone can advised me to do?
    Regards,
    Manuel Roman

    Did it and i got a message:
    "Failed to retrieve data from database"...
    Here is the code:
    DECLARE @WorkOrder int, @Quantity int
    SET @WorkOrder =  '{?DocNum}'
    SELECT @Quantity = MAX(WOR1.PlannedQty)
         FROM "Lewa_0825a"."dbo"."WOR1"
         WHERE WOR1.DocEntry IN (
              SELECT OWOR.DocEntry
              FROM "Lewa_0825a"."dbo"."OWOR"
              WHERE OWOR.DocNum = @WorkOrder)
    IF object_id('tempdb..#Temp') IS NOT NULL
    BEGIN
       DROP TABLE #Temp
    END
    CREATE TABLE #Temp (Number int)
    INSERT INTO #Temp (Number) Values (1)
    WHILE (SELECT MAX(Number) FROM #Temp) < @Quantity
    BEGIN
         INSERT INTO #Temp (Number) (SELECT MAX(Number) + 1 FROM #Temp)
    END
    SELECT
    "OITM"."ItemName",
    "OWOR"."PlannedQty",
    "OWOR"."DueDate",
    "OWOR"."OriginNum",
    "OWOR"."DocNum",
    "OITM_wor1"."ManSerNum",
    "WOR1"."ItemCode",
    "OITM_wor1"."ItemName",
    "WOR1"."PlannedQty",
    "OITM_wor1"."InvntryUom",
    "OWOR"."Uom",
    "OCRD"."CardName",
    "OWOR"."ItemCode",
    "OITW"."U_StkLoc",
    "Command"."Serial"
    FROM "Lewa_0825a"."dbo"."OWOR" "OWOR"
    INNER JOIN "Lewa_0825a"."dbo"."WOR1" "WOR1" ON "OWOR"."DocEntry"="WOR1"."DocEntry"
    INNER JOIN "Lewa_0825a"."dbo"."OITM" "OITM" ON "OWOR"."ItemCode"="OITM"."ItemCode"
    LEFT OUTER JOIN "Lewa_0825a"."dbo"."OCRD" "OCRD" ON "OWOR"."CardCode"="OCRD"."CardCode"
    LEFT OUTER JOIN "Lewa_0825a"."dbo"."OITM" "OITM_wor1" ON "WOR1"."ItemCode"="OITM_wor1"."ItemCode"
    LEFT OUTER JOIN "Lewa_0825a"."dbo"."OITW" "OITW" ON ("WOR1"."ItemCode"="OITW"."ItemCode")
            AND ("WOR1"."wareHouse"="OITW"."WhsCode")
    LEFT OUTER JOIN (
         SELECT Number, 'Serial #: ___________________________' AS Serial FROM #Temp) AS Command
            ON WOR1.PlannedQty >= Command.Number
    WHERE "OWOR"."DocNum" = @WorkOrder
    ORDER BY "OWOR"."DocNum"
    Regards,
    Manuel

  • Number conversion to binary

    Hello,
    Oracle Info:
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 – Production
    OS Info:
    Microsoft Windows XP Professional Version 2002
    Service Pack 1
    Is there any PL/SQL code, by which we can convert numbers to its binary representation? Numbers can be something like these:
    25,2008,-25,-2008,25.23,-25.23,2008.0701,-1715.1253 etc. (any number value)
    Thanks & Regards
    Girish

    Sir, thanks for your compliments.
    There is no limit for bit selection. If the number
    fits in 8 bit then result should be in 8 bit
    representation otherwise more required bits would be
    there.Ok, consider I show you two binary numbers...
    11001101
    and
    1001010010
    Which one is positive and which one is negative?
    Without stipulating the number of bits you are working with nobody can tell. This is a key requirement of working with postitive and negative integers.
    As an example bring up Micro$ofts calculator in windows and ensure you have it set to scientific mode. Enter a simple negative number in decimal e.g. -5 and then click on the Bin radio button and look at the result...
    1111111111111111111111111111111111111111111111111111111111111011
    This is because Microsoft have stipulated that they are using 64 bit numbers, they don't just put 1011 or 11011 or 111011; all of which could be -5 but you can't be sure.
    Suppose, I have created a table having 2
    columns; first column will carry number value and
    another column will carry binary representation
    varchar2(4000) length. I am trying for this just for
    increase PL/SQL programming skills and computer
    fundamentals as well.Well as you know the 2's complement of negative numbers you should easily be able to write some SQL and/or PL/SQL that can give a string representation of the binary +ve and -ve number.
    You're decimal numbers will be more difficult to represent as you need to determine if you are just going to use a binary representation of the number to the left and right of the decimal point and show that as binary with a decimal point in the equivalent place or whether you are going to reserve the lower X number of bits for the number to the right of the decimal point, or are you going to represent the whole number as a binary integer and store additional information giving the position of the decimal point (i.e. how much to divide by 10 is required)
    Your choice.

  • Serial number in CRM installed base

    How do I insert a serial number in a CRM installed base record?  We will not be downloading this information from ECC so it begins in CRM.  The serial number does not currently reside in SAP but is part of historical data.  Therefore, we need the ability to enter a number in the installed base record that did not previously come from ECC.
    Thanks!

    I have created the set types and attributes and assigned them to the material types FERT and HALB.  But, I am still not clear on where the attributes (serial number) are maintained.  There is only one field in the material master for a product and as we know, there are many serial numbers per product. Where are they maintained?
    I am trying to create an installed base record and record the serial number in the individual objects view.  The problem I have is that if I create 2 IB records and use the same object ID (material number), the system wants to delete it from the first IB record to insert it in the second record.  This is not what I need. 
    Questions:
    1) Is the Equipment record (from ECC) created as an individual object using the Product Maintenence functionality?  Each new piece of equipment is a new master data record created by COMMPR01?
    2) If it is not, how would the serial number that is unique to each install base (but not unique across a material number) be recorded? 
    Thanks!

  • Excise No. using  Accounting Document Number and the P.O. number

    Hi All ! In my GL report, I'm displaying the Accounting Document Number and the P.O. number.
    Now, the requirement is to display the excise no..
    Tried different tables in SE11 using J_1EXC for excise detials, but to no avail.
    And last which vendor to pick, Because vendors in P.O and BSEG differs.
    If I use the BSEG-BELNR I get a different vendor & If I use the P.O. no. in EKKO then also I get a different vendor.
    Please suggest.

    Hi,
    Actually the vendor in the accounting document and PO should match. If not look in table EKBE, It will have the accounting document or at least the invoice receipt against which accounting document would have been created. Check if the vendor number matches with the invoice receipt.
    Regarding the excise number I'm not sure what you mean, If you mean excise invoice number, you can look at the J_1IEXCDTL
    J_1IEXCHDR tables. You could check with FC on what basis the document is getting created to make out the relation ship. If it is vendor excise no etc. you can hit F1 help to find out the table etc.
    Hope it helps.
    Sujay

  • Error during GR posting. "Serial Number management only allows whole number

    Dear Gurus,
    Need your help regarding the error encountered during MIGO. Error M7172 "Serial Number management only allows whole number"
    Based from the PO posted, Matl X has 50ea order quantity, however, the material master is maintained with a Base unit of OZ,
    with this, conversion has been added to convert the EA --> OZ. and result will be 0.531OZ for the PO Qty in SKU.
    Known that decimal places is not possible in conjunction to Serial Number Management.
    May I just confirm if there could be settings that can be configured, so as to allow decimal values be used and assign serial number. Or is serial number should just be assigned per unit (meaning 1:1, one serial number per 1 whole value of uom)?
    Thank you.
    Bea

    You can not maintain Decimal values for Serial Numbers..

  • How to config to Time Recording ID Number are the same Personnel Number?

    Dear all,
    My schedule is Time Recording ID Number are the same Personnel Number. So Please hepl me config to Time Recording ID Number are the same Personnel Number. 
    Thank for your help.
    Huyen Nguyen

    Hi,
    The time recording ID is the link between your personnel number in SAP and the time data captured by a swipe card.
    When card is swiped on the terminal..the machine notes the timings, clock types, door ID, Card ID, etc.
    The system identifies the personnel in SAP on the basis of the ID number which will also be there on the swipe card.
    There isn't any config to maintain the ID in IT0050. Just maintain this value in IT0050 as any number, personnel number say, and use the same value while configuring data transfer frm recording machine to SAP via RFC.
    Hope this helps.
    Regards,
    Shreyasi.

  • Report for Asset number and its Purahcse order number

    Hello Friends,
    Please give me details of report for Asset number and its Purchase order number .
    Regards
    Nilesh Vakil

    hi,
    GO to ME2N...
    use SHIFT + F4..
    there check for the acc. assign cata. field and input the asset  and execute..
    Regards
    Priyanka.P

  • P.O number for a billing document number

    Hi Experts,
    From  which table we can find a PO number for corresponding billing document number(VF03)?

    hi RAVI,
    Go to T.code SE16
      enter table name VBRK-->enter
       billing doc type,billing doc no,s.org,d.channel
      execute
    waiting for reward points
    mcm

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • Error when determining a number from object BI_TSDTEL and number 01

    Hi BW Experts,
    After Transporting Infosources (Master & Transaction) to BW QA, the transfer rules were not getting activated in QA. The following error message was diaplyed.
    "Error when determining a number from object BI_TSDTEL and number 01
    Object name can only contain characters from syntactical character set
    Object name can only contain characters from syntactical character set
    Data element for InfoObject KOKRS 0CO_AREA could not be created
    Data element for InfoObject KOKRS 0CO_AREA could not be created
    Transfer structure 0IM_FA_IQ_2_SB activated under the name 0IM_FA_IQ_2_SA
    It is not necessary to copy dependent objects for transfer structure 0IM_FA_IQ_2_SA
    Transfer structure 0IM_FA_IQ_2_SA does not exist
    Error RSAR 440 when handling objects with type R3TR ISTS."
    I have gone through the Note: 674818.
    Could someone clear me about BI_TSDTEl, By using this do we need to maintain object intervals manually in all the systems like BW ( Dev & QA ), R/3 (Dev & QA).
    Because  I have not seen the Intervals in R/3 ( Dev & QA) systems.
    please could someone provide Inputs for this.
    Thanks in Advance
    Regards
    SK

    Hi,
    Try to see that transfer structure is existing in the sytem which is connecting in
    the BW quality.
    You need the same to be transported from the development server of R/3 to quality server of R/3.
    Just check if this helps.
    Regards
    Rahul Bindroo

  • How to find out the Number range object for Incident number

    How to find out the Number range object for Incident number ?
    CCIHT_IAL-IALID
    regards,
    lavanya

    HI, an example.
    data: vl_num type i,
          vl_char(6) type c,
          vl_qty type INRI-QUANTITY,
          vl_rc type INRI-RETURNCODE.
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        NR_RANGE_NR                   = '01'
        OBJECT                        = 'ZRG0000001'
       QUANTITY                       = '1'
      SUBOBJECT                     = ' '
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
    IMPORTING
       NUMBER                        = vl_num
       QUANTITY                      = vl_qty
       RETURNCODE                    = vl_rc
    EXCEPTIONS
       INTERVAL_NOT_FOUND            = 1
       NUMBER_RANGE_NOT_INTERN       = 2
       OBJECT_NOT_FOUND              = 3
       QUANTITY_IS_0                 = 4
       QUANTITY_IS_NOT_1             = 5
       INTERVAL_OVERFLOW             = 6
       BUFFER_OVERFLOW               = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    vl_char = vl_num.
    write vl_char.
    Regard

Maybe you are looking for

  • DAQCard-65​33 performanc​e (PCMCIA)

    The on-line DAQCard-6533 PCMCIA card ad states "up to 400 kbytes/s (pattern I/O); up to 740 kbytes/s (handshaking I/O). I'm not even getting on tenth of those speeds. If I run the card at even 25 Khz, I get error -10803 indicating an input buffer ove

  • Iphone keeps restarting after 1 minute

    went to bed last night phone was fine woke up this morning and it keeps restarting or freezing after 30 seconds to a minute. i tried re-installing my firmware but no help. does anyone have any ideas?

  • How does NetWeaver support FIPS in java part?

    As we know,  default JDK doesn't support FIPS in the SSL/TLS socket. There are 3rdpart soft, like certicom, bsafe can support this. And in the opensource, NSS + jdk, seems can be a solution. Here, just a question, how does NetWeaver support FIPS in j

  • Photoshop 7.0 and editing Raw images

    I'm new to dslr's and would like to snap raw images. I have ps 7.0 and have never used the open as nor do I know if this application will edit and work with Raw images. if anyone can help me I sure would appreciate it. thanks, EriK

  • Help with User account on seperate drive please...

    Hello... need a little help please... I'm running 10.5.6. My boot drive is the fast, 64GB outer partition of a 5th drive on my MacPro. I used the Advanced Options in the Account pref pane in Leopard to move my Home Directory to an ultrafast 4 drive i