# union\(set\)/bitOr\(\|\) {#unionsetbitor}

**Parent topic:**[Operators](../../../Programming/Operators/Operators.md)

## Syntax {#syntax}

Set Operation: X \| Y or X union Y or union\(X,Y\)

Bit Operation: X \| Y or X bitOr Y or bitOr\(X, Y\)

## Arguments {#arguments}

Set Operation: **X** and **Y** are sets.

Bit Operation: **X** and **Y** are equal sized vectors,or **Y** is a scalar.

## Details {#details}

Set Operation: Return the union of two sets.

Bit Operation: Return the result of bitOr operation.

## Examples {#examples}

```
//Union of sets:
x=set([5,5,3,4]);
y=set(8 9 9 4 6);
x | y;
// output
set(8,9,6,4,3,5)

// Bit Operation:
x=1 0 1;
y=0 1 1;
x|y;
// output: [1,1,1]
```

