I was reading the book "The structure of groups of prime power order". In the book (page 226, Example 10.1.18) it is proved that
$-15$ has a square root is $\mathbb Z_2$ where $\mathbb Z_2$ denotes the ring of $2$-adic integers.
[I have attached a screen-shot of Example 10.1.18 at the end of my post]
So suppose $a=\sqrt{-15}$, then for any integers $x,y$ we have $x+ya\in \mathbb Z_2$ since $\mathbb Z \subset \mathbb Z_2$. So my question is
Given $x,y\in \mathbb Z$, is it possible to determine explicitly $\bar x, \bar y \in \mathbb Z$ and a maximum possible $l\ge 0$ such that
$$x+ya = 2^l(\bar x + \bar y a) \quad \text{ and } \quad \bar x + \bar y a \text{ is a unit in } \mathbb Z_2$$
Though not exactly related to the question but I think I should also say why I have this question; I am thinking of finding some kind of normal form of a matrix whose entries are from $\mathbb Z_2$ and has the form $x+ya$. So if I get a method for my above mentioned question then it will possibly help to write an algorithm for the normal form.
But I apologise for not showing much effort from my side for the question, I am actually not sure how to handle this. Any help will be greatly appreciated.
Thanks.
Screen-shot of the example: