Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.

Similar presentations


Presentation on theme: "Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages."— Presentation transcript:

1 Chapter 1 Number Systems Digital Electronics

2 Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages of digital signals over analog. Binary system Review of binary conversions.

3 Review of base 10 – decimal number system A decimal number with the value of each place holder or digit can be expressed as a power of 10. For example in decimal number 1234.56, 1 is at thousands place, 2 at hundreds, 3 at tens, 4 at units, 5 at tenths and 6 at hundredths. This number can be expressed by sum of weights as, 1 2 34.5 6 1 x 10 4 + 2 x 10 3 + 3 x 10 2 + 4 x 10 1 + 5 X 10 -1 +6 X 10 -2 In decimal number system we have 10 symbols i. e. 0, 1, 2, 3, 4,5,6, 7, 8, 9 Number of symbols for any number system is equal to base or radix of that system. So, decimal number system has base 10.

4 In any number system, when the count at any digit place passes to highest value of symbol, the digit rolls back to 0 and next digit is incremented by 1. For example, in decimal number system, if the digit at units place reaches to 9 then units place is set to 0 and tens place is set to 1. Another example is an electricity unit reading meter. 0  1  2  3  4  5  6  7  8  9  10

5 Binary Number System Need of binary number system If we use decimal number system for building electronic circuits, then we need to generate, manipulate and store 10 different logic levels. This will make the electronic circuitry complex. It is relatively easy to build the circuits which can handle only 2 logic levels. Therefore binary number systems are used in designing of digital systems.

6 Binary Number System Binary number system uses only two symbols i. e. 0 and 1. A binary digit or symbol is known as a bit and each binary digit can be expressed as power of 2. In binary system you count as 0  1  10  11  100  101  110  111, and so on. Binary numbers are also known as binary words, and binary words with certain number of bits have also acquired special names. A binary word with 4 bits is called a nibble. A binary word with 8 bits is called a byte. A binary word with 16 bits is called a word. A binary word with 32 bits is called a double word.

7 Binary Number System In any binary word the rightmost bit is known as Least Significant bit (LSB) and leftmost bit is known as Most Significant bit (MSB). For example in a byte 01101011 0 is MSB 1 is LSB

8 Octal Number System Octal number system uses 8 symbols i. e. 0,1,2,3,4,5,6,7. Therefore, it is also called base 8 system. In octal number system you can count as 0  1  2  3  4  5  6  7  10  11  12 and so on. If we have very long string of binary numbers it is not convenient to handle that data and user may convert the data to equivalent octal code. By using this system code length can be reduced to one third of its length in binary number system.

9 Hexadecimal Number System The hexadecimal system has base 16 i. e. it contains 16 symbols. These symbols are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, and F. It is also known as alphanumeric number system as it uses both digits and alphabets. What is the need of such system?

10 HexadecimalDecimalBinary 000 111 2310 3411 45100 56101 67110 78111 891000 9101001 A111010 B121011 C131100 D141101 E151110 F161111 From the table you can see that a long string is used to represent number “16” in binary number system but If we use hexadecimal number system in place of binary number system this length will get reduced to a single symbol ‘F’

11 Conversions from one number system to another Need of number system conversions As we know that computer understands the language of 0 and 1 only, we need to convert the data into binary form before feeding it to the computer and also we need to convert it back to decimal form for user. Because of this reason we need to learn conversion methods.

12 Conversion from any number system to decimal number system In general decimal equivalent of a number, expressed in any other number system is given by, a j. r n + a j-1. r n-1 +... +a 2. r 2 + a 1. r1 + a 0 + a -1. r -1 + a -2. r -2 +....+ a -k. r -m ……. eq.1 where, m, n  represents place value or power of base by which the coefficient should be multiplied. r  represents the base of number system in which the number is expressed. aj  represents the jth coefficient of the digit which can be any of the digit of number system in which the number is expressed.

13 Keeping this equation in mind let us try conversion of binary number 110.11 into decimal number. (A) 10 = 1 x 2 2 + 1x 2 1 + 0 x 2 0 + 1x 2 -1 +1x2 -2 = 6.75 Similarly, try the conversion of following binary numbers to decimal equivalent. (.0001) 2 (1100100.101) 2 (.101) 2

14 Octal to decimal conversion Using equation 1 convert the following numbers into decimal numbers (314) 8 (345) 8 (630.4) 8

15 Hexadecimal To Decimal Conversion Using equation 1 convert the following numbers into decimal numbers (10BF) 16 (176) 16

16 Conversion from decimal to binary Repeated Division by 2 method Begin by dividing the decimal number by 2. Then divide each resulting quotient by 2 until there is a 0 whole-number quotient. The remainders generated by each division form the binary number. The first remainder is the LSB and the last remainder is the MSB of the binary number.

17 Example: Convert decimal no. 64 to binary number 2 64 2 32 --- 0 2 16 --- 0 2 8 --- 0 2 4 --- 0 2 2 --- 0 2 1 --- 0 2 0 --- 1 (64) 10 = (1000000) 2

18 Conversion from decimal to octal Repeated Division by 8 method Begin by dividing the decimal number by 8. Then divide each resulting quotient by 8 until there is a 0 whole-number quotient. The remainders generated by each division form the binary number. The first remainder is the LSB and the last remainder is the MSB of the binary number.

19 Convert the following decimal numbers in numbers (279) 10 (43) 10 Convert the following decimal numbers to hexadecimal numbers (837) 10 (2748) 10

20 Conversion from binary to octal number system For any given binary number make groups of three digits each, starting from the binary point and proceeding from the left to the right. After making groups, start assigning octal digit to each group. For example if you want to convert 11011011 to octal number then as described above make groups of digit (011 011 011) 2 ( 3 3 3) 8

21 Conversion from binary to hexadecimal number system For binary to hexadecimal conversion, same method which was used for binary to octal conversion can be used, with an exception that now you need to make group of four digits starting from right side and proceeding towards the left. after making groups assign equivalent hexadecimal code to each group. Example: Convert 11110111100011 to a hexadecimal number ( 0011 1101 1110 0011) 2 ( 3 D E 3) 16

22 Convert the following binary numbers to octal numbers (10110001) 2 (101011111) 2 Convert the following binary numbers to hexadecimal numbers (00110000) 2 (01101101) 2

23 Signed Numbers In binary number system, bits are also used to represent sign of number. Remember the decimal number system in which “+” and “-” signs are used to represent the sign of number. Binary system uses the bits “0” and “1” to show sign of number. A “0” is for positive and “1” is for negative. The left most bit in a signed binary number is the sign bit, which tells whether the number is positive or negative. Example:00011001 Sign bit Magnitude bits This is decimal number +25.

24 Complements Complements are used in digital computers to simplify the subtraction operation and for logical manipulations. Types of complements 1) The radix complement 2) Diminished radix complement Radix complement is also called r’s complement, and diminished radix complement as (r -1)’s complement.


Download ppt "Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages."

Similar presentations


Ads by Google