Common Number Systems

1.7 Common Number Systems

Let’s now consider the most commonly used number systems in computing: Decimal, Binary and Hexadecimal.

Decimal Number System

The Decimal number system has a base of 10. Therefore, the ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 are used. (Remember if you know the number systems base you can determine how many digits it uses).

What happens when the ten single digits are exceeded? To write the value 10 we have to represent it by using two digits. To write the value 100 we have to represent it by using three digits, hence the use of multiple digits to represent higher and higher values. Each of these subsequent digits is associated with a place value (This place value is also known as a weighting factor). Each place value or weighting factor is associated with a power of ten.

103

102

101

100

Thousands

Hundreds

Tens

Ones

1000

100

10

1

Notice from the table above how the powers of ten get progressively larger the further to the left we go.

Binary Number System

The Binary number system has a base of 2. Therefore, the two digits 0 and 1 are used. This number system is basically the same as the decimal (Base 10) number system except only two digits are used. Binary numbers are made up of binary digits which are referred to as bits. Note: Bit is short for Binary Digit.

Bits are not meaningful on their own typically they will be grouped together. One key grouping is 8 bits together, which is called a byte. A byte can represent 256 values; ranging from 0 to 255.

Note: The origin of the word byte is believed to have been derived by computer scientists making reference to data storage as being “by eight”.

Like the decimal system, binary also has a place value or weighting. Each place value or weighting factor is associated with a power of two.

23

22

21

20

8′s

4′s

2′s

1′s

To represent the decimal number 160 in binary would require the eight bit binary number 10100000(Subscripting the base number to the end of the number helps indicate what base the number is representing, in this case binary). This number as we can see is neither intuitive nor concise. It takes five more digits to represent than the decimal version. However, binary numbers are more natural for digital computers to work with. In a digital computer the digits ’1′ and ’0′ can be thought of as ‘On’ and ‘Off’, ‘True’ and ‘False’ or ‘Yes’ and ‘No’. The reason computers use binary is because the values ’0′ and ’1′ can be represented by electricity, e.g. no current = 0, a current = 1.

Hexadecimal Number System

The Hexadecimal number system has a base of 16. Therefore, the ten digits 0 to 9 and the six letters A to F are used. The Hexadecimal digit A is equivalent to the decimal number 10 and the Hexadecimal digit F is equivalent to the decimal number 15.

Decimal

Hexadecimal

Binary

0

0

0000

1

1

0001

2

2

0010

3

3

0011

4

4

0100

5

5

0101

6

6

0110

7

7

0111

8

8

1000

9

9

1001

10

A

1010

11

B

1011

12

C

1100

13

D

1101

14

E

1110

15

F

1111

The Hexadecimal system also has a place value or weighting. Each place value or weighting factor is associated with a power of 16.

163

162

161

160

4096′s

256′s

16′s

1′s

Next: Number Systems Practice