45
Presentation Topic Conversion of Numbers

Conversion of number system

Embed Size (px)

Citation preview

Page 1: Conversion of number system

Presentation Topic Conversion

of Numbers

Page 2: Conversion of number system

What we are going to explain

• Conversion between Binary & Decimal.

• Conversion between Decimal & Hexadecimal.

• Conversion between Hexadecimal & Binary.

• Conversion between Decimal & Octal.

• Conversion between Octal & Hexadecimal.

• Conversion between Binary & Octal.

Page 3: Conversion of number system

The possibilities:

Hexadecimal

Decimal Octal

Binary

Conversion Among Bases

Page 4: Conversion of number system

SystemSystem BasBasee

SymbolsSymbolsUsed by Used by humanshumans??

Used in Used in computerscomputers??

DecimaDecimall

1010 0, 1, … 90, 1, … 9 YesYes NoNo

BinaryBinary 22 0, 10, 1 NoNo YesYes

OctalOctal 88 0, 1, … 70, 1, … 7 NoNo NoNo

HexadeHexadecimalcimal

1616 0, 1, … 0, 1, … 9,9,A, B, … A, B, … FF

NoNo NoNo

Common Number SystemsCommon Number Systems

Page 5: Conversion of number system

Binary to Decimal

Hexadecimal

Decimal Octal

Binary

Page 6: Conversion of number system

• Technique–Multiply each bit by 2n, where n is the

“weight” of the bit.–The weight is the position of the bit,

starting from 0 on the right.–Add the results.

Binary to Decimal

Page 7: Conversion of number system

(101011)2 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32

(43)10

Bit “0”

EXAMPLE

Page 8: Conversion of number system

Decimal to Binary

Hexadecimal

Decimal Octal

Binary

Page 9: Conversion of number system

Example

Page 10: Conversion of number system

Example

Page 11: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Hexadecimal to BinaryHexadecimal to Binary

Page 12: Conversion of number system

TechniqueTechnique Convert each hexadecimal digit to a Convert each hexadecimal digit to a

4-bit equivalent binary representation4-bit equivalent binary representation

Hexadecimal to BinaryHexadecimal to Binary

Page 13: Conversion of number system

ExampleExample

1 0 A F1 0 A F

0001 0000 1010 11110001 0000 1010 1111

10AF16 = 00010000101011112

10AF16 = ?2

Page 14: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Binary to HexadecimalBinary to Hexadecimal

Page 15: Conversion of number system

Technique› Group bits in fours, starting on right

› Convert to hexadecimal digits

Page 16: Conversion of number system

10101110112 = ?16

10 1011 1011

2 B B

10101110112 = 2BB16

Page 17: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Octal to DecimalOctal to Decimal

Page 18: Conversion of number system

Octal to DecimalOctal to Decimal TechniqueTechnique

• Multiply each bit by 8Multiply each bit by 8nn, where , where nn is is the “weight” of the bit.the “weight” of the bit.

• The weight is the position of the The weight is the position of the bit, starting from 0 on the right.bit, starting from 0 on the right.

• Add the resultsAdd the results

Page 19: Conversion of number system

7248 =>4 x 80 = 4 2 x 81 = 16 7 x 82 = 448

(468)10

Page 20: Conversion of number system

Example

Page 21: Conversion of number system

Decimal to Octal

Hexadecimal

Decimal Octal

Binary

Page 22: Conversion of number system

Technique Divide by 8 Keep track of the remainder

Decimal to Octal

Page 23: Conversion of number system

ExampleExample

Page 24: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Page 25: Conversion of number system
Page 26: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Binary to Octal

Page 27: Conversion of number system

Binary to Octal

• Technique– Group bits in threes, starting on right– Convert to octal digits

Page 28: Conversion of number system

10110101112 = ?8

1 011 010 111

1 3 2 7

10110101112 = 13278

Example

Page 29: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Page 30: Conversion of number system

TechniqueMultiply each bit by 16n, where n is

the “weight” of the bit

The weight is the position of the bit, starting from 0 on the right

Add the results

Page 31: Conversion of number system
Page 32: Conversion of number system

ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560

274810

ExampleExample

Page 33: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Page 34: Conversion of number system

TechniqueDivide by 16Keep track of the remainder

Page 35: Conversion of number system
Page 36: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Page 37: Conversion of number system

TechniqueUse binary as an intermediary

Page 38: Conversion of number system

10768 = ?16

1 0 7 6

001 000 111 110

2 3 E

10768 = 23E16

Page 39: Conversion of number system

Hexadecimal

Decimal Octal

Binary

Page 40: Conversion of number system

TechniqueUse binary as an intermediary

Page 41: Conversion of number system

1F0C16 = ?8

1 F 0 C

0001 1111 0000 1100

1 7 4 1 4

1F0C16 = 174148

Page 42: Conversion of number system

That’s all for our today’s presentation

Page 43: Conversion of number system

Any question

Page 44: Conversion of number system

Before We Go…….

Page 45: Conversion of number system

Thanks to everyone for your kind support

Good Bye