HTML and CSS Reference

In-Depth Information

Table 4.2
Numbering Systems

Binary

Decimal

Hexadecimal

0

0

0

1

1

1

10

2

2

11

3

3

100

4

4

101

5

5

110

6

6

111

7

7

1000

8

8

1001

9

9

1010

10

A

1011

11

B

1100

12

C

1101

13

D

72

1110

14

E

1111

15

F

Each of the binary values is called a bit. A group of bits is called a byte. In Table 4.2, the largest

binary value is a 4-bit byte. Computers are arranged in dif erent types of bytes, and the 8-bit

byte is commonly used as a general reference to a byte. However, modern computers are

actually organized into 8-, 16-, 32-, 64-, and even 128-bit bytes. (h ey just keep getting bigger,

so don't expect 128-bit bytes to be the top limit.)

h e highest value for a binary counting system in an 8-bit byte is 11111111. When you look at

that compared with decimal and hexadecimal numbers, you see a very interesting pattern, as

shown in Table 4.3.

Table 4.3
Byte Values

Binary

Decimal

Hexidecimal

11111111

255

FF

As you can see in Table 4-3, the hexadecimal value FF is the highest possible value for two

digits; similarly, the binary value 11111111 is the highest possible value for eight digits (a

byte). However, the decimal number is three digits and does not represent a limit for those

digits. In other words, the decimal system isn't very symmetrical with the binary counting

system, but the hexadecimal system is.