October 12, 1999 - Binary and Hexadecimal Notations
October 12, 1999 Binary and Hexadecimal Notations Tips: October 1999
Yehuda Shiran, Ph.D.
|
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:
Hex Binary Hex Binary 0 0000 8 1000 1 0001 9 1001 2 0010 A 1010 3 0011 B 1011 4 0100 C 1100 5 0101 D 1101 6 0110 E 1110 7 0111 F 1111