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

Loop statement, write a c++ program to accept 3 numbers and find the larges...

write a c++ program to accept 3 numbers and find the largest of 3 numbers

Console atm machine coding, construct a console programme for a bank ATM m...

construct a console programme for a bank ATM machine.

Array of objects, Array of Objects: The objects can be declared just li...

Array of Objects: The objects can be declared just like a structure or even a primary data type.  Array of objects may be required to work with large set of data.   When the da

Program for memory optimization of c / opencl code, Program for Memory Opti...

Program for Memory Optimization of C / OpenCL Code Project Description: This is possibly a very simple project for someone with an excellent knowledge of C and OpenCL. That,

Integration, to find the area under the curve y = f(x) between x = a and x ...

to find the area under the curve y = f(x) between x = a and x = b

Big M method, I Want a answer for solving the big M method in the topic of ...

I Want a answer for solving the big M method in the topic of simplex method...

Assignmet, I have a assignment deadline is 11.11.2015 can I get help

I have a assignment deadline is 11.11.2015 can I get help

Program, First line starts with T, number of test cases. Each test case T c...

First line starts with T, number of test cases. Each test case T contains a necklace (N).

Write a function to calculate the exchange rate, Write a function to calcul...

Write a function to calculate the exchange rate of pounds to dollars  Answer       Td = 2xTp   The parameter passed over is the number of pounds and returned the value in do

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