spacer
Yehuda Shiran October 12, 1999
Binary and Hexadecimal Notations
Tips: October 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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:

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business