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

Demonstrate arc consistency, Demonstrate Arc consistency: To demonstra...

Demonstrate Arc consistency: To demonstrate the worth of performing an arc-consistency check before starting a serarch for a solution, we'll use an example from Barbara Smith'

Explain the working of bcd adder, Explain the working of BCD adder One ...

Explain the working of BCD adder One of the ways of adding decimal numbers in BCD is to use a 4-bit binary adder and perform arithmetic operation one digit at a time. The low-o

How many two-input AND and OR gates are required to realize , How many two-...

How many two-input AND and OR gates are required to realize Y=CD+EF+G ? Ans. Y=CD+EF+G No. of two i/p AND gates=2 No. of two i/p OR gates = 2 One OR gate to OR CD and EF

What is the difference between the c#.net and vb.net, What is the differenc...

What is the difference between the C#.NET and VB.NET? VB.NET - It didn't have the XML Documentation. - It didn't have the Operator Overloading. - It didn't have the P

Arterial puncture - specimen collection, Arterial puncture - Specimen colle...

Arterial puncture - Specimen collection: Arterial puncture:    this requires special skill and usually performed only by physician. The preferred site is radial arter

What are the logic micro-operations, Q. What are the Logic Micro-operations...

Q. What are the Logic Micro-operations? Logic operations are fundamentally binary operations that are performed on string of bits stored in the registers. For a logic micro-ope

Explain vector-memory instructions, Vector-Memory Instructions When vec...

Vector-Memory Instructions When vector operations with memory M are carried out then these are vector-memory instructions. These instructions are referred with the subsequent f

What are concentrators, What are concentrators? Explain how it helps in con...

What are concentrators? Explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed. This is both unessential and expensive to g

Software engineering, what is modular system ? list important properties of...

what is modular system ? list important properties of modular system

Find the boolean expression for the logic circuit, Find the boolean express...

Find the boolean expression for the logic circuit shown below. Ans. Output of Gate-1 (NAND) = (AB)' Output of Gate-2 (NOR) = (A'+B)' Output of Gate-3 (NOR) = [(AB)' + (

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