One approach will be to convert the numbers to strings, and pad out the left side of the shorter string with zeroes.

Say we have two numbers, 218 and 47 and we wish to express,

```
218 XOR 47
```

The first step will be to recast both numbers as strings. Hint: `bin()`

returns `str`

objects, `'0b...'`

Of course there is a manual way to convert decimal to binary, but for now we’ll use the provided function to get to the strings themselves.

```
>>> a = bin(218)
>>> b = bin(47)
>>> a, b
('0b11011010', '0b101111')
>>> len(a), len(b)
(10, 8)
>>>
```

We will first need to remove the `0b`

before padding out the shorter of the two.

```
>>> c, d = a[2:], b[2:]
>>> while len(d) < len(c):
d = '0' + d
>>> c, d
('11011010', '00101111')
>>>
```

Now both strings are the same length so we can begin comparing the characters at the same position in each.

```
>>> xor = '0b'
>>> for i in range(len(c)):
if c[i] != d[i]:
xor += '1'
else:
xor += '0'
>>> xor
'0b11110101'
>>> bin(218 ^ 47)
'0b11110101'
>>>
```