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, wap to count the numof string present in a word

wap to count the numof string present in a word

Develop a biomedical imaging project, Develop a biomedical imaging project ...

Develop a biomedical imaging project Project Description: This is a biomedical imaging project. Skills required are C++ Programming, Cocoa, Mac OS, Objective C

Write a simple telephone book program, Write a simple telephone book progra...

Write a simple telephone book program that stores the names and phone numbers of your friends/acquaintances in a file. Your program should have the abilities to: a. Add entries (n

Program to create local shopping cart, Available, and the right kind of pro...

Available, and the right kind of programs. My son wants to stop using ice. He has organised detox a number of times, and is always successful. It is the next stage, rehab, where

Explain about the floating point constants in c language, Explain about the...

Explain about the Floating point Constants in c language? A floating point constant is the number that contains either a fraction or decimal part. If an exponent is present its

Padovan string, write a C program for padovan string for a natural number ...

write a C program for padovan string for a natural number   program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n,

Visual basic, a program to accept average, if average is 75 to 85 print it...

a program to accept average, if average is 75 to 85 print it out else bypass using counter. enter and process 5 records

Luminous jewels, Problem : Luminous Jewels - Polishing Necklace Byteland c...

Problem : Luminous Jewels - Polishing Necklace Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of v

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