number systems revision introductory lesson decimal | binary | hexadecimal 1

Post on 24-Dec-2015

218 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Number Systems

Revision Introductory Lesson

Decimal | Binary | Hexadecimal

1

2

Decimal System

In this topic …

Binary System

Hexadecimal System

Conversions

3

Conversions …

Binary Decimal Decimal Binary

Binary Hexadecimal

Hexadecimal Binary

Decimal Hexadecimal

4

Decimal System• Ten fingers• Ten different numbers possible: • 0 1 2 3 4 5 6 7 8 9

• Base 10 e.g. 654210

5

6 5 4 2100 = 1x 2 = 2101 = 10 x 4 = 40102 = 100 x 5 = 500103 = 1000 x 6 = 6000 + 6542

… 104 103 102 101 100 … 10000 1000 100 10 1

thou

sand

s

hund

reds

tens

units

6 5 4 2Our Number System

6

Binary System

• Switch

• Two possible values: 0 and 1

• Base 2 E.g. 011101012

7

Binary System

… 27 26 25 24 23 22 21 20

… 128 64 32 16 8 4 2 1 0 1 1 1 0 1 0 1

MSB LSB

Most Significant Bit Least Significant BitThe bit position having

the greatest valueThe bit position having

the least value

8

Binary to Decimal Conversion

Q: Convert 011101012 to decimal.

A: 2 14816

32

64

128 0 1101110

64 + 32 + 16 + 4 + 1 = 11710

Add together the corresponding values where there is a 1

9

Decimal to Binary ConversionMethod 1 – Using Long Division

Q: Convert 1810 to binary:

A: 1829

r 0

242 r 1

r 0

22120

r 0r 1

1810 = 0100102

10

Decimal to Binary ConversionMethod 2 – Using Weights

Q: Convert 17310 to binary.

A: 2 14816

32

64

128 0 1110101

173 –128 45

45 –32 13

13 – 8 5

5 – 4

1

1 – 1 0

2

Working:

11

Any Questions?

top related