---
title: "reference-book/3-gates/Or"
source: reference-book
version: genesis-0-1-0
id: reference-book/3-gates/Or
canonical: /docs/reference-book/3-gates/Or
---

An <<<OR>>> gate will vibrate if at least one of its slots has vibration to release.

We use <<<[ ]>>> characters to implement an <<<OR>>> gate.

```
 [1,2,3] ? // [1,2,3]
```

As you can see, the logger operator respects the gate type and prints the data according to its gate type.

Here, three different value literal vibrations are vibrating at the same time as soon as our application starts. Then the <<<OR>>> gate is receiving them. Because at least one slot has vibrated, the gate is also vibrated and eventually the logger receives the vibration.

It is nice to mention that Simorg's engine is smart enough to aggregate vibrations if possible. We will see in future chapters how to affect the order of vibrations.


$$$AlertBox type=INFO title=Vibration Is Existence message=Having 0 causing a vibration should not surprise anyone as we discussed it previously, values like 0 and "" are considered valid forms of existence as they are representing empty spaces. Gates care about vibration. In future chapters we will see how to add extra guards to help us guard against empty values.$$$


## XOR Gate
Similar to an <<<OR>>> gate, an <<<XOR>>> will vibrate if at least one of its slots has vibration but with a major difference: it only releases one vibration in a tick, meaning if two of its slots have vibration, the act of release is done one by one. This behavior is making <<<XOR>>> gates quite useful in creating sequential vibrations.

Let's see the following examples,
```
[1;2;3] ? // 1
          // 2
          // 3
```

Using a <<<;>>> character instead of <<<,>>> is changing the behavior and converts our <<<OR>>> gate to an <<<XOR>>> gate.

Now, as it seems from the output, unlike <<<OR>>> which was smart enough to gather all the vibrations in one tick, <<<XOR>>> is guaranteeing that it won't let more than one vibration exit it at a cycle of processing, aka tick.

$$$AlertBox type=HINT title=Async By Nature message=This specific usage of ';' character reminds us of sync code in CPLs when the execution runs the logic line by line from top to bottom. Initial prototypes of Simorg also had the same usage reserved for this character when it appeared at the end of a line, BUT, later it turned out that our code is much more solid and clear if we embrace a 100% async approach. We let the vibrations decide what needs to go next!$$$

We will see interesting use cases for the *XOR* gate in future chapters.