Binary OR
|
Signature |
|---|
|
Binary_Or(expression1, expression2) |
|
Description |
|---|
|
Does an OR operation on each bit of expression1 with the corresponding bit of expression2. For the purpose of this operation the expressions are converted to an unsigned integer. The bitwise OR operation can be used to force specific bits to always be on. In this case the OR operation would be used on a signal and a mask constant. The expression `signal BIT_OR 0b1000` for example would force bit number 3 (i.e. the fourth bit) to always be set. The mask constant can be written as Binary (with a 0b prefix), Hexadecimal (with an 0x prefix) or as a decimal number. So `0b11001010 = 0xCA = 202` and the following formulas produce the same `signal BIT_OR 0b11001010` `signal BIT_OR 0xCA` `signal BIT_OR 202`. |
|
Result |
|---|
|
Bitwise OR of expression1 and expression2. |
|
Arguments |
|
|---|---|
|
expression1 |
An expression which is treated as a binary number. |
|
expression2 |
An expression which is treated as a binary number. Numeric values can be written as binary (with a 0b prefix), hexadecimal (with a 0x prefix) or as a decimal number. |