3

How would you answer this question. Write $4^n - 1$ in base $2$. Given the context of the question I assume that $n \in \mathbb{Z}$. I'm fine with converting regular numbers to and from different bases but I don't know what a sufficient answer to this question would be. Please help. Thank you.

N. F. Taussig
  • 76,571
  • 1
    By hand you should be able to work out the cases $n=1$ and $n=2$; with luck you might be able then to guess the answer for $n=3$ and maybe also higher. – kimchi lover Aug 14 '19 at 00:56

3 Answers3

5

$4^n-1=2^{2n}-1$, which is just $2n$ 1's in binary

  • 1
    Thanks guys I knew that the answer was a string of 2n 1s from doing exactly this but just was blanking on how to express this as an appropriate answer. All your answers help a lot. Thank you! – Vishaal Vageshwari Aug 14 '19 at 01:23
  • I did adjust the answer to make clear what occurs in cases where n is negative but its pretty much the same just with a decimal point to show that its the fractional part. – Vishaal Vageshwari Aug 14 '19 at 01:39
2

$4 = 2^2$,
So $4^n-1 = (33333\ldots n~times)_4 = (11~11~11~11~11\ldots 2n~times)_2$.

Just replace each digit by its binary equivalent. $(3)_4 = (11)_2$

AgentS
  • 12,195
0

$4^n - 1 = 2^{2n} - 1$.

Do I need to remind you that $2^M - 1 = 1 + 2 + 4 + ...... + 2^{M-1}$?

In any event $2^{2n} = 1\underbrace{000....000_2}_{\text{ with }2n\text{ zeros}}$ and $1\underbrace{000....000_2}_{\text{ with }2n\text{ zeros}}-1 = \underbrace{1111...111_2}_{2n \text{ ones}}$.

fleablood
  • 124,253