• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Using Operators > Understanding Bitwise Operators

Understanding Bitwise Operators

Bitwise operations provide an efficient and concise alternative to tracking large numbers of binary variables—variables that can have only two values. Using bitwise operators will give you a smaller SWF. In addition, if you often want to set or get multiple values simultaneously, using bitwise operators will probably speed up your program significantly.

Unfortunately, code that incorporates bitwise operators can be hard to read. In addition, to use bitwise operators effectively, you need to understand binary (base 2) arithmetic. Bitwise operators are never an absolute necessity: You can always achieve the same result by using logical (Boolean) operators. Therefore, many programmers avoid bitwise operators. However, bitwise operators are much more concise and efficient for some jobs. You’ll almost certainly benefit from having them in your ActionScript toolkit.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint