S
S
Senseich2018-03-16 00:12:37
PHP
Senseich, 2018-03-16 00:12:37

How to implement a bit-reversal function in php?

I’ll find out, for the sake of interest for the future, I’m still far from it)) But an acquaintance gave one of the test tasks when they got hired at work. Can you tell me how this task is done? And what is a byte array and a bit reverse anyway?:

Implement a Reverse function that takes an array of bytes as input, performs a bit-reverse of each byte in the array, and prints the result to the screen

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-03-16
@Stalker_RED

Bit reversal is when the order of the bits in a byte needs to be reversed. That is, from 1011111 you need to make 11111101.
And an array of bytes, this is probably an array that contains bytes.
Ways to implement a little more than dofiga: https://stackoverflow.com/questions/1688532/how-to...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question