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

Want wellness software, Project Description: We are looking to have soft...

Project Description: We are looking to have software that we will use to track employee information regarding our wellness program. We would like the system to be able to follow

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

a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between tw

Explain the bit wise operators, Explain the Bit Wise Operators? C langu...

Explain the Bit Wise Operators? C language has distinction of supporting special operators recognized as bit wise operators for manipulation of data at bit level. These operato

Example of switch case statement, #include #include #include void* m...

#include #include #include void* memorycopy (void *des, const void *src, size_t count) {   size_t n = (count + 7) / 8;   char* destination = (char *) des;   char* source =

College, #question.College life is tough. Eating pizza for every meal is h...

#question.College life is tough. Eating pizza for every meal is hitting you hard. You are looking at working out to stay healthy. You found a web site that tells you how many ca

''c'' programme, Write a ''C'' program to accept any 3 digit integer number...

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

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