Docsity

Common Number Systems, Slides of Computer science

Partial preview of the text

Download Common Number Systems and more Slides Computer science in PDF only on Docsity!

Unit

Number Systems

College of Computer and Information Sciences Department of Computer Science CSC 220: Computer Organization

Quantities/Counting (1 of 3)

Decimal Binary Octal

Hexa- decimal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7

Quantities/Counting (2 of 3)

Decimal Binary Octal

Hexa- decimal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F

Conversion Among Bases

  • The possibilities:

Hexadecimal

Decimal Octal

Binary

Decimal to Decimal (just for fun)

Hexadecimal

Decimal Octal

Binary

12510 => 5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = 100 125

Base

Weight

Binary to Decimal

  • 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

Example

  • 1010112 => 1 x 2 0 =
    • 1 x 2 1 =
    • 0 x 2 2 =
    • 1 x 2 3 =
    • 0 x 2 4 =
    • 1 x 2 5 =
      • 43

Octal to Decimal

Hexadecimal

Decimal Octal

Binary

Octal to Decimal

  • Technique
    • Multiply each bit by 8n^ , 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

Hexadecimal to Decimal

Hexadecimal

Decimal Octal

Binary

Hexadecimal to Decimal

  • Technique
    • Multiply 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