Results 1 to 7 of 7

Thread: What exactly is "anding"

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    12

    What exactly is "anding"

    I hear the term anding a lot and I was just wondering exactly what is anding. Thanks for all the help in advance. XTRA


  2. #2
    AO Soccer Mom debwalin's Avatar
    Join Date
    Mar 2002
    Posts
    2,185
    XTRA: I'm not going to be much help...but I can tell you that anding has to do with figuring out an IP address based on the binary system. You take a line like 00011110 and figure out what the IP address would be based on what the numbers equal. I'm sorry this isn't much more help...I'll look and see, I have some M$ textbooks that may have a better explanation.

    Deb

    Edit: I came up with about half a notebook showing how to "and" but no good explanation of what it is...and without an explanation, I'm afraid showing you the examples may not do any good, as it confused me to look at it, and I understand it...lol.



    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    366
    I did a google search and though I don't know myself, this is what I came up with.

    Hope this helps.

  4. #4
    Anding is the process of applying a logical AND between two bits. Where 1 bit is capable of storeing either a logical 1 or high, or a logical low or 0. I will try to sumerize:

    AND'ing

    1 X 1 = 1
    1 X 0 = 0
    0 X 1 = 0
    0 X 0 = 0

    As you can see ANDing can be though of as multiplying.

    Think of it as 1 AND 1 make a 1, but if both digits are not the same they produce an 0;

    ORing:

    0 + 0 = 0
    0 + 1 = 1
    1 + 0 = 1
    1 + 1 = 1

    Well 1 + 1 = 1 may be confuseing, Think of it as 1 OR 1 OR both make a 1

    Hope that helps, you just need to find a good tutorial like the one zaggy gave you.

    Just thought I would add this part, google alows you to use bolean algebra, so doing a web search for example:

    learning OR education AND security

    google would trear the keywords with the logical AND and OR.

    This is the basis behind boolean algebra.
    test

  5. #5
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    aj67my had a good answer, I just want to explain it a little different, and add a few things...

    First, remember computers are binary, so everything is 1 or 0. You can think of 1 as 1 or on or true, and 0 as 0 or off or false.

    We will figure out C based on A and B.

    AND... ( && ) A && B = C
    1 && 1 = 1
    1 && 0 = 0
    0 && 1 = 0
    0 && 0 = 0

    OR.... (||) A || B = C
    1 || 1 = 1
    1 || 0 = 1
    0 || 1 = 1
    0 || 0 = 0

    Exclusive OR (xor) A xor B = C
    1 xor 1 = 0
    1 xor 0 = 1
    0 xor 1 = 1
    0 xor 0 = 0

    There is also NOT (!) !A = C
    !1 = 0
    !0 = 1

    When it gets complicated is with algorithims...
    if ((A or B) and C) OR (!(D and E) xor F)
    so...
    ((A || B) && C) || (!(D && E) xor F)
    pick 1 or 0 for each variable, and figure it out if they are...
    a=1, b=0, c=1, d=0 e=1 f=0 then...
    ((1||0)&&1)|| (!(0&&1)xor0)
    ..................^ center point
    left side..
    1 || 0 = 1
    1 && 1 = 1
    so left is 1
    right side
    0&&1 = 0
    !0 = 1
    1 xor 0 = 1
    so right side is 1
    so.... 1 || 1 = 1...

    Always start from left to right, and inside the depest parenthases, just like standard math. Instead of + - * /, you are just doing comparisons.
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Posts
    1,027
    there are three more boolean operations: exclusive or, implication, double implication (dunno if you call it like that in English though...)

    These are the truth tables for those operations:
    ( 1 = true, 0 = false )

    Exclusive or (XOR):
    1 xor 1 = 0
    1 xor 0 = 1
    0 xor 1 = 1
    0 xor 0 = 0



    (Implication is rarely represented in languages like C however...)
    Implication (->):
    1 -> 1 = 1
    1 -> 0 = 0
    0 -> 1 = 1
    0 -> 0 = 1

    Double implication (<->):
    1 <-> 1 = 1
    1 <-> 0 = 0
    0 <-> 1 = 0
    0 <-> 0 = 1


    Again, I've represented boolean values with 1 and 0 to keep with the previous post, but they really are boolean values that should be read as TRUE (1) and FALSE (0)...


    Ammo

    Doh, Souleman beat me to it
    Still he didn't mention implication and double implication (and I forgot the simple NOT...)

    Ammo
    Credit travels up, blame travels down -- The Boss

  7. #7
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    YEah, implication. I use that all the time...NOT... Actually, I don't think I have ever had a need for it, so I didn't even think about it. Anyway, most of them have easy descriptions (AND is A and B, OR is A or B, XOR is only A or only B but not both, and NOT is not A.) If you don't quite understand implication, it is if A implies B (or if the B value is true). Double implication is if both A and B imply the same thing. They can both be true or false, the exact opposite of XOR.
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •