You are on page 1of 44

Number Systems

Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal Use of subscripts 2, 10 and 16 for bases

Number Systems

Decimal number system Base 10 = 1, 2 ,3 4, 5, ect.. Binary number system Base 2 = 0001, 0010, 0011, ect Hexadecimal number system = Base 16 = 9, A, B, 4C ect

Decimal Number Systems

Decimal numbers are base 10

They are made up of 10 numbers 0,1,2,3,4,5,6,7,8,9. Combining the ten numbers will create units, tens, hundreds and thousands

Hundreds Tens 341 Units

102
300

101
40 300 + 40 +1 = 341

100
1

Split the following decimal numbers


Hundreds Tens 550 Units

Hundreds

Tens 982

Units

Answers
Hundreds 102 500 Tens 550 101 50 500 + 50 + 0 = 55010 Hundreds Tens 982 Units 100 0 Units

102
900

101
80

100
2

900 + 80 + 2 = 98210

Binary Number System


Binary numbers are base 2 Computer language They are made up of 2 numbers 1 and 0

Decimal Binary Decimal Binary

010
110 210

02
12 102

510
610 710

1012
1102 1112

310
410

112
1002

810
910

10002
10012

Hexadecimal Number Systems


Hexadecimal numbers are base 16 Computer memory locations They are made up of 16 numbers

Decimal 010 110 Hex 016 116 Decimal 510 610 Hex 516 616 Decimal 1010 1110 Hex A16 B16 Decimal 1510 Hex F16

210
310 410

216
316 416

710
810 910

716
816 916

1210
1310 1410

C16
D16 E16

Importance of Base numbers

Writing the base numbers is very important as;


1510 and 1516 are not the same number but without the base they would be both considered as the same number 1010 and 102 are not the same number as 102 represents 210

Complete the table


Number
2010 2A16 10101012 10110 1516 1110001112

Number System

Answers
Number
2010 2A16 10101012 10110 1516

Number System
Decimal Hexadecimal Binary Decimal Hexadecimal

1110001112

Binary

Converting Binary to Decimal

Explanation
1.

Write down the placement value on top of each number.


24 23 22 21 20

16
2.

