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

Classification of digital computer, CLASSIFICATION  OF DIGITAL COMPUTER ...

CLASSIFICATION  OF DIGITAL COMPUTER Computer are classified under a number of factors.Some people classify them according to their processing speed.main memory,technology used

Determine the o/p for JK flip flop with J=1 & K=0, For JK flip flop with J=...

For JK flip flop with J=1, K=0, the output after clock pulse will be ? Ans. The output will be 1 after clock pulse.

How to apply color and style, Q. How to Apply Color and Style? 1.  In f...

Q. How to Apply Color and Style? 1.  In first text description layout cell, select heading text from the word "Fly" through the word "Mountains." 2.  In Property inspector,

Accessing the internet, Before we can use Internet, we have to gain access ...

Before we can use Internet, we have to gain access to it. This access is achieved in one of numerous ways. Above all, the Internet is a collection of networks which are connected t

Explain processing of an interrupt, Q. Explain Processing of an Interrupt? ...

Q. Explain Processing of an Interrupt? The interrupt is processed as: Step 1: Number field in INT instruction is multiplied by 4 to get its entry in interrupt vector table.

What are the characteristics of semiconductor ram memories, What are the ch...

What are the characteristics of semiconductor RAM memories? They are available in a wide range of speeds. Their cycle time range from 100ns to less than 10ns. The

Dbms, sketch a neat E-R diagram for hotel management system with real time ...

sketch a neat E-R diagram for hotel management system with real time example

What is an on"*-input filed" statement, What is an on"*-input filed" statem...

What is an on"*-input filed" statement? ON *-INPUT The ABAP/4 module is known as if the user has entered the "*" in the first character of the field, and the field has th

How to create a new object order preference, 1. In an ASCII editor, make an...

1. In an ASCII editor, make an empty text file with the extension .ord. 2. Save the file in the Dat folder of the project. 3. Click To o l s > G UI R e c o r d O p t i o n s

Define the meaning of business-to-business, Define the meaning of business-...

Define the meaning of business-to-business. B2B (business-to-business): The consensus is universal: it is the priority; it is where the money is. It’s rather true; theref

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