Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number System… Monika Gope Lecturer IICT, KUET. Inside The Computer 6/3/2014 2.

Similar presentations


Presentation on theme: "Number System… Monika Gope Lecturer IICT, KUET. Inside The Computer 6/3/2014 2."— Presentation transcript:

1 Number System… Monika Gope Lecturer IICT, KUET

2 Inside The Computer 6/3/2014 2

3 Decimal to Binary 6/3/2014 3 Step 1 Technique 1:

4 Decimal to Binary 6/3/2014 4 Step 2 Technique 1:

5 Decimal to Binary 6/3/2014 5 Steps Technique 1:

6 Decimal to Binary 6/3/2014 6 Steps Technique 1:

7 Decimal to Binary 6/3/2014 7 Step 1 Technique 2:

8 Decimal to Binary 6/3/2014 8 Step 2 Technique 2:

9 Decimal to Binary 6/3/2014 9 Step 3 Technique 2:

10 Decimal to Binary 6/3/2014 10 Step 4 Technique 2:

11 Decimal to Binary 6/3/2014 11 Step 5 Technique 2:

12 Decimal to Binary 6/3/2014 12 Step 6 Technique 2:

13 Decimal to Binary 6/3/2014 13 Step 7 Technique 2:

14 Decimal to Binary 6/3/2014 14 Step 8 Technique 2:

15 Decimal to Binary 6/3/2014 15 Step 9 Technique 2:

16 Binary to Decimal 6/3/2014 16 Step 1 Technique 1:

17 Binary to Decimal 6/3/2014 17 Step 2 Technique 1:

18 Binary to Decimal 6/3/2014 18 Step 3 Technique 1:

19 Binary to Decimal 6/3/2014 19 Step 4 Technique 1:

20 Binary to Decimal 6/3/2014 20 Step 5 Technique 1:

21 Binary to Decimal 6/3/2014 21 Step 1 Technique 2:

22 Binary to Decimal 6/3/2014 22 Step 2 Technique 2:

23 Binary to Decimal 6/3/2014 23 Step 3 Technique 2:

24 Binary to Decimal 6/3/2014 24 Step 4 Technique 2:

25 Binary to Decimal 6/3/2014 25 Step 5 Technique 2:

26 Binary to Decimal 6/3/2014 26 Step 6 Technique 2:

27 Binary to Decimal 6/3/2014 27 Step 7 Technique 2:

28 Binary to Decimal 6/3/2014 28 Step 9 Technique 2:

29 Binary to Decimal- Decimal to Binary 6/3/2014 29 (123) 10 = 1111011 (11100011) 2 = 227 150 = 10010110 10100010 = 162

30 Summary of Decimal Number System 6/3/2014 30 A positional Number System Has 10 Symbols or Digits (0,1,2,3,4, 5,6,7,8,9). Hence its base is 10. The maximum value of single digit is 9. Each position of a digit represent a specific power of the base 10.

31 Summary of Decimal Number System 6/3/2014 31 In positional number systems, there are only few symbols, called digits, and these symbols represent values, depending on the position, they occupy in the number. The value of each digit is determined by three steps The digit itself The position of the digit in the number The base of the number systems Examples Decimal number systems Binary number systems Octal number systems Hexadecimal number systems.

32 Summary of Binary Number System As we know that decimal system the base is equal to 10. It means that there are 10 digits in decimal system i.e. 0,1,2,3,…,9. Binary number system is same as decimal system, except that the base is 2, instead of 10. In Binary System there are only two digits (0,1), which can be used. Each position in a binary system represent the power of base (2) 6/3/2014 32

33 Summary of Binary Number System 6/3/2014 33 = 16 + 0 + 4 + 0+ 1 = 21

34 Octal Number System In Octal Number System, the base is 8. So, there are eight digits: 0,1,2,3,4,5,6 and 7. Each position in an octal number represents a power of base 8. Since there are only 8 digits, so 3 bits are sufficient to represent any octal number in binary, Example = 1024 + 0 + 40 + 7 = 1071

35 Hexadecimal Number System In hexadecimal number system, the base is 16. So, there are 16 digits or symbols in hexadecimal number system. First 10 digits are 0,1,2,3,4,5,6,7,8,9. The remaining six digits are denoted by the symbols A, B, C, D, E and F, representing the decimal values 10, 11,12, 13, 14 and 15, respectively. Each position in the hexadecimal system represents a power of the base (16) Example: = (1 * 256) + (10 * 16) + (15 * 1) = 256 + 160 + 15 = 431

