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
is a technique of improving the priority of process waiting in Queue for CPU allocation? Ageing is a technique of enhancing the priority of process waiting in Queue for CPU all

Define the Products of Dynamic mode Dynamic model: A model of dynamic behaviour of user object.  It defines important states of user object, the way that actions depend on

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.

does matlab contain procedures for knoledge representation? if yes where can i find it?

"A datagram cannot be larger than the MTU of a network over which it is sent." Is the statement true or false? Explain with the help of a suitable example. All hardware technol

Q. How to copy several files in one stroke? The COPY command can also be used to copy several files in one stroke by using wildcards. For example, consider the following comman

The search method for searching a sorted file that needs increased amount of space is The search technique for searching a sorted file that needs increased amount of space

Explain all the categories that are served by Common Control switching. Common Control Switching System: It is a functional block diagram of a common control switching system i

What is Function scope Function scope: A label is the only part of identifier that has function scope. A label is declared implicitly by its use in a statement. Label names m

Solve the equation 23.6 10 = X 2 for X Ans. 23.6 10 = X 2 So as to find X, firstly convert the Decimal number 23.610 in its Binary form. After that take the decimal inte