Ζ Bases Dr Frost Objectives: 1.To appreciate how we can have different number systems using different ‘bases’. 2.To convert numbers from decimal to another.

Post on 01-Apr-2015

216 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

ζBasesDr Frost

Objectives: 1. To appreciate how we can have different number systems using

different ‘bases’.2. To convert numbers from decimal to another base.3. To convert numbers from any base to decimal.

1001100101

11010001

96E854

FFBA4D

000000

1295823

8409284

These are all examples of numbers!What connects each group of numbers?

10

942

Base

The base of a number system is the number of possible values for each digit.

!

Values for each digit

Base Name of number system

0 to 9 10 Decimal0 to 1 2 Binary0 to F(A=10, B=11, ... F=15)

16 Hexadecimal

? ?? ?

? ?

Numbers in decimal

If we were to write out 2493, what is the value of each digit?

2 4 9 31000 100 10 1

2000 +400 +90 + 3 = 2493

multiply

?

??

Numbers in decimal

Now suppose we had a number in base 5 instead. How do we convert it to decimal?

4 3 0 1 125 25 5 1

500 + 75 + 0 + 1 = 576

multiply

?

??

Numbers in decimal

Copy and complete in your book.

1 0 1 12

8 4 2 1

8 + 0 + 2 + 1 = 11?

?

3 3 0 24

64 16 4 1

192 + 48 + 0 + 2 = 242

?

?

The small number indicates the base.

1 2 2 03

27 9 3 1

27 + 18 + 6 + 0 = 51

?

?

I’m a Mayan, Get

Me Out Of Here!

(Switch to ‘I’m a Mayan’ slides)

Exercises

Original number In base 10 (decimal)11012 13

1112 7

1100112 51

10223 35

7348 476

2345 69

5306 198

Base 2 ?

?

?

?

?

?

?

Converting FROM decimal to other bases

Do the opposite! Convert 18 to binary.

1 0 0 1 0 2

16 8 4 2 1?

16 + 0 + 0 + 2 + 0 = 18? ? ? ? ?

Converting FROM decimal to other bases

Convert 272 to base 5.

2 0 4 2 5

125 25 5 1?

250+ 0 + 20+ 2= 272? ? ? ?

Converting FROM decimal to other bases

It can help to write out multiples of your various powers. Below is base 6.

Multiples of 6 Multiples of 62 Multiples of 63

612182430

3672108144180

2164326488641080

x 1

x 2

x 3

x 4

x 5

Therefore what is 800 is base 6?3412?

Exercises

Decimal Binary Base 63 11 38 100 1210 1010 1477 1001101 205102 1100110 250105 1101001 2531365 10101010101 10153

?

? ?

?

? ?

? ?

? ?

??

? ?

Decimal to Hexadecimal

The most well-known usage of hexadecimal is to represent colours.

Each colour can be composed of red, green and blue light, each of intensity varying between 0 and 255.

...which can be represented using just 6 digits in hexadecimal, 2 for each of the three colour components.

A means 10, B means 11, ...F means 15

0 255 0

0 0 0

255 255 255

RED GREEN BLUE

255 255 0

75 172 198

255 128 0

? ? ?

? ? ?

? ? ?

? ? ?

HEXADECIMAL

FF, FF, FF

00, 00, 00

00, FF, 00

FF, FF, 00

4B, AC, C6

FF, 80, 00

? ? ?

?

?

?

?

?

0: 01: 162: 323: 484: 645: 806: 967: 1128: 1289: 144A: 160B: 176C: 192D: 208E: 224F: 240

Multiples of 16:

Exercises

Provided worksheet.

Adding in other bases

1 0 0 1+ 1 1 0 1

Adding in other bases

1 0 1 0+ 1 1 0 1 1

Multiplying in other bases

1 0 1 0 x 1 0 1

QQQ Time

The number of possible values each digit can have.

1a

1b Because each digit must be between 0 and one less than the base/the digits must be less than the base.

2a 2

2b 178

3 551

4

5

6

7

8

3900

11011

240

100100

a = 2, b = 4

?

?

?

?

?

?

?

?

?

?

top related