Write the values that are on (the ones with a one under them Add the numbers together

3.

Example

We want to convert 110012 to decimal


24 23 22 21 20

1
16 16

1
8 8

0
4

0
2

1
1 1

16 + 8 + 1
25

Working
1. 2.

Convert the following to decimal 1010102 1110112 101010012 0011001112 1110101002

3.
4. 5.

Answers
1. 2.

Convert the following to decimal 1010102 = 4210 1110112 = 5910 101010012 = 16910 0011001112 = 10310 1110101002 = 46810

3.
4. 5.

Converting Decimal to Binary

Method One
1.

Write down the placement values of binary


32 16 8 4 2 1

124 64
2.

Chose the numbers that add up to you decimal number


Put a 1 under the numbers used to add up to your decimal number

3.

Example

Convert 4610 to binary


32 16 8 4 2 1

124 64

32 + 8 + 4 + 2 = 46 4610 = 001011102

Method Two

Divide the original number by 2 and write down the remainder even if it is 0 Keep on dividing the decimal numbers by 2 until 1 is divided by 2 Write down the remainders next to each other starting from the bottom moving upwards

Example

Convert 4610 to binary


46 / 2 = 23 r 0

23 /
11 / 5 2 1 / / /

2
2 2 2 2

=
= = = =

11 r
5 2 1 0 r r r r

1
1 1 0 1

Ans 4610 = 1011102

Working
Convert the following decimal numbers to binary 1. 1010 2. 6610 3. 12010 4. 3510 5. 8810

Answers
Convert the following decimal numbers to binary 1. 1010 = 10102 2. 6610 = 10000102 3. 12010 = 11110002 4. 3510 = 1000112 5. 8810 = 10110002

Converting Binary to Hexadecimal

Explanation
Split the binary number into groups of 4 1001110 = 0100 1110 Write the 2x on top of each number starting from the right Add the numbers that are on Write down the totals, if a total is larger than 9, convert it 0 1 0 0 1 1 1 0 to the hex letter 23 22 21 20 23 22 21 20

NOTE: when we do not have enough bits lefts to create a group of 4 we add 0s

8 4 2 4

8 4 2 1 14 4E16

Example

Convert 11001112 in Hexadecinal


0 23 8 1 22 4 1 21 2 6 0 20 1 0 23 8 1 22 4 7 1 21 2 1 20 1

6716

Working
1. 2.

Convert the following into Hexadecimal 1110101002 11101112 1010102 1112 11100012

3.
4. 5.

Working
1. 2.

Convert the following into Hexadecimal 1110101002 = 1D416 11101112 = 7716 1010102 = 2A16 1112 = 716 11100012 = 7116

3.
4. 5.

Converting Hexadecimal to Binary

Explanation
1. 2.

3.

Write each individual number in the hexadecimal number eg B416 Write the binary placement values for each hex number List 1s under the placement values that are on B = 11 4

4. Write

the split 23 22 21 20 23 22 21 20 binary number as 8 4 2 1 8 4 2 1 one whole 1 0 1 1 0 1 0 0 number 101101002

Example

Convert 2C16 to binary


2 23 22 21 20 C = 12 23 22 21 20

8
0

4
0

2
1

1
0

8
1

4
1

2
0

1
0

001011002

Working

Convert the following hex numbers to binary AB16 F716 1516 CC16 2216

1.

2.
3. 4. 5.

Answers

Convert the following hex numbers to binary AB16 = 101010112 F716 = 111101112 1516 = 000101012 CC16 = 110011002 2216 = 001000102

1.

2.
3. 4. 5.

Converting Decimal to Hexadecimal

Method One
Divide the decimal number by 16 taking note of the remainders Keep on dividing the whole number by 16 until the whole number obtained is 0. Write down the remainders next to each other starting from the bottom, changing numbers greater than 9 to letters

465 / 29 1 / / 16 16 16 = = = 29 1 0 r r r 1 13 1

ANS = 1D116

Example

Convert 80010 to hexadecimal


800 / 50 3 / / 16 16 16 = = = 50 3 0 r r r 0 2 3

ANS = 32016

Method Two
Convert the decimal number to binary 2. Convert the binary number to hexadecimal Eg, changing 45610 to hexadecimal
1.

Example

Convert 80010 to hexadecimal


32 1 16 0 8 0 4 0 2 0 1 0 1 0 0

512 256 128 64 1

512 + 256 + 32 = 800

80010 = 11001000002
0 0 1 1 23 22 21 20 8 4 2 1 3 0 0 1 0 23 22 21 20 8 4 2 1 2 32016 0 23 8 0 0 0 22 21 20 4 2 1 0

Working
Convert the following to Hexadecimal numbers 1. 34010 2. 11910 3. 6610 4. 2510 5. 11110

Answers
Convert the following to Hexadecimal numbers 1. 34010 = 15416 2. 11910 = 7716 3. 6610 = 4216 4. 2510 = 1916 5. 11110 = 6F16

Converting Hexadecimal to Decimal

Explanation
Writing down the placement values on top of each number starting with 160 Multiply the top value with the hexadecimal number. Add all the results

162 161 16 3 (16x3) 160 1 A (1x10)

Converting 43A16 to decimal

256 4 (256x4)

1024

48
=1024+48+10 =108210

10

Working
1. 2.

Convert the following into decimal 5516 CB16 F816 B416 9016

3.
4. 5.

Answers
1. 2.

Convert the following into decimal 5516 = 8510 B016 = 17610 2F816 = 76010 B416 = 18010 9016 = 14410

3.
4. 5.

Homework

Copy and complete this table


Binary
1010101002

Decimal 2110

Hexadecimal

2E16
15910 001110002

1C216
4410

You might also like