0

Given an unsigned 64-bit integer such as:

10000000000000000000000000000000000000000000000000000000000000000

How can I efficiently reverse the bits into something like this?

00000000000000000000000000000000000000000000000000000000000000001
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • 1
    related https://stackoverflow.com/questions/2602823/in-c-c-whats-the-simplest-way-to-reverse-the-order-of-bits-in-a-byte/2602885 – 463035818_is_not_an_ai Mar 30 '21 at 16:42
  • Expanding from https://stackoverflow.com/questions/2602823/in-c-c-whats-the-simplest-way-to-reverse-the-order-of-bits-in-a-byte/2602885, I created http://coliru.stacked-crooked.com/a/42dd5c2497929e4f but its not exactly _efficient_ – Mooing Duck Mar 30 '21 at 17:05

0 Answers0