Given a positive integer $w$, let $r$ be an integer that satisfies: $r \in{} \{0,1,2, \ldots{}, 2^{w}-1 \}$, that is, $r \in{} \mathbb{Z}_{2^w}$.
I want to prove that:
for any $p$, that $p \in{} \mathbb{Z}_{w}$. Let $t = \lfloor{}\frac{r}{2^{p}}\rfloor{}$, we have$t \in{} \mathbb{Z}_{2^{w-p}}$
For instance, for $w=3$, we have $r \in{} \{0,1,2, \ldots{}, 7 \}$, then:
Suppose $p=1$, we have $t = \lfloor{}\frac{r}{2}\rfloor{}$, which means $t \in{} \{ 0,0,1,1,2,2,3,3 \} = \{ 0,1,2,3 \}$, hence $t \in{} \mathbb{Z}_{2^{2}}$.
Suppose $p=2$, we have $t = \lfloor{}\frac{r}{4}\rfloor{}$, which means $t \in{} \{ 0,0,0,0,1,1,1,1 \} = \{ 0,1 \}$, hence $t \in{} \mathbb{Z}_{2^{1}}$.
Things might be simple if treating $r$ as a binary number (i.e. from the perspective of computer science). But I prefer a completely mathematical proof, and just have no idea where to start it, seeking for help! Could anyone give some suggestions or hints? Thanks In Advance!