General and Bitwise Operators

To begin an examination of operators and expressions, two very different types of operators are discussed separately. I will refer to nonbitwise operators as “general operators” or simply “operators,” while bitwise operators are prefaced by “bitwise.” In this next section, Table 4.1 shows an overview of what I call general operators; near the end of the chapter, you will find a separate subsection and Table 4.2 on bitwise operators.

Bitwise operators shift the binary numbers (0s and 1s) in the registers in your computer. When binary numbers are shifted, special types of mathematical operations occur that you normally associate with addition, subtraction, multiplication, and division. To learn more about how this ...

Get JavaScript Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.