Post History
ARM Thumb machine code, 6 bytes 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0 4: 4770 bx lr // return if bytes have to be octets (8-bit): ARM Thumb machine code...
Answer
#3: Post edited
- # ARM Thumb machine code, 6 bytes
- ```asm
0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 04: 4770 bx lr // return- ```
- if bytes have to be octets (8-bit):
- # ARM Thumb machine code, 8 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 0e00 lsrs r0, r0, #24 // shift it right by 24 bits
- 6: 4770 bx lr // return
- ```
- # ARM Thumb machine code, 6 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 4770 bx lr // return
- ```
- if bytes have to be octets (8-bit):
- # ARM Thumb machine code, 8 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 0e00 lsrs r0, r0, #24 // shift it right by 24 bits
- 6: 4770 bx lr // return
- ```
#2: Post edited
- # ARM Thumb machine code, 8 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 0e00 lsrs r0, r0, #24 // shift it right by 24 bits
- 6: 4770 bx lr // return
- ```
- # ARM Thumb machine code, 6 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 4770 bx lr // return
- ```
- if bytes have to be octets (8-bit):
- # ARM Thumb machine code, 8 bytes
- ```asm
- 0: fa90 f0a0 rbit r0, r0 // reverse bits in 32-bit register 0
- 4: 0e00 lsrs r0, r0, #24 // shift it right by 24 bits
- 6: 4770 bx lr // return
- ```