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

The new optimal solution, Electrocomp's management realizes that it forgot ...

Electrocomp's management realizes that it forgot to contain two critical constraints. In particular, management decides that to make sure an adequate supply of air conditioners for

BCD ADDER, create a BCD adder combinational ckt. that adds 2 digit BCD inpu...

create a BCD adder combinational ckt. that adds 2 digit BCD inputs

Where the trunks lines are run, Trunks are the lines that run between? ...

Trunks are the lines that run between? Trunks are the lines which run in between switching stations.

Prints the hundreds digit in two integers , Write an application that prin...

Write an application that prints the hundreds digit  in two integers read from the keyboard. For example if the data values are 1456 and 255 respectably, output should include the

Functions for various communication modes, Q. Functions for various communi...

Q. Functions for various communication modes? MPI offers both non-blocking and blocking send/transmitting and receive operations for all modes. Functions for various commun

Simulate a worm propagation considering traffic delay, At time t when an in...

At time t when an infected machine scans and finds a vulnerable machine, the vulnerable one will be compromised and start to scan and infect others at time t+X, where X is a r.v. f

How does tcp achieve reliability, How does TCP achieve reliability? One...

How does TCP achieve reliability? One of the most significant technologies is retransmission. While TCP stands data the sender compensates for packet loss through implementing

Define user mode and kernel mode, Define user mode and Kernel mode Kern...

Define user mode and Kernel mode Kernel is a private mode in that no limitation is imposed on the kernel of system. Kernel may be use all the information of the processor, oper

What is sisd, What is SISD?  Single Instruction stream, Single Data str...

What is SISD?  Single Instruction stream, Single Data stream (SISD) shows the organization of a single computer having a control unit, a processor unit, and a memory unit. Inst

A function declaration and function definition, Explain the difference betw...

Explain the difference between a function declaration and function definition.    Function declaration and Function definition:  A function declaration having the name of th

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