# bitwise or: |, or

bitwise AND or with another name setting to 1. it get the setting to 1 name after logical or operator: just in case it's the result false if both inputs are false, in all other cases the result is true. it transferred to the variables means that only those bits remain 0 where both inputs was 0 otherwise it set to 1. this property can be used for example to setting up specific bits: taking one example, we have one variable in which the 5th, 6th bits we want to set up 1. We need a number where 5th, 6th bit are set to 1 and all other bits are 0: 00110000 in hexadecimal form 30 and decimal 48. we perform a bitwise OR operation, above the number 48 and over the variable, the result will be set the 5th, 6th bits to 1 and other bits remain without changes (xx11xxxx)## |

### Description

`par1 | par2`

### Input

- par1 - any integer
- par2 - any integer

### Output

- Result - integers

### Examples

## Example

bitwise or the possible of use:```
x = 1 | 2; // x = 3
y = 0xa | 5; // y = F
z = 0xf0 | (x | y); // z = FF
```

## Example

even one example in what situations we can use the operation bitwise or:```
i | j
0xff | k
64 | (i | k)
```

## Example

Other pieces of example codes:0x01 | 0x02

## or

### Description

`par1 or par2`

### Input

- par1 - any integer
- par2 - any integer

### Output

- Result - integers

compatible programing languages:

Basic | Visual Basic .NET | FreeBASIC | Free Pascal | Object Pascal | Pascal

Basic | Visual Basic .NET | FreeBASIC | Free Pascal | Object Pascal | Pascal

### Examples

## Basic

bitwise or the possible of use:```
x = 1 or 2 ' x = 3
y = &Ha or 5 ' y = F
z = &Hf0 or (x or y) ' z = FF
```

## Basic

even one example in what situations we can use the operation bitwise or:```
i or j
&Hff or k
64 or (i or k)
```

## Basic

Other pieces of example codes:j > 128 or 0

a or -1

&H01 or &H02

you can find it in the following collections: bitwise operators

bitwise or in another programming language: