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
Discuss the CSMA/CD and CSMA/CA protocols. CSMA/CD: this is an access method used mainly with LANs configured in a bus topology. Along with CSMA/CD, any station (node) can se

Determine about the three-state gate A three-state gate is a digital circuit which shows three states. Two of them are equivalent to logic 1 and 0.  The third one is a high im

Resolution of externally defined symbols is performed by Ans. By Linker resolution of externally defined symbols is performed.

Firewalls use one or more of three methods to control traffic flowing in and out of the network:  Packet filtering - Packets (small chunks of data) are examined against a s

Why is the data bus in most microprocessors bidirectional while the address bus is unidirectional?  Data Bus:  These lines are used to send data to memory by output ports and

List the steps needed to perform page replacement. The steps required to perform page replacement are: 1. Find out which page is to be removed from the memory. 2. Perfor

Compare single bus structure and multiple bus structure? A system that having only one bus(i.e only one transfer at a time) is known as a single bus structure. A system is know

how many pins does a floppy drive connector have

Search Methods and Heuristics - Artificial intelligence: Here now we come to the question of how constraint solvers search for solutions -constraint preserving coursework of v

What is process control block?  Each process is shown in the OS by a process control block. It having many pieces of information associated with a specific process.