Question: I have a string array like this

```
string[] BranchIds = {"1","2","3"};

```

and then stored it into a session 

```
Session["BranchIds"] = BranchIds;

```

Now how can I retrieve this values as integers from session?

Answer: 
These two instructions should be identical - both in terms of effect and expected performance.

They're actually both *aliases* of more general purpose instructions.

`mov x8, 0` is encoded as `orr x8, xzr, 0`

`mov x8, xzr` is encoded as `orr x8, xzr, xzr`

Aliases are useful because they make the ASM more readable.

The second encoding demonstrates why having a zero register `xzr` can be useful. Because we know xzr is always zero, we can reuse the `orr` instruction for `mov`. Without it, `mov` would require a different encoding, and so would waste encoding space.
**TL;DR**

It takes multiple instructions to load a 64 bit literal into a register, but only a single instruction to set to 0 using zxr. Therefore the code is shorter and faster.

---

To move a literal to a register you would use the MOVL instruction, see this from the arm reference:

> 
> MOVL pseudo-instruction
> 
> 
> Load a register with either:
> 
> 
> 
> ```
> A 32-bit or 64-bit immediate value.
> 
> Any address.
> 
> ```
> 
> MOVL generates either two or four instructions... a MOV, MOVK pair.
> 
> 
> 

So loading a literal into a register is a multi step process. If you just want to clear a register then they have a shortcut. zxr is a pseudo register that always reads zero, which is a common value that you would need, and moving a register to a register can be done in a single instruction.

In Microchip assembly they have a similar concept. To set a register to a literal you would do something like:

```
MOVLW   10       (Move 10 to the working register) 
MOVWF   0x1234   (Move the working register to address 0x1234)

```

But to set to zero they have the instruction:

```
CLRF    0x1234   (Set 0x1234 to zero)

```