---
description: XOR
---

# Puzzle 4

## Puzzle

```
############
# Puzzle 4 #
############

00      34      CALLVALUE
01      38      CODESIZE
02      18      XOR
03      56      JUMP
04      FD      REVERT
05      FD      REVERT
06      FD      REVERT
07      FD      REVERT
08      FD      REVERT
09      FD      REVERT
0A      5B      JUMPDEST
0B      00      STOP

? Enter the value to send: (0) 

```

## Solution

`JUMP` to `XOR(msg.value, 12)`.

The objective is to jump to address `0x0A`. Recall that `XOR(msg.value, 12) = 0x0A` implies `msg.value = XOR(0x0A, 12)`. Do it in Python:

<figure><img src="https://223316867-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWVtlSxURaW2QQu6RU5%2Fuploads%2FtlbkkRdSRv0hfA8M186X%2Fimage.png?alt=media&#x26;token=3b45f4be-7ba0-4b33-8d43-9d38c2aa5869" alt=""><figcaption><p>XOR(0x0A, 12)</p></figcaption></figure>

The correct input is 6.
