1 UNIT 2: NUMBER SYSTEM AND CODES. Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers Binary-to-Decimal conversion Decimal-to-Binary Conversion 2.4 Octal Numbers Octal-to-Binary Conversion Binary-to-Octal Conversion Octal-to-Decimal Conversion Decimal-to-Octal conversion 2.5 Hexadecimal Numbers Hexadecimal-to-Binary Conversion Binary-to-Hexadecimal Conversion Hexadecimal-to-Decimal Conversion Decimal-to-Hexadecimal Conversion Octal to Hexadecimal Conversion Hexadecimal to Octal Conversion 2.6 Arithmetic Operation s and 2 s Complement Subtraction using 1 s complement Subtraction using 2 s complement s and 10 s Complement Subtraction using 9,s complement Subtraction using 10 s complement 2.9 Codes BCD code Excess-3 code Gray code 2.10 Unit Summary 2.1 INTRODUCTION. The study of number system begins with the familiar decimal number system. The decimal number system consists of ten unique digits 0 to 9. So, its base/radix is 10 (since it involves with 10 symbols).the digits 0 to 9 are used to specify any number. Computers and other digital circuits don t process decimal numbers. They work with binary numbers which consists of only two digits 0&1.This creates a problem. Because to represent larger decimal quantities, a very long binary number is required. So to compress this long string of binary numbers, octal & hexadecimal number systems are widely used in digital systems.so the knowledge of these number systems is very essential for understanding, analyzing and designing of digital systems.
2 This unit discuss about the decimal, binary, octal and hexadecimal numbers. The inter conversion of these number systems are also explained here. Different types of codes, which are commonly used in digital systems and microprocessors have also been discussed in this unit. 2.2 OBJECTIVES. After going through this unit you will be able to i) Explain different types of number system (Binary, Decimal, and Octal & Hexadecimal) ii) Convert one number system to another iii) Appreciate binary arithmetic operation iv) Define complements (1 s, 2 s, 9 s & 10 s complement) v) Apply use of complements in subtraction vi) Explain different types of codes and convert a code to binary and vice versa. 2.3 BINARY NUMBERS. Binary number system is extensively used in digital electronics since it uses only one two symbols 1 & 0. These two digits represent the two voltage levels high or low in digital electronics. The base (radix) of the binary number system is 2. It is a positional system, i.e., every position is assigned a specific weight. In digital system each binary digit is called a bit A group of 4 bit is called nibble A group of 8 bit is called byte Representation of Decimal and Binary numbers The following table represents the decimal number and its corresponding binary number Decimal Binary Number Number B3 B2 B1 B `
3 2.3.1 Binary to Decimal conversion Binary numbers can be converted into a decimal number by multiplying by the binary numbers 1 or 0 by their positional weight and adding the product. Convert the binary number to its decimal equivalent Binary Number Conversation of Binary to decimal 1x2 4 +1x2 3 +0x2 2 +1x2 1 +0x2 0 = =26 Decimal Equivalent Decimal to Binary conversion Any decimal numbers can be converted into its equivalent binary numbers by successive division by 2 and keeping the track of the reminders. The division is continued till the quotient is 0. The number read from bottom to top gives the equivalent binary number. Convert 26 to its binary equivalent Decimal Number Quotient Remainder Binary Equivalent 26/ MSB (26) 10 13/ / / /2 0 1-LSB (11010) The decimal fraction is converted to binary fraction by successive multiplication by 2 and keeping the track of integers generated. The multiplication is continuities till the fraction part of the product is 0. The integers read from top to bottom to get the binary equivalent. For example Convert to its binary equivalent Decimal Number Generated Integer 0.625x MSB Binary Equivalent
4 x x LSB 0.000x SELF CHECK EXERCISE 1. A. For Q No. 1-5 select the most appropriate alternative from among the four alternatives given below each question 1. The digital systems usually operate on system. a) Binary b) decimalc) octal d) hexadecimal 2. The binary system uses power of for positional values. a) 2 b) 8 c) 16 d) After counting 0, 1, 10, 11, the next binary number is a) 12 b) 100 c) 101 d) The number 1000 is equivalent to decimal number a) one thousand b) eight c) four d) sixteen 5. In binary numbers, shifting the binary point one place to the right a) Multiplies by 2 b) divides by 2 c) Decreases by 2 d) increases by 10 B. Answer the following questions 6. Convert the following decimal numbers to their binary equivalents: a) 167 b) c) 52 d) How do you convert a decimal number to an equivalent number in any other base system? 2.4 OCTAL NUMBERS. The base or( radix) of the octal number system is 8.This number system uses 8 different symbols 0,1,2,3,4,5,6,7. Each significant position in an octal no. system has a positional weight. These weights are given in the ascending powers of 8, i.e 8 0, 8 1, 8 2,.etc. respectively.
5 The binary equivalent of an octal no. must be a group of 3 bits word, since the base of octal no. system is 8= Octal to Binary conversion Octal numbers can be converted into equivalent binary numbers by replacing each octal digit by its 3 bit equivalent binary. Convert (3702) 8 to a binary number. (3702) 8 = The number (3702) 8 = ( ) 2 = ( ) 2 On the most significant digit, leading zeros can be suppressed.i.e. 3 can be written as 11 instead of Binary to Octal conversion To convert from binary to octal back, the reverse procedure is used.i.e. divide the whole binary string into groups of 3 bits. Then starting from LSB and moving towards MSB, convert each group of 3 bits into the corresponding octal digit. Convert ( ) 2 to an octal number. Solution: Therefore ( ) 2 = (2537) Octal to Decimal conversion Any octal number can be converted into its equivalent decimal number by multiplying each digit of the octal number by the weight of its position and then adding the products.
6 Convert ( ) 8 into its equivalent decimal number. Solution ( ) 8 =4 x x x x x x 8-2 = = ( ) Decimal to Octal conversion The octal equivalent of a decimal no. can be obtained by dividing a given decimal number by 8 repeatedly until a quotient 0 is obtained. The process is exactly the same as the method explained earlier. The following example illustrates the conversion from decimal to octal. Convert ( ) 10 to octal no. Integer Part Quotient Reminder Octal Equivalent 115/ MSB /8 1 6 (163) 8 1/8 0 1 LSB Fractional Part Result Integral Part Octal Equivalent x (0.1875) x (0.14) 8 Therefore ( ) 10 = (163.14) 8 SELF CHECK EXERCISE 2. A. For Q No select the most appropriate alternative from among the four alternatives given below each question 8. The number 12 8 is equivalent to decimal a) 12 b) 20 c) 10 d) 4 9. The number is equivalent to octal a) 54 b) 45 c) 37 d) 25
7 10. The number 17 8 is equivalent to binary a) 11 b) 1110 c) d) Which of the following is NOT an octal number? a) 19 b) 77 c) 15 d) 101 B. Answer the following questions 12. Convert each of the octal numbers to binary. a)15 8 b) c) d) Convert the following decimal no. to octal no. then to binary. a)59 b) 0.58 c) 64.2 d) HEXADECIMAL NUMBERS. The hexadecimal number system is the most popular means of direct data entry and retrieval in digital system. The base of hexadecimal number system is 16 and uses 16 symbols, namely, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The symbol A to F represents the decimal 10 to 15 respectively. Since its base is 16= 2 4, every 4 bit binary digit combination can be represented by one hexadecimal digit. Each significant position in an hexadecimal number has a positional weight. These weights are given in the ascending powers of 16. i.e., 16 0, 16 1, 16 2,. etc Hexadecimal-to-Binary Conversion The conversion of Hexadecimal to Binary is the reverse process of conversion from Binary to Hexadecimal as explained above. i.e. each hexdigit is replaced by its 4-bit binary group. Convert (2DAC) 16 to Binary (2DAC) 16 = 2 D A C = ( ) 2
8 2.5.2 Binary to Hexadecimal conversion To convert a binary no. to a hexadecimal no., divide the whole binary string in to groups of 4 bits each and then replace each 4 bit group by the equivalent hexadecimal digit Convert ( ) 2 to hexadecimal no. ( ) 2 = = 2 A 4 = (2A4) Hexadecimal to Decimal conversion To Convert a Hexadecimal number to Decimal multiply each digit in the Hex no. by its position weight and take the summation of all these product terms Convert to (5A6) 16 to Decimal (5A6) 16 = 5 x x x 16 0 = = (1446) Decimal to Hexadecimal conversion A decimal no. can be converted to Hexadecimal no. by successively dividing the given decimal no. by 16 till the quotient is 0. Convert (2598) 10 to Hexadecimal Decimal Number (2598) 10 Quotient Remainder in Decimal Hexadecimal No. 2898/ / / A Hexadecimal Equivalent (A326) 16 Therefore (2598) 10 = (A326) 16
9 2.5.5 Octal to Hexadecimal conversion To convert an octal no. to hexadecimal the easiest method is to first convert the hex no. to its binary equivalent and then the binary no. to hexadecimal. It will be clear from the example given below. Convert ( ) 8 to hexadecimal no. ( ) 8 = = For the integer part, group the binary bits into 4 from LSB to MSB and for the fractional part group the bits from the MSB to LSB ( ) 8 = = 1 E E = (1EE.810) Hexadecimal to Octal conversion To convert a hexadecimal no. to octal, the simple way is to first convert binary no. to octal. Convert (56) 16 to Octal no. (56) 16 = = ( ) 2 = = = (126) 8 SELF CHECK EXERCISE 3. A. For Q No select the most appropriate alternative from among the four alternatives given below each question 14. The radix/base of the hexadecimal no. system is a)10 b)16 c) 8 d) The symbol E represents the decimal a)13 b)15 c) 14 d) 12
10 16. The number 2D 16 is equivalent to binary a) b) c) d) Hexadecimal number system is used as a shorthand language for representing numbers. a) decimal b)binary c) octal d) large 18.The binary equivalent of A 16 is a)1010 b) 1011 c) 1000 d) The number is equivalent to octal a) 701 b) 137 c) 401 d) 107 B. Answer the following questions 20. What are the advantages of a a) Binary no. system b) Hexadecimal no. system 21. Convert the following hexadecimal numbers to binary. a) b) c) 4BAC 16 d) 3A9.BD ARITHMETIC OPERATION. Binary arithmetic is much simpler than decimal arithmetic because here only two digits 0&1 are involved. Arithmetic operations in a computer are done in its arithmetic unit by using binary numbers. The basic arithmetic operations are, addition,subtraction, multiplication,division. These operations are performed by digital logic circuits called the adder, sub tractor, multiplier and divider. The arithmetic rules for Addition, Subtraction, Multiplication, and Division of binary numbers are given below. Addition Subtraction Multiplication Division 0+0=0 0-0=0 0 x 0=0 0/1=0 0+1=1 1-0=0 0 x 1=0 1/1=1 1+0=1 1-1=0 1 x 0=0 0/0=0 1+1= =1 1 x 1=1 1/0=not allowed
11 SELF CHECK EXERCISE 4. A. For Q No select the most appropriate alternative from among the four alternatives given below each question 22. The binary addition gives a) 111 b) 10 c) 110 d) The cumulative addition of the four binary bits ( ) gives a) 1111 b) 111 c) 100 d) The result of binary subtraction ( ) is a) 111 c) 111 c) 011 d) The result of binary multiplication x 102 is a) 1101 b) 0110 c) 1001 d) The binary division /100 2 gives a) 110 b) 1100 c) 11 d) 101 B. Answer the following questions 27. Subtract the following groups of binary numbers. a) b) c) Add the following groups of binary numbers using the binary addition method. a) b) c) S AND 2 S COMPLEMENT. There are two complement forms used in digital systems to represent signed numbers. These are 1 s complement and 2 s complement form. These two forms are used to represent negative numbers. Most digital computers do subtraction by the 2 s complement method.the advantage of performing subtraction by the complement method is reduction in the hardware. Instead of having separate digital circuits for addition and subtraction, only adding circuits are needed.i.e. subtraction is also performed by adders only. To take the 1 s complement of a binary no., simply change all 1 s to 0s and all 0 s to 1s
12 The 1 s complement of is Similarly the 2 s complement of a binary no. can be obtained by adding 1 to its 1 s complement Find the 2 s complement of s complement of 10110= For obtaining 2 s complement of 10110, you have to add 1 to 01001(1 s complement of 10110) i.e, = Subtraction using 1 s complement The subtraction using 1 s complement can be obtained by the following methods: Take the 1 s complement of the subtrahend (smaller number). Add this to the minuend (larger number). If a carry is generated, it indicates that the answer is positive. Add the carry to the result. This carry is called the end-around carry (EAC). If no carry is generated, then the answer is negative. Take the 1 s complement of the original addition and change the sign. 1 Subtract (1011) 2 from (1110) 2 using 1 s complement method (+) 1 s complement Carry Add Carry The answer is (0011) 2
13 2 Subtract (11000) 2 from (101) 2 using 1 s complement method (+) 1 s complement No carry The answer is ve, since no carry is obtained. Si the answer is the 1 s complement of the and is in opposite sign i.e, Subtraction using 2 s complement 2 s complement subtraction can be obtained by the following methods. Take the 2 s complement of the subtrahend (smaller number). Add it to the minuend (larger number). Presence of a Carry indicates that the answer is positive. Omit the carry. Absence of a carry indicates that the answer is negative. Take the 2 s complement of the original addition and change the sign. 1 Subtract (1011) 2 from (1110) 2 using 2 s complement method (+) 2 s complement Carry The carry is ignored. Thus the answer is (0011) 2 2 Subtract ( from (1000) 2 using 2 s complement method (+) 2 s complement No Carry No carry is obtained. The answer is the 2 s complement of (1110) 2 and is in opposite sign. i.e, -(0010) 2
14 2.8 9 s and 10 s Complement. 9 s complement The 9 s complement of a decimal number can be obtained by subtracting each digit in the number from 9,i.e a digit plus its 9 s complement equals to 9. The 9 s complement of decimal digits 0 to 9 are listed below. Decimal No. 9 s Complement Find the 9 scomplement of each of the following decimal no.s a) 15 b)135 Subtract each digit in the no. from 9 to get the 9 s complement a) = 84 (9 s complement of 15) b) = 864 (9 s complement of 135) 10 s complement The 10 s complement of a decimal no. i equal to its 9 s complement + 1 Convert the following decimal no. in to its 10 s complement form a) 18 b) 152 a) 99-18= 81 (9 s complement of 18) 81+1= 82(10 s complement of 18) b) = 847 (9 s complement of 152) = 848 (10 s complement of 152)
15 2.8.1 Subtraction using 9 s complement Subtraction of a smaller number from a larger number using 9 s complement Steps: Take the 9 s complement of the smaller number Add the 9 s complement to the larger number Carry indicates that the answer is positive. Add the carry to the list significant digit If there is no carry the answer is negative. Take the 9 s complement of the result and change the sign For example 1 Subtract 143 from 363 using 9 s complement Direction Subtraction 9 s complement subtraction s complement of Carry Add carry to the result = 220 The answer is positive. i.e, 220 For example 2 Subtract 745 from 245 using 9 s complement Direction Subtraction 9 s complement subtraction s complement of Carry s complement of 499 = = 500 No carry indicates that the answer is negative. i.e, -500
16 2.8.2 Subtraction using 10 s complement It is analogous to the often used 2 s complement method in binary subtraction. In this method the minuend is added to the 10 s complement of the subtrahend and the carry is ignored. 1 a) Subtract 54 from 88 using 10 s complement method Direction Subtraction 10 s complement subtraction s complement of Carry 1 34 Ignore the carry. The answer is positive i.e, 34 2 b) Subtract 813 from 432 using 10 s complement method Direction Subtraction 10 s complement subtraction s complement of Carry s complement of 619 = 381 Since there is no carry, the answer is negative. i.e, -381 SELF CHECK EXERCISE 5. A. For Q No select the most appropriate alternative from among the four alternatives given below each question 29. The chief reason why digital computers use complemental subtraction is that it a) Simplifies their circuitry b) is a very simple process c) can handle negative numbers easily. d) Avoids direct subtraction 30. The 1 s complement of is a) 0110 b) 0101 c) 1110 d) The 2 s complement of is a) 0111 b) 0101 c) 1000 d) 0001
17 32. The 9 s complement of 19 is a) 91 b) 99 c) 80 d) The 10 s complement of 46 is a) 54 b) 53 c) 45 d) 35 B. Answer the following questions 34. How can negative no be represented? Distinguish between 1 s complement and 2 s complement 35.Distinguish between 9 s complement and 10 s complement? 2.9 CODES. We are very comfortable with the decimal number system, but digital systems like computers & other digital circuits process the data in the binary format. So various binary codes are used to represent the data. A code is a symbolic representation of discrete information, which may be present in the form of numbers, letters or physical quantities. The information used in every code is represented in binary form. The binary code can be classified into two types of codes, i.e. numeric codes and alphanumeric codes. Alphanumeric codes represent alphanumeric information, i.e. letters of the alphabet, and decimal numbers as a sequence of 0s and 1s. An example of alphanumeric cod e is the ASCII code (American Standard Code for Information Interchange). Numeric code represents numeric information, i.e. only numbers as a series of 0s and 1s.An example of the numeric code is the Binary coded decimal (BCD) code which is used to represent decimal digits. Codes are also used for error detection and error correction purpose. Since when digital signals are transmitted from one location to another location, errors may occur due to electrical noise. Various types of codes are discussed below BCD (or) 8421 code A Binary Coded Decimal (BCD) is one in which, decimal digits are encoded by their natural binary equivalents-one at a time-into groups of four bits.
18 For example (25) 10 is represented by [ ] using BCD code, rather than (10001) 2. It is a positional weight code. Each position of a number represents a specific weight. These codes are also known as 8421 code or simply BCD code. The number 8421 indicates the binary weights of the four bits. i.e. the weights of the first (right most) position is 2 0 =1, 2 1 =2, 2 2 =4, 2 3 =8.Replacing from left to right, the weights are ,and hence it is called 8421 code. The disadvantage of BCD code is that it requires more no. of bits to code a decimal number. But the ease of conversion between the BCD code to decimal number and vice versa is the main advantage of this code, which makes it useful and popular code for input,output operations in digital systems.to convert any decimal number in to BCD,each decimal digit should be replaced by the appropriate 4-bit code. The following table summarizes the binary and BCD codes for the decimal numbers 0 to 15. Decimal numbers Binary number Binary coded decimal(bcd) Convert (3906) 10 to BCD Therefore (3906) 10 =
19 Note: Leafing zeros are added to ensure that each digit is represented by four bits.the leading zeros can be suppressed on the most significant digit. Conversion flow chart HEXADECIMAL BINARY DECIMAL OCTAL BCD The flow chart summarizes the conversions that have been discussed so far. There is no line directing from octal to BCD,because that direct conversion was not presented. To convert from octal to BCD, convert to binary, then decimal, then BCD Excess-3 code The XS-3 code is a non-weight code. This means each position with in a binary number isn t assigned affixed value. This code is a self complementing code, which means 1 s complement of the coded number yields 9 s complement of the number itself. As the name indicates, XS-3 code represents a decimal number,in binary form, as a number greater than 3. An XS-3 code is obtained by adding 3 to a decimal number, then convert it into its equivalent BCD code. : A decimal 4 can be coded, by adding 3 into4; in order to obtain 7.7 is then encoded in its equivalent 4 bit binary code So 0111 is the XS-3 code of the decimal number 4. Or it can also be obtained directly in another way by adding binary equivalent of 3 to the natural BCD code of the digit. i.e. Decimal 4 is coded as =0111 in XS-3 code.
20 Convert (463) 10 into its XS-3 code. Given decimal number Add 3 to each bit Sum Converting the above sum into its BCD code, we have Sum BCD Hence, the XS-3 code for (463) 10 is The following table summarizes the BCD, XS-3 code and 9 s complement representation for decimal digits. Decimal BCD code XS-3 code 9 s complement Gray codes The gray code isn t a weighted code and isn t suitable for arithmetic operations, but finds application in input/output devices and in some types of analog to digital converters. Gray code is a cyclic code which has a special property of containing two successive code words differ in one bit position only, i.e. it is a unit distance code. It is also called as the reflected code.
21 Conversion of a binary number to gray code Keep the first bit of the gray code is the same as the first bit of the binary number. The second bit of the gray code equals to the sum of first and second bit of the binary number. Discard the carry if it is generated from the sum. The third bit of the gray cod equals to the sum of second and third bit of the binary number and so on. Convert the binary (110010) 2 to its gray code. Solution [Binary] [Graycode] Conversion from gray code to binary Conversion of a Gray code into its binary form involves the reverse of the procedure as given below i) The first binary bit (MSB) is the same as that of the first Gray code bit ii) If the second Gray bit is zero, the second binary bit is the inverse of its first binary bit. iii) Step 2 is repeated for each successive bit Convert [ ] G to binary Solution Gray Binary Therefore [ ] G = [ ] 2
22 SELF CHECCK EXERCISE 6. A. For Q No select the most appropriate alternative from among the four alternatives given below each question 36. BCD code is a) non-weighted code b) the same thing as binary numbers c) a binary code d) an alphanumeric code 37. Which of the following 4-bit combinations is/are invalid in the BCD code? a) 1010 b) 0010 c) 0101 d) In XS-3 code each coded number is than in BCD a) four larger b) three smaller c) three larger d) much larger 39. The XS-3 code of is a) 1001 b) 1000 c) 1001 d) Gray code is a) non-weighted code b) weight code c) a binary code d) an alphanumeric code 41. The gray code of is a) 1000 b) 1001 c) 0101 d) 0100 B. Answer the following questions 42. What is a BCD code? What are its advantages and disadvantages? 43. Define the XS-3 code and gray code. Why these are important? 2.9 UNIT SUMMARY. This unit explains the various number systems, which are widely used in digital systems. The general properties of number system, methods of conversion from one number system to another and the rules of arithmetic operations are discussed. Various complement methods like 1 s complement, 2 s complement, 9 s complement& 10 s complement are introduced to make the subtraction easier. With
23 the application of these methods the subtraction can be achieved by adding the complement of the subtrahend to the minuend. Different codes are used in digital systems which may be in the form of numbers, letters or physical quantities. Some of the more commonly used codes like BCD, XS-3Code, gray code are introduced. The knowledge of these number systems & codes is very essential for the effective understanding of digital systems ANSWERS TO SELF CHECK EXERCISES. 1. (a) 2. (a) 3. (b) 4. (b) 5. (a) 6. a) b) c) d) A decimal number can be converted to an equivalent no. in any other base system with the base b by successively dividing the decimal no by b. In this method, the reminders are read from bottom to top. Similarly a decimal fraction can be converted to an equivalent no. in any other base system with the base b by successively multiplying the decimal no by b. In this method, the integers to the left of the radix point are read from top to bottom. 8). (c) 9. (b) 10. (d) 11. (a) 12. a) b) c) d) a ) b) c) d) (a) 15. (c) 16. (a) 17. (a) 18.(a) 19. (d) 20. The advantages of binary no. system is that, it is very simple, because it consists of only two digits, i.e.0&1. So it is useful in digital computers,since the switching circuits used in these computers use two state devices such as transistors,diodes etc. Hexadecimal no. systems are used to compress the long strings of binary numbers.it is the most popular means of direct data entry and retrieval in digital systems. 21. a ) b) c) d)
24 22. (d) 23. (c) 24. (d) 25. (d) 26. (a) 27.a) 0011 b) c) a) b) c) (a) 30. (b) 31. (c) 32. (c) 33. (a) 34.Negative numbers can be represented in sign magnitude form,i.e. MSB represents the sign bit (0 for positive and 1 for negative) and the remaining bits represent the magnitude of the no. Negative numbers can also be represented by the 1 s complement form, or in 2 s complement form 1 s complement can be easily obtained using an inverter. The 2 s complement can be obtained by first obtaining the 1 s complement and then adding (1) to it 35. The 9 s complement of a decimal no. can be obtained by subtracting each digit of that decimal no. from 9. The 10 s complement of a decimal no. is obtained by adding a 1 to its 9 s complement. 36. (c) 37. (a) 38. (c) 39. (b) 40. (a) 41. (d) 42. The BCD code uses the binary no. system to specify the decimal numbers 0 to 9. In this code each decimal digit, 0 through 9 is coded by 4-bit binary no. It is also called as the 8421 code. The main advantage of this code is its ease of conversion to and from decimal and the disadvantage of this BCD code is that, arithmetic operations are more complex then they are in pure binary. It is less efficient than the pure binary, in the sence that it requires more bits. 43. A XS-3 code is a BCD code formed by adding 3(0011) to the binary equivalent of the decimal no. A Gray code is one, in which only one bit changes between successive numbers. It is also called a unit distance code The XS-3 code helps in computing mathematical operations in digital computers. The Gray code is useful for its ease of conversion to and from binary. It is used in instrumentation and data acquisition systems where linear or angular displacement is measured. It is used in I/O devices, A/D converters and other peripheral devices.
25 UNIT END EXERCISES. 1. State the common features between different number system. 2. What are meant by 1 s and 2 s complement of a binary number? 3. Explain the rules for binary subtraction using 1 s and 2 s complement methods. 4. Compare BCD and Binary systems of coding 5. How do you convert a binary number to a Gray number and vice versa. References. Bignell, J and Donovan, R. (1989) Digital Electronics, Delmar Publishers Inc. New York Jain, R. P. (2007) Modern Digital Electronics; Third Edition; Tata McGraw-Hill Publishing Company Limited; New Delhi Kumar, A. A. (2004) Fundamentals of Digital Circuits; Seventh Edition; Eastern Economy Editions; Prentice- Hall India Pvt. Ltd; New Delhi Mano, M. M. (2006) digital Logic and Computer Design; Second Edition; Eastern Economy Editions; Prentice- Hall India Pvt. Ltd; New Delhi Malbert, A. B. and Leach, D. P. (1993) Digital Principles and Applications, Tata Mc Graw hill Publishing Company Limited, New Delhi Salivahanan, S. and Arivazhagan, S. (2006) Digital Circuits and Design, Vikas Publishing House Pvt Ltd, Delhi Srinivasan, P. ( 2006) National Programme Technology Enhanced Learning Video Lectures on Introduction to Digital Circuits and System. Lecture I & II