MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University,...

95
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida

Transcript of MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University,...

Page 1: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

M O D U L E – I

N U M B E R S Y S T E M

Digital Design

Amit Kumar

Assistant Professor

SCSE,

Galgotias University, Greater Noida

Page 2: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

•Introduction to Number System• Types of Number System• Binary• Octal• Decimal• Hexadecimal• Conversion from one number system to another

Outline

Page 3: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Introduction to Number SystemA number system defines how a number can be

represented using distinct symbols. A number can be represented differently in different systems. For example, the two numbers (2A)16 and (52)8 both refer to the same quantity, (42)10, but their representations are different.

Several number systems have been used in the past and can be categorized into two groups: positional and non-positional systems. Our main goal is to discuss the positional number systems, but we also give examples of non-positional systems.

Page 4: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Types of Number Systems

System Base SymbolsUsed by humans?

Used in computers?

Decimal 10 0, 1, … 9 Yes No

Binary 2 0, 1 No Yes

Octal 8 0, 1, … 7 No No

Hexa-decimal

16 0, 1, … 9,A, B, … F

No No

Page 5: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

POSITIONAL NUMBER SYSTEMS

In a positional number system, the position a symbol occupies in the number determines the value it represents. In this system, a number represented as:

has the value of:

in which S is the set of symbols, b is the base (or radix).

Page 6: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

The decimal system (base 10)

The word decimal is derived from the Latin root decem (ten). In this system the base b = 10 and we use ten symbols

The symbols in this system are often referred to as decimal digits or just digits.

Page 7: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Integers

Figure 1 Place values for an integer in the decimal system

Page 8: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 1

The following shows the place values for the integer +224 in the decimal system.

Note that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200. Also note that we normally drop the plus sign, but it is implicit.

Page 9: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 2

The following shows the place values for the decimal number −7508. We have used 1, 10, 100, and 1000 instead of powers of 10.

Note that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200. Also note that we normally drop the plus sign, but it is implicit.

( ) Values

Page 10: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Reals

Example 3

The following shows the place values for the real number +24.13.

Page 11: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

The word binary is derived from the Latin root bini (or two by two). In this system the base b = 2 and we use only two symbols,

The binary system (base 2)

S = {0, 1}

The symbols in this system are often referred to as binary digits or bits (binary digit).

Page 12: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Integers

Figure 2 Place values for an integer in the binary system

Page 13: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 4

The following shows that the number (11001)2 in binary is the same as 25 in decimal. The subscript 2 shows that the base is 2.

The equivalent decimal number is N = 16 + 8 + 0 + 0 + 1 = 25.

Page 14: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Reals

Example 5

The following shows that the number (101.11)2 in binary is equal to the number 5.75 in decimal.

Page 15: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

The word hexadecimal is derived from the Greek root hex (six) and the Latin root decem (ten). In this system the base b = 16 and we use sixteen symbols to represent a number. The set of symbols is

The hexadecimal system (base 16)

S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}

Note that the symbols A, B, C, D, E, F are equivalent to 10, 11, 12, 13, 14, and 15 respectively. The symbols in this system are often referred to as hexadecimal digits.

Page 16: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Integers

Figure 3 Place values for an integer in the hexadecimal system

Page 17: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 6

The following shows that the number (2AE)16 in hexadecimal is equivalent to 686 in decimal.

The equivalent decimal number is N = 512 + 160 + 14 = 686.

Page 18: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

The word octal is derived from the Latin root octo (eight). In this system the base b = 8 and we use eight symbols to represent a number. The set of symbols is

The octal system (base 8)

S = {0, 1, 2, 3, 4, 5, 6, 7}

Page 19: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Integers

Figure 4 Place values for an integer in the octal system

Page 20: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 7

The following shows that the number (1256)8 in octal is the same as 686 in decimal.

Note that the decimal number is N = 512 + 128 + 40 + 6 = 686.

Page 21: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Table 1 shows a summary of the four positional number systems discussed in this chapter.

Summary of the four positional systems

Page 22: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Table 2 shows how the number 0 to 15 is represented in different systems.

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Page 23: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

2.23

We need to know how to convert a number in one system to the equivalent number in another system. Since the decimal system is more familiar than the other systems, we first show how to covert from any base to decimal. Then we show how to convert from decimal to any base. Finally, we show how we can easily convert from binary to hexadecimal or octal and vice versa.

Conversion

The possibilities:

Hexadecimal

Decimal Octal

Binary

Page 24: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Any base to decimal conversion

Figure 5 Converting other bases to decimal

Page 25: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 8

The following shows how to convert the binary number (110.11)2 to decimal: (110.11)2 = 6.75.

Page 26: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 9

The following shows how to convert the hexadecimal number (1A.23)16 to decimal.

Note that the result in the decimal notation is not exact, because 3 × 16−2 = 0.01171875. We have rounded this value to three digits (0.012).

Page 27: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 10

The following shows how to convert (23.17)8 to decimal.

This means that (23.17)8 ≈ 19.234 in decimal. Again, we have rounded up 7 × 8−2 = 0.109375.

Page 28: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to any base

Figure 6 Converting other bases to decimal (integral part)

Page 29: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Figure 7 Converting the integral part of a number in decimal to other bases

Page 30: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 11

The following shows how to convert 35 in decimal to binary. We start with the number in decimal, we move to the left while continuously finding the quotients and the remainder of division by 2. The result is 35 = (100011)2.

Page 31: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 12

The following shows how to convert 126 in decimal to its equivalent in the octal system. We move to the right while continuously finding the quotients and the remainder of division by 8. The result is 126 = (176)8.

Page 32: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 13

The following shows how we convert 126 in decimal to its equivalent in the hexadecimal system. We move to the right while continuously finding the quotients and the remainder of division by 16. The result is 126 = (7E)16

Page 33: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Figure 8 Converting the fractional part of a number in decimal to other bases

Page 34: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Figure 9 Converting the fractional part of a number in decimal to other bases

Page 35: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 14

Convert the decimal number 0.625 to binary.

Since the number 0.625 = (0.101)2 has no integral part, the example shows how the fractional part is calculated.

Page 36: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 15The following shows how to convert 0.634 to octal using a maximum of four digits. The result is 0.634 = (0.5044)8. Note that we multiple by 8 (base octal).

Page 37: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 16

The following shows how to convert 178.6 in decimal to hexadecimal using only one digit to the right of the decimal point. The result is 178.6 = (B2.9)16 Note that we divide or multiple by 16 (base hexadecimal).

Page 38: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 17

An alternative method for converting a small decimal integer (usually less than 256) to binary is to break the number as the sum of numbers that are equivalent to the binary place values shown:

Page 39: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 18A similar method can be used to convert a decimal fraction to binary when the denominator is a power of two:

The answer is then (0.011011)2

Page 40: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary-hexadecimal conversion

Figure 10 Binary to hexadecimal and hexadecimal to binary conversion

Page 41: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 19

Show the hexadecimal equivalent of the binary number (110011100010)2.

SolutionWe first arrange the binary number in 4-bit patterns:

100 1110 0010

Note that the leftmost pattern can have one to four bits. We then use the equivalent of each pattern shown in Table 2.2 on page 25 to change the number to hexadecimal: (4E2)16.

Page 42: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 20

What is the binary equivalent of (24C)16?

SolutionEach hexadecimal digit is converted to 4-bit patterns:

2 → 0010, 4 → 0100, and C → 1100

The result is (001001001100)2.

Page 43: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary-octal conversion

Figure 10 Binary to octal and octal to binary conversion

Page 44: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 21

Show the octal equivalent of the binary number (101110010)2.SolutionEach group of three bits is translated into one octal digit. The equivalent of each 3-bit group is shown in Table 2.2 on page 25.

The result is (562)8.

101 110 010

Page 45: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 22

What is the binary equivalent of for (24)8?

SolutionWrite each octal digit as its equivalent bit pattern to get

2 → 010 and 4 → 100

The result is (010100)2.

Page 46: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal-hexadecimal conversion

Figure 12 Octal to hexadecimal and hexadecimal to octal conversion

Page 47: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 23Find the minimum number of binary digits required to store decimal integers with a maximum of six digits.

Solutionk = 6, b1 = 10, and b2 = 2. Then

x = ék × (logb1 / logb2)ù = é6 × (1 / 0.30103)ù = 20.

The largest six-digit decimal number is 999,999 and the largest 20-bit binary number is 1,048,575. Note that the largest number that can be represented by a 19-bit number is 524287, which is smaller than 999,999. We definitely need twenty bits.

Page 48: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

NONPOSITIONAL NUMBER SYSTEMS

Although non-positional number systems are not used in computers, we give a short review here for comparison with positional number systems. A non-positional number system still uses a limited number of symbols in which each symbol has a value. However, the position a symbol occupies in the number normally bears no relation to its value—the value of each symbol is fixed. To find the value of a number, we add the value of all symbols present in the representation.

Page 49: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

In this system, a number is represented as:

and has the value of:

There are some exceptions to the addition rule we just mentioned, as shown in Example 24.

Page 50: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 24Roman numerals are a good example of a non-positional number system. This number system has a set of symbols S = {I, V, X, L, C, D, M}. The values of each symbol are shown in Table 2.3

