Docsity

Number Systems and Conversions: Decimal, Binary, Octal, and Hexadecimal, Exams of Number Theory

Partial preview of the text

Download Number Systems and Conversions: Decimal, Binary, Octal, and Hexadecimal and more Exams Number Theory in PDF only on Docsity!

NUMBER SYSTEM & CONVERSION

Number System

Number System

Decimal system uses 10 symbols (digits) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9Octal System uses eight symbols 0, 1, 2, 3, 4, 5, 6, 7Binary System uses only two symbols 0 and 1Hexadecimal System uses sixteen symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F to represent any number, no matter how large or how small.

Octal System (Base – 8 ns) Hexa decimal Number System (Base – 16) Decimal Number (Base-10) Binary Equivalent (Base-2) Base 4 number System (Base - 4) 0 0 0 0 0 1 1 1 1 1 2 2 2 10 2 3 3 3 11 3 4 4 4 100 10 5 5 5 101 11 6 6 6 110 12 7 7 7 111 13 10 8 8 1000 20 11 9 9 1001 21 12 A 10 1010 22 13 B 11 1011 23 14 C 12 1100 30 15 D 13 1101 31 16 E 14 1110 32 17 F 15 1111 33 Familiar System

KB, MB, GB …

 In computer, the basic unit is byte (B)  And, we use KB, MB, GB many many many times  2 10 = 1024 =  2 20 = 1024 x 1024 =  2 30 = 1024 x 1024 x 1024 =  How about these?  2 40 =  2 50 =  2 60 =  2 70 =  … 1GB (gigabyte) 1MB (megabyte) 1KB (kilobyte) 1TB (terabyte) 1PB (petabyte) 1EB (exabyte) 1ZB (zettabyte)

Decimal System

 The decimal system is composed of 10 numerals or

symbols. These 10 symbols are 0,1,2,3,4,5,6,7,8,9;

using these symbols as digits of a number, we can

express any quantity.

 Example : 3501.

3 5 0 1. 5 1 digit decimal point Most Significant Digit Least Significant Digit

Decimal Number Quantity (positional number)

 3 5 0 1 (base-10)

1 X 10 0 = 1 0 X 10 1 = 0 5 X 10 2 = 500 3 X 10 3 = 3000 3000 + 500 + 0 + 1 = 3501

Binary-to-Decimal Conversion

 1 1 0 1 (base-2)

1 X 2 0 = 1 0 X 2 1 = 0 1 X 2 2 = 4 1 X 2 3 = 8 8 + 4 + 0 + 1 = 13 1101 2 = 13 10

Hexadecimal-to-Decimal Conversion

 1 A C F (base-16) [ A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 ]

15 X 16 0 =15x1 = 15 12 X 16 1 =12x16 = 192 10 X 16 2 =10x256 = 2560 1 X 16 3 = 5x4096 = 20480 20480 + 2560 + 192 + 15 = 23247 1ACF 16 = 23247 10

Decimal Number Quantity

(fractional number)

= 5x0.1 = 0.
  • 5 X  5 8 1 (base-10)
        • = 5x0.1 = 0.
  • 8 X
        • = 8x0.01 = 0.
  • 1 X
      • = 1x0.001 = 0.
  • 0.5 + 0.08 + 0.001 = 0.

Octal-to-Decimal Conversion

. 2 5 (base-8)

2 X 8

- 1 = 2x0.125 = 0. 5 X 8 - 2 = 5x0.015625 = 0. 0.25 + 0.017825 = 0.

8 = 0. 10

Hexadecimal-to-Decimal Conversion

. F 5 (base-16)

15 X

- 1 = 15x0.0625 = 0. 5 X - 2 = 5x0. = 0. 0.9375 + 0.01953125 = 0. 0.F 16 = 0. 10

Decimal-to-Binary Conversion (positional number)

2 250 2 125 Remainder 0 2 62 Remainder 1 2 31 Remainder 0 2 15 Remainder 1 2 7 Remainder 1 2 3 Remainder 1 1 Remainder 1 250 10 = 1 1 1 1 1 0 1 0 2

Decimal-to-Octal Conversion

8 250 8 31 Remainder 2 3 Remainder 7 250 10 = 372 8