TLDR Web Dev · ARTICLES & TUTORIALS
UNDERSTANDING THE POWER OF BITWISE OPERATORS. NO MATH NEEDED
Summary from the TLDR Web Dev newsletter
When learning a new programming language, there is usually a table in the documentation that shows the various operators that can be used with numbers. While we are all familiar with +,-,*, and /, there’s always that one section that most of us skip. These are the bitwise operators <<, >>, &, ^ and |. While at first, they might seem obscure, unhelpful, or tools only for people who write in low level programming languages, they do serve a purpose. Bitwise operations allow us to manipulate the binary representation of the data which turns out to be extremely useful. This article is a deep dive into using bitwise operators effectively.