Logical functions, Computer Engineering

Assignment Help:

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


Related Discussions:- Logical functions

What is an operating system, What is an operating system? An operating...

What is an operating system? An operating system is system software which provides interface between hardware and user. The operating system gives the means for the proper uti

Name the popular security measures, Name the popular security measures ...

Name the popular security measures A number of security products covering a broad range of methods are available in the market. Most popular of all the security measures are th

Pervasive computing, Explain why pervasive computing can be termed as a “te...

Explain why pervasive computing can be termed as a “technology that disappears”

What is an arithmetic processor, Q. What is an arithmetic processor? A ...

Q. What is an arithmetic processor? A distinctive CPU necessitates most of the control and data processing hardware for implementing non-arithmetic functions. As the hardware c

Show the advantages of joint application development, Q. Show the advantage...

Q. Show the advantages of Joint Application Development? The following are the numerous advantages of Joint Application Development: Actively includes management and use

Vugen recording and scripting, LoadRunner script code acquired from recordi...

LoadRunner script code acquired from recording in the ANSI C language syntax, shown by icons in icon view until you click Script View.

What is recursion, What is recursion?  A recursive procedure should have tw...

What is recursion?  A recursive procedure should have two properties.  What are they? Recursion means function call itself repeatedly.         Properties : (1) There

Efficiency of vector processing over scalar processing, Efficiency of Vecto...

Efficiency of Vector Processing over Scalar Processing: We know that, a sequential computer processes scalar operands one at a time. Thus, if we have to process a vector of len

What is cartridge drive, Q. What is Cartridge Drive? Cartridge Drive: ...

Q. What is Cartridge Drive? Cartridge Drive: A cartridge is a protective covering or case which is used to hold a magnetic tape, disk, a printer ribbon or toner. Contents are

Which types of software programs are usually supported, Which types of soft...

Which types of software programs are usually supported? Our organization is unique in that we are very flexible and can meet most client requires relative to the integration of

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd