M
M
Mixa2016-12-13 13:38:08
Computer networks
Mixa, 2016-12-13 13:38:08

How to get mac address in binary form?

In one of the projects, you need to represent the mac address of the router in the form
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }
and I write it in standard form, like
08-00-27-7B-32- FE
How can I get my poppy address like in the first example?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2016-12-13
@Mixa

it's not binary, it's 16. And you have it written in the same form. So just add 0x in front, and replace the dashes with commas

S
Saboteur, 2016-12-13
@saboteur_kiev

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }
                08    00    27    7B    32    FE

And if I substitute your address like this, does it look better?
ps you have the address already in the right form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question