0
$\begingroup$

Good afternoon. I have the key to my gate. I received its recording in the form of a PWM pulse train. Instead, I converted the impulses into binary code. Now I should get the hex numbers but it doesn't converge.

I have the same sequence in hexadecimal. How to translate correctly? I know that you need to read from the least significant bit. I selected 4 characters each and highlighted in different colors for convenience

enter image description here

it should turn out like this: enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Your sequence looks like it may be bit-inverted and byte reversed e.g. inverting and reversing 1101 1111 gives you 0000 0100 which is the binary equivalent of 04 $\endgroup$
    – tonys
    Commented Jun 28, 2022 at 15:15
  • $\begingroup$ Wow! Excellent! Thank you so much, I wouldn't have guessed! $\endgroup$
    – Антон
    Commented Jun 29, 2022 at 2:18

1 Answer 1

0
$\begingroup$

As per @tonys in the comments.

\begin{matrix} 1101 \ 1111 \ 1101 \ 1101 & \rightarrow& \mbox{inverted, bit reversed} & \rightarrow& \tt 0x04 \ 0x44\\ 0001 \ 0111 \ 0001 \ 0111 & \rightarrow& \color{red}{\mbox{straight, no reverse}} &\rightarrow& \tt 0x17 \ 0x17\\ 0110 \ 0111 \ 1101 \ 0010 & \rightarrow& \mbox{inverted, bit reversed} & \rightarrow& \tt 0x19 \ 0xB4\\ 0000 \ 0001 \ 1101 \ 1101 & \rightarrow& \mbox{inverted, bit reversed} & \rightarrow& \tt 0x7F \ 0x44\\ 00 \rightarrow \color{green}{???}& \end{matrix}

$\endgroup$
1
  • $\begingroup$ Thanks for the clarification! $\endgroup$
    – Антон
    Commented Jun 29, 2022 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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