Binary Sytem / binary operation

I need any references (websites/PDFs) explainning binary sytem and binary operations (conversion,subtraction,division..)
thanx in advance

hi,
try these:
http://mindprod.com/jglossbinary.html
http://www.learnbinary.com/
for the last one click start in the top banner to start the tutorial, it's shown in an applet so it might take time to load depending on your connection.

Similar Messages

  • Binary operations

    Hi all,
    Okay im not very familiar with much binary operations, so I need a little help.  The problem that im having is the DAQ board im using has uses a 32 bit interface for digital I/O, and I need to be able to change  lines 8-22, depending on the decimal number and base the user enters and have that binary be in inverted logic.  For example if the user entered 486.6 with a step size of 0.05 the binary in regular logic would be 000000000 010011000000100 00000000 and in inverted logic 000000000 101100111111011 00000000 and I dont want the change of decimal affect any others lines of the code.  I think maybe for that I could just set a max limit for the decimal number to being 2^15-1, but not sure I can create this limit and shift in the binary in labview.  Any help would great, thanks.

    dbartz,
    Al of the logic primitives are polymorphic, meaning that you anc use them with numerical values. Set up your data as an unsigned 32 bit integer (U32). Use AND and OR functions to mask off the parts you want to change and the parts you want to protect. If you had 8-bit words (for a simplified example) and wanted to change bits 2, 3, and 4, you could do this:
    let K = old data (example K = 10101010)
    let P = new data (example P = 00111110) {Notice that P has non-zero values in bits other than 2, 3, 4}
    let Mk = mask for old data (example Mk = 11100011), and
    let Mp = mask for new data (example Mp = 00011100 = NOT Mk).
    Then (K AND Mk) OR (P AND Mp) = data to write.
    Using the example values above (K AND Mk) = 10100010, (P AND Mp) = 00011100, and data to write = 10111110.
    Lynn

  • In range and coerce binary operation

    How do I implment the "in range and coerce" function with binary operation?  I want to do that to make my fpga code more efficient.
    Kudos and Accepted as Solution are welcome!

    What exactly do you mean by "binary operation"?  I am assuming you are dealing with integers here to make life simple.
    The In Range portion is just a simple Less Than and a More Than with an AND ( x < UL && x > LL).  The Coerce portion would likely be best done with Select nodes based on the Less Than and the More Than comparisons.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • RS-232 binary operation

    Dear all,
    I am a researcher with commercial instrument.
    After communication with my technician, I got to know I have to do binary operation in RS-232.
    But I am not familiar with the binary operation.
    Could you please give me some solution about this by labview 6 or 7?
    I attah a part of the manual.
    *)please let me explain the meaning of the parameters.
    Host → Ecotec II: 5(start the communication), 5(length of the command, 5 bits),
    3 (RS-232 functional command), 0(parameter of the command), 13(checksum, 5+5+3+0).
    Very thank you for your attention.
    Any comments will be very helpful to me.
    Attachments:
    aaa.bmp ‏1129 KB

    Duplicate.
    Try to take over the world!

  • Binary Operation in PL/SQL

    How do I do binary operations like or/and/xor in pl/sql? Are there any built-in libraries?

    I believe NOT x = -x - 1So NOT 19 = -20andNOT -8 = 7Hope this helps,
    T.

  • How can i do bitwise (binary) operations (AND, OR, XOR)

    I need to do bitwise (binary) operations such as AND, OR, and XOR.  For example, how do I AND 10101000 with 11111000?

    for OR, with 10101000 in A1 and 11111000 in A2, try:
      =1×SUBSTITUTE(A1+A2,2,1)
    Result:  11111000
    and for XOR, try:
       =1×SUBSTITUTE(A1+A2,2,0)
    Result: 1010000  (missing leading 0)
    You can display missing leading zeros by setting the cell's Data Format to 'Numeral System' with Base set to 10 and Places to 8, or turn the result into a string with something like this (assuming the result is in A3):
         =RIGHT("0000000"&A3,8)
    SG

  • Binary operations in Java

    Hi,
    are there any binary operations in Java like '&' in C? I didn't found any information in the API description.
    Thank u.

    You didn't find them from the API since they are a feature of the language. Try the langspec instead: http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5228

  • How to use/implement xor binary operator in oracle

    Hi,
    Like in VB and .Net we have a Binary operator/expression called Xor for the following
    logic....
    EXAMPLE:
    A Integer = 10
    B Integer = 8
    C Integer
    c = (A Xor B) OUTPUT is 2
    1010 (10 in Binary)
    1000 (8 in binary)
    0010 (result is 2 in binary)
    I want to implement the same logic in Oracle do we have any builtin operator function
    for this? If we dont have can anyone please try to code it. It will be very helpful and
    urgent.
    Thanks in Advance
    Reddy

    do we have any builtin operator functionfor this?
    Up to a point. Specifically, Oracle has a BITAND() function. With this it is possible to code our own BITOR and BITXOR functions. I'm glad to say I personally haven't had to worry about bits for over ten years, but Connor McDonald has posted a solution on Jonathan Lewis's FAQ site.
    Cheers, APC

  • Spamtrainer error - binary operator expected

    On 10.4 server, this error started showing up. No updates were installed. Hoping to fix this, I even installed updated spamtrainer. But it did not help.
    At the command line, I typed this:
    /usr/sbin/spamtrainer -p col -d
    (where col is the partition name)
    Starting spamtrainer...
    Training from user folders
    /usr/sbin/spamtrainer: line 1021: [: /Volumes/Users/user_name/Mails: binary operator expected
    /usr/sbin/spamtrainer: line 1028: [: /Volumes/Users/user_name/Mails: binary operator expected
    Either there is no mailbox called user/junkmail in the mailpartition col
    or it has never been fed with mail.
    /usr/sbin/spamtrainer: line 1050: [: /Volumes/Users/user_name/Mails: binary operator expected
    Either there is no mailbox called user/notjunkmail in the mailpartition col
    or it has never been fed with mail.
    Syncing SpamAssassin Database
    Displaying SpamAssassin Database Stats
    0.000 0 8860 0 non-token data: spam
    0.000 0 40718 0 non-token data: ham
    Deleting learned HAM and SPAM
    Done!
    Output produced by spamtrainer Version 1.8.5
    There are mailboxes junkmail and notjunkmail. Junkmail is always fed. I don't understand why it is going to /Volumes/Users/user_name/Mails and shouting "binary operator expected".
    Appreciate any help.
    Thanks !

    /etc/imapd.conf:
    admins: cyrusimap, serveradmin
    configdirectory: /var/imap
    partition-default: /var/spool/imap
    unixhierarchysep: yes
    altnamespace: yes
    servername: our_domain.net
    sievedir: /usr/sieve
    sendmail: /usr/sbin/sendmail
    lmtpdowncasercpt: 1
    tlscertfile: /etc/certificates/our_domain.crt
    logrollingdays: 1
    logrolling_daysenabled: true
    enablequotawarnings: yes
    lmtpover_quota_permfailure: yes
    tlskeyfile: /etc/certificates/our_domain.key
    popauthgssapi: yes
    popauthapop: yes
    imapauth_crammd5: yes
    imapauthgssapi: yes
    imapauthlogin: yes
    imapauthplain: yes
    tlscafile: /etc/certificates/our_domain.chcrt
    partition-col: /Volumes/Users/serveradmin/Mails
    Message was edited by: Chakravarthy Cuddapah

  • Java and binary operations (roll)

    Is there any roll operations in java?
    1011 rolled to the right would become 1101
    1011 rolled to the left would bcome 0111
    How can I accomplish this?

    Why do you need that?I'm making a huffman encoder and need binary paths. I shift individual paths into a long path, but when an individual path exceeds the total number of bits I need to store the highest bits into the remaining of the path. Its easier to mask the lower segment than the higher in a collection of bits, so I would like to roll the path to the high bits end up at the lower part of the path and then mask the path so it contains a correct number of bits and shift it into the remaining bits.
    example:
    current path - 10110010110010000
    path - 1000
    notice the three last bits (000). This is where I want to 'store' 1000. Since 1000 is four bits I need to take the 3 highest bits (100) store these and store the last bit in a new long path. I can mask the lowest by doing 'path &= ((int)Math.pow(2, bit) - 1)' but this is not possible with high bits.
    Nille

  • Byte - bit - binary operations

    hi everyone, i've got a couple of quick (i hope) questions.
    1. if i have a byte array:
    byte[] byteArray = new byte[100];
    and i wanted to add up all the 1s of each byte in byteArray, how would i do that? i know that a byte is 8 bits, so that could mean that each byte will add up to 8 at the most... but how do i do the actual adding-up?
    2. how do you add up bytes in the binary sense? meaning, if i wanted to add byteArray[2] to byteArray[3] in binary, how do you do that?
    so if byteArray[2] = 1000100 and
    if byteArray[3] = 0111010, how would i do the adding so that i get a byte that is 1111110 ?
    3. also, how do you check to see if, say, the 5th bit in byteArray[10] is a 0 or a 1?
    thanks everyone - i appreciate your help!

    hi everyone, i've got a couple of quick (i hope)
    questions.
    1. if i have a byte array:
    byte[] byteArray = new byte[100];
    and i wanted to add up all the 1s of each byte in
    byteArray, how would i do that? i know that a byte is
    8 bits, so that could mean that each byte will add up
    to 8 at the most... but how do i do the actual
    adding-up?
    for(int y = 0; y < 100; y++)
        for(int x = 0; x < 8; x++)
            if( byteArray[y] & (1 << x) )
                count++;
    2. how do you add up bytes in the binary sense?
    meaning, if i wanted to add byteArray[2] to
    byteArray[3] in binary, how do you do that?
    so if byteArray[2] = 1000100 and
    if byteArray[3] = 0111010, how would i do the adding
    so that i get a byte that is 1111110 ?byte b = byteArray[2] | byteArray[3];
    3. also, how do you check to see if, say, the 5th bit
    in byteArray[10] is a 0 or a 1?00010000
    76543210
    so byte b = 00010000
    if( b & (1<< 4) == 1 )
    //true if the bit is 1
    thanks everyone - i appreciate your help!

  • Losing the leading zero in binary values

    Hi all,
    I�m currently creating some basic examples of bitwise operations and I�ve just noticed that I�m losing the leadnig zero of a binary value ( e.g.
    decimal 1 (expecting to see bin of 0001) is manifesting as 1
    decimal 16 (expecting to see bin of 00010000) is manifesting as 10000
    below is a full example
    import static java.lang.Integer.*;
    public class BitExample {
    public static void main(String[] args) {   
    System.out.println(
         toBinaryString(0x1) + '\n' +
         toBinaryString(0x16) + '\n' +
         toBinaryString(0x6a) + '\n' +
         toBinaryString(0x80)
    I can see I�m missing something, but not sure what. Can you help?
    Many Thanks
    Giles

    which obviously returns a very different resultNo it does not ... let's translate the example to decimal (with additions instead of bitwise operations, but that doesn't change anything:
    1234 +
    0001
    1235and
    1234 +
    1
    1235both notations are correct, aren't they? Now the second one doesn't look so nice (and usually the 1 should be right-aligned to be easily readable, but it isn't wrong, because of this.
    The same is true for binary operations. The problem is, that while learning bitwise operations it's easier to unserstand if you always write the leading zero (as you do in your example).

  • Any good algorithm to balanced a strict binary tree for a ordered set

    Hi,
    I have created a syntax tree of a binary operator that is associative but not commutative. The resultant is a unbalanced strict binary tree.
    I have tried using AVL tree as well as a heap. But they will occasionally destruct the non-commutative property of the syntax tree.
    Is there any efficient algorithm that I can used to balance this tree?
    Thank you.

    Is linear time good enough?
    1. Traverse your tree to build a list.
    2. Recursively turn the list into a tree. Pseudocode for this step: fun listToTree( [a] ) = Leaf(a)
      | listToTree( xs ) = Node( listToTree(firstHalf(xs)), listToTree(secondHalf(xs)) );

  • Swap binary data endianess

    Hello all,
    I have a preconfigured FPGA, which is outputting 8bit unsigned binary data in packets (which are 90bytes long). I'm reading this data into LabView using VISA (over RS232). The VISA-Read is converting the binary to hex (as I expect), but it's doing it with the wrong endianess, so the hex is meaningless (i.e. I get a 2 when I expect 64 etc).
    I can see may ways (both through inbuilt functions and solutions suggested here) for correcting endianess of multiple bytes ("Swap Bytes" for example), but none for changing this internal to a single byte, nor can I see a means of configuring VISA in this respect. Am I missing something obvious? All suggestions welcome, thank you!

    I never heard of a format with reversed bits. Are you sure that's what it actually is?
    Can you attach a VI containing a typical 90byte raw data set and the desired result?
    I would go with the Lookup table as in Darin's top example. If you disable debugging, it will get folded into a constant at compile time and is thus extremely efficient at runtime. (or just make it into a constant manually as Darin did).
    (Darin, that second algorithm is weird. These guys have way too much time on their hand: Inflate each byte 8x to U64 just to do some obscure binary operations then shrink it back later... )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ReverseBitsLUT.png ‏5 KB

  • The operation priority question

    hi.
    i have one problem.
    may be i am not understand so well but...
    the operation priority of postfix increment is higher than the binary + operation priority and i have this problem.
    int p = 5;
    int b = p + p++ + p++;
    Sytem.out.println(b);i think that it must print "18".
    but i was surprised when it printed "16".
    what you think about this?
    Edited by: nuinisk on Feb 18, 2008 7:15 AM

    nuinisk wrote:
    hi.
    i have one problem.
    may be i am not understand so well but...
    the operation priority of postfix increment is higher than the binary + operation priority and i have this problem.
    int p = 5;
    int b = p + p++ + p++;
    Sytem.out.println(b);i think that it must print "18".
    but i was surprised when it printed "16".Higher priority doesn't mean it's executed first. The expression is evaluated left to right. Operator precence simply means where the parenthese would go.
    First it evaluates p, which is 5
    Next, it evaluates p++, which also has a value of 5. Remember, the value of x++ is x's original value. x getting incremented is just a side effect.
    Next it evaluates p++, which has a value of 6. A side effect is that p's value goes to 7, but the value of the expression is, by definition, p's value before that happens.
    5 + 5 + 6 = 16.

Maybe you are looking for

  • HT2534 i want to set up my apple id but it ask for the gift card but i dont use them

    I want to set up my Apple ID for my phone but it ask for the Gift Card but I dont use them ? what do I do ?

  • Deleting records from a table with 12 million records

    We need to delete some records on this table. SQL> desc CDR_CLMS_ADMN.MDL_CLM_PMT_ENT_bak; Name Null? Type CLM_PMT_CHCK_NUM NOT NULL NUMBER(9) CLM_PMT_CHCK_ACCT NOT NULL VARCHAR2(5) CLM_PMT_PAYEE_POSTAL_EXT_CD VARCHAR2(4) CLM_PMT_CHCK_AMT NUMBER(9,2)

  • Creation of MIC for every materail???

    Hi Gurus, I created MIC's( dimension, tensile etc) thatt needs to be inspected through QS21 and assigned qualitative/quantitative as well as lower specific limit and upper specific limit for the MIC. But, my issue is This lower specific limit and upp

  • Newbie Needs Help With Website

    I am new to Dreamweaver and am undertaking the task of building my church website. I have placed the images in tables on and centered. I have also set the table width to 60% so that it will display properly in different resolutions. However the links

  • Reset the HTTP response code in OSB for proxy service

    Hi, I created a HTTP proxy service in ALSB with any XML message option. There are some business scnearios for which i need to send a custom error message in the HTTP body. I am replacing the $body variable with the error message and sending reply wit