Explain the bitwise-inclusive-or operator, C/C++ Programming

Assignment Help:

Explain the Bitwise-Inclusive-OR Operator: |?

The bitwise-inclusive-OR operator (|) contrast each bit of its first operand to the corresponding bit of its second operand and if either bit is 1 the corresponding result bit is set to 1 Or else the corresponding result bit is set to 0.

x

Y

x | y

0

0

0

0

1

1

1

0

1

1

1

1

In the following instance the bitwise-inclusive-OR operator (|) compares the bits of two integers nNumA and nNumB:

// Example of the bitwise-inclusive-OR operator

int nNumA=9, nNumB=3, nNumC; // 00001001, 00000011

nNumC = nNumA | nNumB;       // nNumC is now 11: 00001011


Related Discussions:- Explain the bitwise-inclusive-or operator

Tree, Write algorithm and program for the conversion of a Tree to a Binary ...

Write algorithm and program for the conversion of a Tree to a Binary Tree

LOOPS, HOW CAN WE EASLY LEARN C++

HOW CAN WE EASLY LEARN C++

Function, #q•Design and code a new function that accepts as parameters the ...

#q•Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference. Calculate the taxes

What is the employ of ''using'' declaration?, A: A using declaration makes ...

A: A using declaration makes it possible to employ a name from a namespace without the scope operator.

Algorithm and flowchart, an algorithm and flowchart of finding the product ...

an algorithm and flowchart of finding the product of any two numbers

Explain the for loop - computer programming, Explain the For Loop - Compute...

Explain the For Loop - Computer Programming? Similar to the while statement, for loop is an entry controlled loop and the code of the for loop will be executed itereatively. Th

Computer security and operating system, The Shortest Job Next (SJN) algorit...

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst. Shortest remaining time rst algori

Explain protected derivation, Protected derivation In addition to doing...

Protected derivation In addition to doing private and public derivations, you may also do a protected derivation. In this situation :   The private members inherited

Resection method, recsection method source code for searching position

recsection method source code for searching position

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