Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Operators that can replicate functions (https://www.askmehelpdesk.com/showthread.php?t=396744)

  • Sep 15, 2009, 05:54 PM
    hammka
    Operators that can replicate functions
    What other operator besides #, can successfully replicate the functions "AND", "OR", and "NOT"?
  • Sep 16, 2009, 07:32 AM
    Perito

    Are you talking about a computer language?
  • Sep 20, 2009, 07:07 AM
    akotoh

    In creating a program,
    'and' is the same as '&&'
    'or' is the same as '||'
    'not' is the same as '!'

    As far as I know, they are called as the LOGICAL OPERATORS. :)
  • Sep 21, 2009, 08:00 AM
    jcaron2

    As Perito pointed out, the answer to that question completely depends on what language you're talking about. Examples: C/C++, Java, Matlab, Fortran, Pascal, etc.

    The examples you gave are consistent with C, and as far as I know those are the only logical operators except in the case of bitwise operations where you have ~ (not), & (and), | (or), and ^ (xor).

  • All times are GMT -7. The time now is 06:15 AM.