0

In what what real world applications is bit manipulation used?

Any famous algorithm which uses bit manipulation?

VLL
  • 9,634
  • 1
  • 29
  • 54
  • 1
    Bit manipulation is often used on microcontrollers. – Twinfriends Jan 11 '17 at 08:17
  • 1
    See The Art of Computer Programming volume 4A, chapter Bitwise tricks and techniques, for a whole bunch of especially interesting application. But there are plenty of boring applications as well, and also interesting applications that aren't in there. I believe Fenwick trees aren't in there. – harold Jan 11 '17 at 08:21
  • 1
    Setting bits for GPI/O pins is a pretty forward example. Sometimes several i/o-pins are combined in word/byte sized ports. To change the state (as in logical Hi/Low) of a single i/o-pin you need to manipulate the corresponding bits. – rikisa Jan 11 '17 at 08:26
  • google for "bitwise operator applications" you'll immediately find tons of answers – phuclv Jan 11 '17 at 08:32

1 Answers1

2

One interesting example is the Fast inverse square root.

https://en.wikipedia.org/wiki/Fast_inverse_square_root

Peter
  • 21
  • 1