To find the value of a number, we need to add the value of symbols subject to specific rules (See the textbook).

Page 51: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example 24

The following shows some Roman numbers and their values.

(Continued)

Page 52: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

More on Base Conversion

Page 53: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary to Decimal

Hexadecimal

Decimal Octal

Binary

Page 54: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

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

Page 55: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

1010112 => 1 x 20 = 11 x 21 =

20 x 22 =

01 x 23 =

80 x 24 =

01 x 25 =

32

4310

Bit “0”

Page 56: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal to Decimal

Hexadecimal

Decimal Octal

Binary

Page 57: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

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

Page 58: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

7248 => 4 x 80 = 42 x 81 = 167 x 82 = 448

46810

Page 59: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Hexadecimal to Decimal

Hexadecimal

Decimal Octal

Binary

Page 60: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

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

Page 61: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

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

274810

Page 62: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Binary

Hexadecimal

Decimal Octal

Binary

Page 63: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Binary

Technique Divide by two, keep track of the remainder First remainder is bit 0 (LSB, least-significant bit) Second remainder is bit 1 Etc.

Page 64: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

12510 = ?22 125 62 12 31 02 15 12 7 12 3 12 1 12 0 1

12510 = 11111012

Page 65: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal to Binary

Hexadecimal

Decimal Octal

Binary

Page 66: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal to Binary

Technique Convert each octal digit to a 3-bit equivalent binary

representation

Page 67: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

7058 = ?2

7 0 5

111 000 101

7058 = 1110001012

Page 68: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Hexadecimal to Binary

Hexadecimal

Decimal Octal

Binary

Page 69: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Hexadecimal to Binary

Technique Convert each hexadecimal digit to a 4-bit equivalent

binary representation

Page 70: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

10AF16 = ?2

1 0 A F

0001 0000 1010 1111

10AF16 = 00010000101011112

Page 71: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Octal

Hexadecimal

Decimal Octal

Binary

Page 72: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Octal

Technique Divide by 8 Keep track of the remainder

Page 73: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

123410 = ?8

8 1234 154 28 19 28 2 38 0 2

123410 = 23228

Page 74: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Page 75: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Decimal to Hexadecimal

Technique Divide by 16 Keep track of the remainder

Page 76: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

123410 = ?16

123410 = 4D216

16 1234 77 216 4 13 = D16 0 4

Page 77: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary to Octal

Hexadecimal

Decimal Octal

Binary

Page 78: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary to Octal

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

Page 79: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

10110101112 = ?8

1 011 010 111

1 3 2 7

10110101112 = 13278

Page 80: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Page 81: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Binary to Hexadecimal

Technique Group bits in fours, starting on right Convert to hexadecimal digits

Page 82: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

10101110112 = ?16

10 1011 1011

2 B B

10101110112 = 2BB16

Page 83: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Page 84: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Octal to Hexadecimal

Technique Use binary as an intermediary

Page 85: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

10768 = ?16

1 0 7 6

001 000 111 110

2 3 E

10768 = 23E16

Page 86: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Hexadecimal to Octal

Hexadecimal

Decimal Octal

Binary

Page 87: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Hexadecimal to Octal

Technique Use binary as an intermediary

Page 88: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Example

1F0C16 = ?8

1 F 0 C

0001 1111 0000 1100

1 7 4 1 4

1F0C16 = 174148

Page 89: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Exercise – Convert ...

Decimal Binary OctalHexa-

decimal

33

1110101

703

1AF

Page 90: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Exercise – Convert …

Decimal Binary OctalHexa-

decimal

33 100001 41 21

117 1110101 165 75

451 111000011 703 1C3

431 110101111 657 1AF

Answer

Page 91: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Fractions

Binary to decimal

pp. 46-50

10.1011 => 1 x 2-4 = 0.06251 x 2-3 = 0.1250 x 2-2 = 0.01 x 2-1 = 0.50 x 20 = 0.01 x 21 = 2.0 2.6875

Page 92: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Fractions

Decimal to binary

p. 50

3.14579

.14579x 20.29158x 20.58316x 21.16632x 20.33264x 20.66528x 21.33056

etc.11.001001...

Page 93: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Exercise – Convert ...

Decimal Binary OctalHexa-

decimal

29.8

101.1101

3.07

C.82

Page 94: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Exercise – Convert …

Decimal Binary OctalHexa-

decimal

29.8 11101.110011… 35.63… 1D.CC…

5.8125 101.1101 5.64 5.D

3.109375 11.000111 3.07 3.1C

12.5078125 1100.10000010 14.404 C.82

Answer

Page 95: MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.

Thank you