What does 'OR' together mean?
source link: https://www.codesd.com/item/what-does-or-together-mean.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
What does 'OR' together mean?
Quite a dumb question but I've been reading some C++ library documentation a lot recently and as I'm not a native speaker I can't figure out what that expression means. Anyone with a quick answer?
"What does 'OR'd together' mean?"
In context of boolean algebra applied to c++, it probably means something like you have certain flag bits in a variable and combine them for a value:
enum MyFlags {
Bit0 = 0x01 ,
Bit1 = 0x02 ,
Bit2 = 0x04 ,
};
uint8_t val = (uint8_t)(Bit0 | Bit2);
// ^ Bitwise OR operation
val
has value of 0x05
after that assignment.
Related Articles
What does the (+) operator mean in a PL / SQL where clause?
What does the @ sign mean before a variable in scala?
What does the: 300 mean for this google font?
What does a null mean in React createElement ()?
Javascript, what does this syntax mean?
What does `real * 8 'mean?
What does 1.e0 mean in the following code
What does multiple commas mean in a macro in c
What does this statement mean and & hellip;
What does "formally define" mean?
What does max_connections really mean?
What does this method mean?
What is the meaning of & ldquo; t & rdquo; in the code and what does t (window) mean?
what does the symbol ^ mean in the C-lens?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK