Tool for reversing the order of bits (bit reversal) in an integer, byte, or binary message, over a period or the entire string of characters.
Bit Reverse Order - dCode
Tag(s) : Informatics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Bit reversal (or bit order inversion) is an operation that reverses the sequence of bits in a binary word, integer, or message.
Example: A byte represented by 11010010 will have the bit reversal 01001011
To encode a message by reversing the order of its bits:
— Convert to binary: For text, use an encoding (ASCII, UTF-8) and then convert each byte to binary.
— Reverse the bit order: Take the binary sequence and read it from right to left.
Note: Reading can be done sequentially (all 8-bit bytes, or all at once, or according to a custom interval).
Decoding is identical to encoding.
Applying two encodings results in recovering the original message.
Bit order reversal can be adapted or combined with other operations:
— Partial reversal: Invert only certain bits (e.g., the 4 least significant bits)
— Block reversal: Apply the reversal to segments of a fixed size (e.g., 16 bits, 32 bits)
— Conditional reversal: Invert based on a key, a mask, or the content to be reversed
dCode retains ownership of the "Bit Reverse Order" source code. Any algorithm for the "Bit Reverse Order" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Bit Reverse Order" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Bit Reverse Order" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Bit Reverse Order" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Bit Reverse Order on dCode.fr [online website], retrieved on 2025-12-03,