Logical functions, Computer Engineering

Logical functions

  We have discussed the If, 'While and For' Statements, and have used expressions within our syntax i.e.
 
        If ( expression)
          Statement 1;
        else
          Statement 2;
 
        do
        statement;
        while (expression);
 
        for (init;expression;alter)
        statement;
 
        while ( expression)
        statement;

We tended to restrict ourselves to simple expression i.e A == 5 etc. This is a simplification of what an expression really is. The equality sign indicates a logical identity i.e. true or false. Many other logical expressions could yield true or false .The most common ones are AND '&&', OR  '||' and NOT '!' , these behave identical to there truth table counterparts .  Therefore a valid expression could be

        (age > 40) &&( term < 10) 
  
  If age is greater than 40 and term is less than 10 then it is true or false 
 
        (age > 40) || (term <10)
  If age is greater than 40 or term is less than 10 then it is true or false 
 
        (age !> 40) || (term <10)
 
  If age is not greater than 40 or term is less than 10 then it is true or false

Posted Date: 4/15/2013 6:22:06 AM | Location : United States







Related Discussions:- Logical functions, Assignment Help, Ask Question on Logical functions, Get Answer, Expert's Help, Logical functions Discussions

Write discussion on Logical functions
Your posts are moderated
Related Questions
According to the report, network 1 and network 2 are not able to reach network 3. As shown on OTBNetwork Topology above, OTB Inc. has 2 routing protocols running due transition iss

Q. Catch output from child tasks? int pvm_catchout( FILE *ff ) Catch output from child tasks. ff is file descriptor on which we write collected output. The defau

Fuzzy Logic - artificial intelligence: In the above logic, we have been concerned with truth whether propositions and sentences are true. But, with some natural language statem

Define the types of software life cycle Any system progress refers to the initial part of the software life cycle: analysis, design, and implementation. During object oriented

Variable ordering - Forward checking: Hence this is different from variable ordering in two important ways as:  Whether this is a dead end when we will end up visiting a

Q. Explain Basic working of Mainframes? Mainframe computers are normally 32-bit machines or higher. These are suited to large organizations, to manage high volume applications.

Q. Why we need parallel programming languages? The parallel programming languages are created for parallel computer environments.  These are developed either by creating new la

Conversioin of the decimal number 82.67 into Octal number ? Ans. The binary equivalent is (1010010.10101011) 2 of decimal number 82.67. After that convert each 3-bit binary in

Nested Macro calls are expanded using the? Ans. By using the LIFO (Last in First out) Nested Macro calls are expanded.

How do subroutines help in program writing? Some of the significant characteristics of Subroutine that help in program writing are: A subroutine is named, each have a