Alex Rivera | Logout

When to use Bitwise Operators during webdevelopment?

Asked 2008-11-04T06:21:45.460
42

Although I grasp the concept of Bitwise Operators, I can't say that I have come across many use cases during the webdevelopment process at which I had to resort to using Bitwise Operators.

  • Do you use Bitwise Operators?
  • Why do you use them?
  • What are some example use cases?

Please remember that this question is specifically intended for use of Bitwise Operators in web languages.

Edit
Report

1 Answer

2

Generally, you don't need to concern about operations at the bit level. You can think in bytes, ints, doubles, and other higher level data types. But there are times when you'd like to be able to go to the level of an individual bit.

One of the most common utilization cases of the bitwise operators are the flags (php example). The bitwise operators are also used in binary file IO operations.

answered 2008-11-04T06:35:05.247

Your Answer