0
$\begingroup$

I am interested in understanding how to calculate possible permutations. For example for a 24bit MAC address (made up) ad:ba:32:d5:f0:dd. I believe the highest possible value per octet would be FF. So the highest possible value for the last 3 octets would be FF:FF:FF, so would that be 16 to power of 16? or 16 x 16? As you may have guessed my maths is rather lacking so I would like to understand how this would work.

Possible Values Up To F

enter image description here

$\endgroup$
0
$\begingroup$

Let me call every $4$ bit a 'key'. Each key has $16$ possibilities. Hence, for a $4n$-bit MAC address, there would be $n$ keys for you to assign a value.

Thus you have $$\underbrace{16\times16\times\ldots\times16}_{n \text{ 16's}}=16^n$$ permutations in total.

As each octet has $2$ keys, each octet has a total of $$16\times16$$ possibilities. An address with $m$ octets i.e. $2m$ keys, will thus have $$(16\times16)^m=16^{2n}$$ possibilities

$\endgroup$
  • $\begingroup$ each group has 16x16 possibilities does it not? As the total value per group could be as high as FF $\endgroup$ – iNoob Apr 26 '18 at 10:12
  • $\begingroup$ So total permutations for the final 3 octets would be 16x16 to power of 3? $\endgroup$ – iNoob Apr 26 '18 at 10:18
  • $\begingroup$ @iNoob "total permutations for the final 3 octets would be 16x16 to power of 3": Yes. Please see my edited answer for clarification for ur first comment. $\endgroup$ – Karn Watcharasupat Apr 26 '18 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.