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

Real-time systems and control, A group report with no more than three stude...

A group report with no more than three students per group is to be handed in to explain your design procedures and simulation results. Representative graphical system outputs (clea

What is interpreter, Q. What is interpreter? An interpreter translates ...

Q. What is interpreter? An interpreter translates each high-level-language statement into its equivalent set of machine-language instructions, which are then executed right awa

Differences between cisc and risc architectures, Question: a) What is ...

Question: a) What is the main difference between the Princeton and Harvard microprocessor architectures? b) State five main differences between CISC and RISC architectures?

What is micro operation, What is micro operation? A micro operation is ...

What is micro operation? A micro operation is an elementary operation performed with the data kept in registers.   1) Register transfer microoperation transfer binary inform

Directory of the distribution, I tried to run two of the applets in the exa...

I tried to run two of the applets in the examples directory of the distribution?    Ans) I tried to run two of the applets in the example directory of the distribution. I instal

Advantage to depth first search, Advantage to depth first search: It j...

Advantage to depth first search: It just looks like it will be a long period it finds 'DAN' until. This highlights an important drawback for depth first search. It can regular

Perform subtraction in base 5 using r and r-1 complement, Q Write a menu dr...

Q Write a menu driven program to perform subtraction in base 5 using r and (r-1) complement with necessary validations.

How blocking and non blocking statements get executed, How blocking and non...

How blocking and non blocking statements get executed? Execution of blocking assignments can be viewed just like a one-step process: 1. Evaluate RHS (right-hand side equatio

What is reflection, What is Reflection?  It extends the benefits of met...

What is Reflection?  It extends the benefits of metadata by permitting developers to inspect and use it at runtime. For example, dynamically verify all the classes contained in

Microcomputer - controlled breadmaking machine, Q. Microcomputer - Controll...

Q. Microcomputer - Controlled Breadmaking Machine? Figure shows a simplified schematic diagram of a microcomputer-controlled breadmaking machine. A microcomputer along with its

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