36 Converting From One Number System To Another Any number in one number system can be represented in other number system. In computer system, the input and output is mostly in decimal number system. So, computer takes input in decimal and convert it into binary than process the input and converts again in decimal to produce output. Which is understandable to user.

37 Converting From Decimal to Another Base Four Steps Divide the decimal number to be converted by the value of new base. Record the remainder from Step 1 as the right most digit of the new base number. Divide the quotient of the previous divide by the new base. Record the remainder from step 3 as the next digit (to the left) of the new base. Repeat Step 3 and 4 until the quotient becomes zero.

38 Converting From Decimal To Another Base Example 2 42 remainder 21 0 10 1 5 0 2 1 1 0 0 1 Hence 42 = 101010

39 Converting to Decimal from Another Base Three steps. 1.Determine the column value of each digit (this depends on the position of the digit and the base of the number). 2.Multiply the obtain column values by the digits in the corresponding columns. 3.Sum the products calculated in step 2. The total is equivalent value in decimal.

40 Converting to Decimal from Another Base Example Step 1: Determine the values. 1 2 3 4 5 Step 2: Multiply Column values by corresponding column digits (1x16) + (1x8) + (0x4) + (0x2) + (1x1) Step 3: Sum the product 16 + 8 + 0 + 0 + 1 = 25

41 Decimal to Octal 6/3/2014 41 Step 9

42 Octal to Decimal The given number is 201 8 201 8 = (2 * 8 2 ) + (0 * 8 1 ) + (1 * 8 0 ) = 2 * 64 + 0 * 8 + 1 * 1 = 128+0+1 = 129 The equivalent decimal number for 201 8 is 129 201 8 = 129 6/3/2014 42

43 Decimal to Octal - Octal to Decimal 1.The given number is ( 532 ) 10 = ( ?) 8 2.The given number is ( 532 ) 8 = ( ?) 10 Answer: 1.1024, 2.346 6/3/2014 43

44 Hexadecimal Numbering systems Base: 16 Digits: 0, 1, 2, 3, 4, 5, 6, 7,8,9,A,B,C,D,E,F Hexadecimal number:1F4 16 powers of : 16 4 16 3 16 2 16 1 16 0 decimal value: 65536 4096 256 16 1 Hexadecimal number: 1 F 4

45 Hexadecimal Numbering systems Four-bit GroupDecimal DigitHexadecimal Digit 0000 0 0 0001 1 1 0010 2 2 0011 3 3 0100 4 4 0101 5 5 0110 6 6 0111 7 7 1000 8 8 1001 9 9 1010 10 A 1011 11 B 1100 12 C 1101 13 D 1110 14 E 1111 15 F

46 Hexa to Decimal Conversion To convert to base 10, beginning with the rightmost digit multiply each nth digit by 16 (n-1), and add all of the results together. Ex: 1F4 16 positional powers of 16: 16 3 16 2 16 1 16 0 decimal positional value: 4096 256 16 1 Hexadecimal number: 1 F 4 256 + 240 + 4 = 500 10

47 Converting From a Base Other Than 10 to a Base Other than 10 Two Steps Convert The original number into decimal number system Convert the decimal number obtained in step 1 to the new number.

48 Shortcut Method of converting Binary number system to Octal Number System Step 1: Divide the digits into group of three starting from the right Step 2: Convert each group of three binary digits to one octal digit using the method of binary to decimal conversion.

49 Shortcut Method of converting Binary number system to Octal Number System

50 Shortcut Method of converting Octal Number System to Binary number system

51 Shortcut Method of converting Binary number system to Hexadecimal Number System Step 1: Divide the digits into group of four starting from the right Step 2: Convert each group of four binary digits to one Hexadecimal number.

52 Shortcut Method of converting Binary number system to Hexadecimal Number System

53 Shortcut Method of converting Hexadecimal Number System to Binary number system Step 1: Convert Each Hexadecimal digit to a 4 digit binary number. Step 2: Combine all the resulting binary groups into a single binary number

54 Shortcut Method of converting Hexadecimal Number System to Binary number system

55 Fractional Numbers

56 Formation of Fractional Numbers in Binary Number System

57 6/3/2014 57 Anyone who has never made a mistake has never tried anything new. Einstein


Download ppt "Number System… Monika Gope Lecturer IICT, KUET. Inside The Computer 6/3/2014 2."

Similar presentations


Ads by Google