Or function
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Bitwise
Package: Microsoft.Quantum.QSharp.Foundation
Returns the bitwise OR of two integers.
This performs the same computation as the built-in |||
operator.
function Or (a : Int, b : Int) : Int
Input
a : Int
b : Int
Output : Int
Example
let a = 248; // 11111000₂
let b = 63; // 00111111₂
let x = Or(a, b); // x : Int = 255 = 11111111₂.
Remarks
See the C# | Operator for more details.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for