Handling bits of data

Hello Everyone,
I want to bit wise manipulation of data.
I have 6 bit of data ranging from 0 to 63 and 2 bits of data ranging from 0 to 4.
I want to add so as to get one byte of data.
Meaning 00000111, should give an output of 7  (first 6 bits from first data and 11 from second data)
I have two arrays of these values.
Please help or provide any information if avaliable for manipulating bit wise opeartion..
Thanks a lot in advance.
Avni

Hi Avni,
Please see the attached vi for handling the data bitwise.
Hope this will be helpful to u n is as per your need.
Regards,
Alifiya
Attachments:
BitwiseDataHandling.vi ‏11 KB

Similar Messages

  • How to handle multiple tables data in Entity Beans?

    How to handle multiple tables data in Entity Beans?
    i mean, my bean (non trivial) is responsible for frequent
    insertion in one table and some deletion on another table.
    Can anyone of you...please..?

    Is your data model right? If you are adding in one and deleting in another it sounds to me more like a process that an entity, in which case you may revisit your data model and simplify it, add in a session bean with the process method to co-ordinate between the two.
    However, if you want to map multiple different tables within a single entity bean it is possible and just part of the mapping. How you actualyl specify it depends on which implementation you are working with.
    Cheers,
    Peter.

  • DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file

    Hi
    DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
    Two main
    sections:
    1)     
    Perform
    write and read operations to and fro different spread sheet files, such that
    each file have a single row of 32bits different binary data (analogous to 1D
    array) where the left most bit is the MSB. I don’t want to manually enter the
    32 bits binary data, I want the data written or read just by opening a file
    name saves with the intended data.
          2)     
    And
    by using test patterns implemented using the digital pattern generator or  build digital data functions or otherwise, I need to
    ensure that the     
                binary data written to a spreadsheet file or any supported file type
    then through the NI-USB 6509 is same as the data read.
    I’m aware I can’t use the simulated
    device to read data written to any port but if the write part of the vi works I
    ‘m sure the read part will work on the physical device which I’ll buy later.
    My Plan
    of action
    I’ve
    created a basic write/read file task and a write/read DAQ task for NI USB 6509
    and both combine in a while loop to form a progress VI which I’m confuse of how
    to proceed with the implementation.
    My
    greatest problem is to link both together with the correct functions or operators
    such that there are no syntax/execution errors and thus achieve my intended
    result.
    This
    project is one of my many assignments for my master thesis, so please i’ll
    appreciate every help as I’m not really efficient with LabVIEW programming but
    I prefer it because is fun and interesting if I get to know it.
    Currently I’m
    practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
    simulated device.
    Please see
    the attached file for my novice progress, thanks in
    advance for the support
    Rgds
    Paul
    Attachments:
    DIO_write_read DAQ from file.vi ‏17 KB

    What does your file look like?  The DAQmx write is expecting a single U32 value, not an array of I64. 
    Message Edited by vt92 on 09-16-2009 02:42 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • No Setup.exe in 64-bit Oracle Data Access Components (ODAC) Dowload

    Why is there no Setup.exe in the 64-bit Oracle Data Access Components (ODAC) Download? Are the only instructions for installing in the dowloaded readme file?

    You're probably looking at an XCOPY bundle.
    If you're looking for an x64 11.2 bundle installed via the Oracle Installer, you'd need to get either the 11201 full client on OTN, or the 11202 full client on My Oracle Support. The 11202 full client includes support for .NET 4 if you need that.
    Hope it helps,
    Greg

  • How can I retrieve specific bits of data from iCloud?

    Some of my notes that I have saved before were deleted and so I want to retrieve them from an iCloud backup that was saved a week ago. Is there any way to retrieve specific bits of data like this from iCloud?

    Is there absolutely any way I can get the information back at all, even calling an Apple tech guy could maybe help to solve this problem since my info was stored in iCloud.

  • Handling dynamic item data in VSTS

    Hi Team,
    Can you please let us know how to handle dynamic item data in VSTS.
    Regards
    Raghavendra
    8105577088

    Hi Raghavendra,
    Based on your previous threads posted by you in the test forum, I doubt that you want to create the coded UI test, am I right?
    If so, which kind of app did you want to test, WPF or others? Could you share us a screen shot about the real UI controls you want to test? What real Controls you want to test, list item controls or others?
    You know that to find a control in coded UI test, we have to use the unique peoperties as the search properties, so if your controls are dynamic, the real issue would be related to the search properties you use in your code.
    Like this case:
    https://social.msdn.microsoft.com/Forums/en-US/4c4805f0-230d-459d-a3e5-61e62746c5b9/list-box-item-is-not-get-selected-while-play-back-the-recorded-script-in-coded-ui-test?forum=vsautotest
    As Pankaj's suggestion, if the list items are dynamic then you can use the index values instead of the innertext, so the real issue would be related to how to use the search perperties in your side. If you item text value is dynamic, you'd better not
    use the text value as the search properties. 
    About "How does “Coded UI test” finds a control ??", reference:
    http://blogs.msdn.com/b/balagans/archive/2009/12/28/9941582.aspx
    If I have misunderstood this issue, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unclear handling of sequence data

    Hi guys,
    here I have yet another bunch of questions in regard to the handling of sequence data.
    I have checked and compared all of the examples from the SDK in various versions, and all of them seem to do things differently, and the SDK documentation does not really shed any way on what is the expected or correct behaviour.
    This applies especially to disposing and copying sequence data pointers, which can result in big problems concerning data leaks or access violations if done incorrectly, I suppose.
    I tried to code a simple example that uses a very simple SequenceData (a struct only containing one int, see below), so I won't have to cope with flattening/unflattening.
    In the snippet below, I implemented SequenceSetup(), SequenceSetdown() and SequenceResetup() and marked 6 parts with questions where the documentation and/or implementation in the examples is inconsistent.
    It would be great if anyone with more insight could give some reliable answers on what you are expected to do there. :-)
    Thanks,
    Toby
    struct SequenceData
        int param;
    static PF_Err SequenceSetup(PF_InData* in_data, PF_OutData* out_data)
        AEGP_SuiteHandler suites(in_data->pica_basicP);
        // Q1: Are we allowed (or required) to delete the input sequence data if it exists ???
        if (in_data->sequence_data)
            suites.HandleSuite1()->host_dispose_handle(in_data->sequence_data);
        // Q2: Are we allowed (or required) to delete the output sequence data if it exists ???
        if (out_data->sequence_data)
            suites.HandleSuite1()->host_dispose_handle(out_data->sequence_data);
        PF_Handle outH = suites.HandleSuite1()->host_new_handle(sizeof(SequenceData));
        if (!outH) return PF_Err_OUT_OF_MEMORY;
        SequenceData* outP = static_cast<SequenceData*>(suites.HandleSuite1()->host_lock_handle(outH));
        if (outP)
            AEFX_CLR_STRUCT(*outP);
            outP->param = 0;
            out_data->sequence_data = outH;
            // Q3: Do we really NOT have to set flat_sdata_size ???
            // (according to the spec, it is unused, but still some samples set it)
            out_data->flat_sdata_size = sizeof(SequenceData);
            suites.HandleSuite1()->host_unlock_handle(outH);
        if (!out_data->sequence_data) return PF_Err_INTERNAL_STRUCT_DAMAGED;
        return PF_Err_NONE;
    static PF_Err SequenceSetdown(PF_InData* in_data, PF_OutData* out_data)
        AEGP_SuiteHandler suites(in_data->pica_basicP);
        if (in_data->sequence_data)
            suites.HandleSuite1()->host_dispose_handle(in_data->sequence_data);
        // Q4: Are we required to set both in_data and out_data sequence_data pointers to NULL ???
        in_data->sequence_data = NULL;
        out_data->sequence_data = NULL;
        return PF_Err_NONE;
    static PF_Err SequenceResetup(PF_InData* in_data, PF_OutData* out_data)
        AEGP_SuiteHandler suites(in_data->pica_basicP);
        PF_Handle outH = suites.HandleSuite1()->host_new_handle(sizeof(SequenceData));
        if (!outH) return PF_Err_OUT_OF_MEMORY;
        SequenceData* outP = static_cast<SequenceData*>(suites.HandleSuite1()->host_lock_handle(outH));
        if (outP)
            AEFX_CLR_STRUCT(*outP);
            if (in_data->sequence_data)
                SequenceData* inP = static_cast<SequenceData*>(DH(in_data->sequence_data));
                if (inP)
                    outP->param = inP->param;
                // Q5: Are we allowed (or required) to delete the input sequence data if it exists ???
                suites.HandleSuite1()->host_dispose_handle(in_data->sequence_data);
            // Q6: Are we allowed (or required) to delete the output sequence data if it exists ???
            if (out_data->sequence_data) suites.HandleSuite1()->host_dispose_handle(out_data->sequence_data);
            out_data->sequence_data = outH;
            suites.HandleSuite1()->host_unlock_handle(outH);
        if (!out_data->sequence_data) return PF_Err_INTERNAL_STRUCT_DAMAGED;
        return PF_Err_NONE;

    To answer my own questions:
    Q1: in_data->sequence_data always seems to be NULL in this case, so no action necessary, but does no harm if it's in there
    Q2: out_data->sequence_data always seems to be NULL in this case, so no action necessary, but does no harm if it's in there
    Q3: out_data->flat_sdata_size is obsolete and should not be used
    Q4: seems to do no harm and since sequence data is disposed anyway at that location, should be left in there
    Q5: yes, this handle needs to be disposed here!
    Q6: no, that is not necessary and even problematic (as it is the same as in_data->sequence data when the function is called)
    Here is result of my research concerning sequence data from the last few days: http://reduxfx.com/ae_seqdata.pdf
    Cheers,
    Toby

  • Need help with representing 2 bits of data in a column

    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?

    CommitMan wrote:
    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?Yes - using Assembler....
    If you need to count bits to save space, then you must be on 70's, or early 80's, hardware. So using Assembler should not be a problem. Let me guess.. a 8051 microcontroller from the 1980?
    Here's what the 8051 code and memory optimisation manual says:
    >
    The simplest and best way to get dramatic improvements
    in efficiency is to look for all variables that will have only
    binary values (0 and not 0), and define them as type 'bit‘:
    bit myVar;With bit variables, the full set of 8051 bit-level assembler
    instructions can be used to generate very fast and
    compact code. For example, the following C code:
    myVar = ~myVar;
    if (!myVar)
    }Generates only two lines of assembler:
    B200    CPL myVar
    200006  JB myvar,?C0002This example uses only 5 flash bytes and 8 CPU cycles.
    When you use bit variables, you can implement a
    nontrivial line of C code with just one assembler
    instruction.
    >
    <i>PS. Yes, the above is really from a manual for a real 80s microcontroller. And yes, I'm poking fun at your question as saving bits were a problem in the 80s and prior. It should not be a problem in the 21st century information system and database.</i>

  • Cant see 64 bit odbc data source

    hi..
    i using bo 4.0 sp2 patch 3....64 bit server and i trying to connect 64 bit sql server.
    i created 64 bit odbc data source from syswow64>odbcat32
    but; in designer trying create a odbc connection for this data source but i cannot see this data source..just see 32 bit odbc data source.
    whats the problem.
    thanx in advance..

    Hello,
    When using the Universe Designer on the work station you are running it in 32 bit and therefore needs the 32 bit DSN and client. Once you publish it to the BOE Server then it is using the 64 bit connector.
    So install the 64 bit client tools on your BOE Server and name the 64 bit DSN exactly the same as your 32 bit DSN on the work station and then it should work.
    Or rename the 32 bit DSN on your work station the same as your BOE Server.
    Don

  • Looking for Rental add-on that can handle flexible return dates

    Hi Forum,
    I am wondering which would be good add-on for rental industry that can handle flexible return dates (without cancelling original contract and creating a new one with actual date).
    I am wondering if Visnova's Rental add-on would handle flexible return dates without actually cancelling original contract and creating a new contract.
    Are there many ways to handle flexible rental return dates?
    Thanks.

    Hi,
    I have moved your thread here because you are looking for partner add-on instead of SAP add-on. Have you searched through this forum and SAP EcoHub ?
    Thanks,
    Gordon

  • Coherence cannot handle year in dates of 9999 ?

    Hi,
    I have been running into an issue with dates in coherence. We have some data which specifies a date of 01/01/9999 to indicate that the date does not expire.
    However this results in errors when loading into coherence as follows:-
    java.io.IOException: year is likely out of range: 9999
    I then found this related thread:-
    Storing large DateTime values from .NET
    Is it really true that coherence cannot handle a valid date ???? Why would you possibly validate a year in the first place given 9999 is actually a valid year !.
    TIA
    Martin

    Hi,
    What is the code that causes the error? What version of Coherence are you using?
    I can serialize/deserialize the date you have without seeing any problems. For example...
    Calendar c = Calendar.getInstance();
    c.set(9999, Calendar.JANUARY, 1);
    Date d = c.getTime();
    ConfigurablePofContext pofContext = new ConfigurablePofContext("coherence-pof-config.xml");
    Binary b = ExternalizableHelper.toBinary(d, pofContext);
    Date d2 = (Date) ExternalizableHelper.fromBinary(b, pofContext);
    System.out.println(d2);The above code works fine when I ran it with Coherence 3.7.1.6
    If I have a class that implements PortableObject with a date field set to 1/1/9999 this also serializes without any problems.
    JK

  • How do I convert an 8 bit serial data string I have received (say 01110101) into decimal format??

    I am having a hard time finding a function that will help me convert an 8 bit serial data string I have received (say 01110101) into decimal format.

    When you have your front panel displayed, you should a whole palette of controls that you can place on the front panel. If the palette is not displayed, thne just right click on your mouse and it should appear. The upper left most set of controls on the palette is Numeric. Go there and select Numeric Indicator to display a numeric output. On the diagram, you can also right click the output 1 and select Create>Indicator. The format string is %b (as in boy) for a binary string. As I said, this should be the value for the format string input. You can right click on the Scan From String and select Edit Scan String. This will bring up a dialog box in which you pick what you want to do (Scan Number) and how you want to do it (Scan Binary Integer
    It sounds like you really need to take a course in LabVIEW programming. There are are links here to NI classes and some on-line tutorials.

  • What type of BufferedImage is needed for 24 bit image data

    Hello, i am using an image processing api, i have a 24 bit image data, i want to form a BufferedImage and set its pixel values with my data such as
    BufferedImage image = new BufferedImage(w, h, what type?);
    WritableRaster raster = image.getRaster();
    int[] imgpixels = ((DataBufferInt) raster.getDataBuffer()).getData();
    for (int i = 0; i < image.getHeight() * image.getWidth(); i++)
    imgpixels[i] = ((myArray).getRed()) << 16 | ((myArray[i]).getGreen()) << 8 | ((myArray[i]).getBlue());
    Then i will save the Buf. image to file as png. So what type of BufferedImage do i need?
    Regards.

    what is the reason when i read a 24 bit png image...it shows the type as 0 (TYPE_CUSTOM) ?
    From the the Field Detail section for the TYPE_CUSTOM field in BufferedImage: the image type is not recognized.
    You could make a new BufferedImage with TYPE_INT_RGB, or TYPE_INT_ARGB if the image has or will have transparent pixels, and copy the TYPE_CUSTOM image into it. Then you can manipulate/process the new image.

  • How to handle errors in data templates

    Hi
    What is the recommended way to handle errors for example if one of your SQL statement in a data template returned no data how and where would you be able to create an error message for the user to find and read.
    Thanks,
    Mark

    The closest I have come to doing this is to put conditional statements into the format template. If a value matches an expected (ex. is null) you can return a message (in the report) via the format template (ex. "No Data Found").
    I am not sure this really answers your question as this is in the format template, but I generally view them as a matched pair that work together. I try to stick with data extraction in the data define, and do all my conditional stuff in the format templates.
    Scott

  • How to handle custom component data on overviewset save button CRM UI

    Hi,
    I have added a custom component to a standard view which is enchanted.
    I can handle any data with my buttons on the component but after editing data
    i need the save the data when the save button on the overview(top) is pressed.
    I have redefined save button of overview but i cant get my data.
    My node name is Root. I think i couldnt bind it to overview.
    How can i do that?
    Thank you

    Probably it can be done by
    http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUITechnical-CreatingTableViewInWebUI
    i am trying
    Thank you

Maybe you are looking for

  • No Emergency Release Hole In MacPro DVD Drive

    I had a DVD stuck in the drive of my MacPro, tried everything to open the drive, but as nothing would work, I turned off the computer, and hoped to find the little hole under the driver tray that you stick an unwound paperclip in to open the driver.

  • Create IDOC Type ORDERS in BackEnd System

    Hello together, we use " extended classic scenario" in our  SRM 4.0 and replicate PO's in the ECC 6.0 ERP Backend System. We would like create during the replicat a Message Type (IDOC) ORDERS in Backen System. I háve customized (NACE / MN05) but it i

  • Opening Browser in BDT View

    Hi, is it possible to open a Browser in an BDT View or open an browser window after pushing a button on the BDT? Thank you Stefan

  • Sending post data to remote site

    I would normally use CURL and php to do this but I was wanting to see if i can use flex to send the post data, I am making an app which sends post data to another site, and was wanting to know the best way of doing this in flex..

  • Item type - User Area

    In form buider, the property palette of an item, there is a property called item type with many options. In it there is "user area" as item type, what is it and when should one use it. Thanks in advance