October 12, 1999 - Binary and Hexadecimal Notations

Bitwise operators in JavaScript are the operators used in bit-oriented operations. A bit is the smallest unit of information, usually represented by 0 or 1 specifications. Bit manipulations are used to control the machine at the lowest level. In JavaScrip, you won't be using bitwise operators to control the machine at a low level but rather for other purposes such as encrypting and encoding.

Eight consecutive bits form a byte. There are 256 (28) byte variations. That is, a byte can be one of 256 eight-bit sequences. For example, 11010001 is one of these 256 possibilities. Programming languages that support character data types, such as C, C++, and Pascal, use a single byte to represent one character.

Hexadecimal notation is convenient for representing binary data because each hexadecimal digit represents four binary bits. The following table lists the hexadecimal values from 0 to F, along with the equivalent binary values: