0% found this document useful (0 votes)
14 views5 pages

Digital Sample

Electric book

Uploaded by

Mohd Nadim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

Digital Sample

Electric book

Uploaded by

Mohd Nadim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
: DIGITAL ELECTRONICS Digital Logic Theory: Number systems- ‘Combinational logic .” ‘The method for converting a decifnal number, 16 binary involves using successive division df the number by 2 until the dividend redches 0.°At each division, the remainder provides.a, digit of the converted number starting pilfythe Teast significant digit. AM 8 1.2.3 Conversion between Hexadecimal and Binary 2s ."* To convert{a’binary Humber to hexadecimal, divide it into groups of Tour digits starting with the right- most digit*lf,the niimber of digits is not a multiple of fy prefixthe Humber with 0' sso that each group Contains\4 digits. For cach four-digit group, convert Re 4-biF) binary number into an equivalent sae 8 Ay hexadecimal digit. 1.2.4 Conversion between Octal and Binary For conversion of binary number to octal, we first divide the binary number into group of 3 digits starting from the right-most side, and balancing the number of digits by putting appropriate number of zeroes. Each group of binary numbers is converted into the corresponding decimal numbers and written in the same order as in binary number to obtain the octal equivalent. For example, consider the binary number 1011010012. Now dividing it into group of three digits, we have 1011101 1001.Writing the equivalent decimal number of each group, gives 5 | 5 | 1.So, the equivalent octal number is 551s. For conversion of octal number to binary, cachyof the digits of the octal number is converted’into its equivalent binary number and they aregnerged into the same order as in the octal numbef- The Teft-mbst zeroes are omitted from the number. xample, consider octal number 342:Thi ‘he, bindry euivalent of is 011 and that of 4 is 100.'So,"binaFy number will be 011100. Promo 1.3 Binary and Heladecimal Arithmetic a ‘The arithmetic\ operations performed on binary numbers are listed as follows: 1. Bindery ‘addition: For example fj v101l ne? 4110 , y 10001 "2. Binary subtraction: For example @ 100 1 rr 9) 1011 -110 101 3. Binary multiplication: For example 1011 x 101 1011 0000 3011 110111 4. Binary division: For example 1010 101)110110 101 GATEway Engincers Academy Ph no: 9994715354, 9488030176 0111 101 0100 ‘The arithmetic operations on hexadecimal numbers are illustrated through following examples: 1, Additio 1A8 +67B 8+B=8+11-19=16+3=(13)6 1+A47=1410+7=18=16+2= (12) 14+14+6=8 2. Subtraction: 1-3=17-3814-E 7 1.4 Fixed Precision and Overflow Numbers in computers are typically#repre: cr using a fixed number of bits. These )sizes. are “| typically 8 bits, 16 bits, 32 bits, 64 bits apd 89 bits. These sizes are generally a multiple of 8s most computer memories are organizéd.gn an 8-bit byte basis, Numbers in which a spécific number of bts is used {o represent the valué; yes fixed precision numbers. A 4S An overflow is observed ¥ Shen the result of a Calculation, éannot be represented with the number of bits availablésFor example, when adding the two eight! itequantities; 170 + 180, the result is 350. This is outsid® the'range 0-255, and so the result cannot be represented using 8 bits, In case of an overflow, ¢ low oder bits of the result remain valid, but the hightordér bits are lost. This results in a value much smaller than the correct result. 1.5 Representation of Binary Numbers Till now only positive values have been considered for binary numbers. When a fixed precision binary number is used to hold only positive values, it is said to be unsigned. The range of positive values that can be represented is 0-2 m1, where n is the number of bits used. The fixed precision binary numbers can also be used to hold both positive and negative decimal numbers and is said to be signed. The signed numbers can be represented in binary number system by (i) sign-bit magnitude method; (i) 2's complement method and (iii) 1" complement method 1.5.1 Sign-Bit Magnitude In sign-bit _ magnitude i representation),the most at biL(MSB) is used to represent sign, with 0". “{@r positive and “t for negative and the remaining. bits are used to represent the magnitude of.the number. Thus in an eight-bit representation MSB Will represent the sign and remainiga.sevén,bils will represent the magnitude. For example, an eightbit representation £7 will be, 00000111 and of -7 will be 10000111. In general, if is, the’ number of bits, then using sign- bit magnitude) the ‘maximum positive number that can’ be tepresented is @et-l) and the maximum {Fepitive) number is Qn). Thus, an eight-bit Creproventation can be used to represent decimal “Squmbers inthe range of-127 to 127. (or iti sign-magnitude | ,71.521's Complement Notation 1's complement of a binary number can be oblained by taking complement of all its bits, that is. by replacing 1’ s by 0' sand 0’ sby 1” s.In 1" complement notation, the positive numbers remain unchanged and the negative numbers are obtained, by taking 1's complement of the positive counterpart. Thus while the eight-bit binary representation of +7 is 000001112 ; -7 is represented as 1111000: in 1’ s complement notation. In this, notation also, the range of maximum positive and negative numbers that can be represented is given by Qut-l) and-(2n-1), respectively. 15.3 2’s Complement Notation 2's complement of a binary number can be obtained by adding 1 to its 1’ ‘s complement. In a binary number being represented in the 2’ s complement notation, the most significant bit of the number indicates the sign. If the sign bit is 0, the number is positive, and if the sign bit is 1, the number is negative. For positive numbers, the rest of the bits hold the magnitude of the number. For negative numbers, the lower order bits hold the 2” s complement of the magnitude of positive counterpart of the number. For example, consider 5 DIGITAL ELECTRONICS GATEway Engineers Academy Page 3 Ph no: 9994715354, 9488030176 the 8-bit number 00101001. 1" s complement of the number is obtained by inverting the bits as 11010110. 2's complement is obtained by adding 1 to this number as 11010110 + 00000001 : = 1010111 Thus 2's complement of 00101001 is 11010111, n-bit notation of 2’ s complement can be used to represent all decimal numbers in the range + (2 sil) to -Q2n-1). 2's complement is the most ‘common notation used as this is easy to generate for a binary number and arithmetic operations are easy to perform. Note: In 2’ s complement arithmetic, all carries from 10" s column are lost on addition. This type of math is called modulus arithmetic. 2's complement system is used to represent negative numbers using modulus arithmetic. If we have a number with 8 bit length, the negative number is, represented by the transformation 2s N, where N is, the positive representation of the number. Therefore, the 2's complement of the magnitude of the positive number gives the magnitude of the negative number and the reverse is also true. Some examples of 2’ s complement and_ arithmetic operations using them are as follows. 4 1.5.41’ s Complement 5 Given a positive number I in base r with an fiteger/ part of n digits; the r’ s complement af Nis defined as > fe Xoo 4 / 0 te Nao g\ Arithmetic Operations with r’sComplement Subtraction using r’s complement: \, ‘The steps involved are: >» 1. Add minuend.M to ther’ "5 complement of the subtrahend Ni> “*< ~ 9, 2. Inspect the sult oBtained in step 1 for end carry, (a) If arvend carry’occurs, discard it. (b)-If aii ehdcarty does not occur take the rs complement of the number obtained in step 1 and Place a’negalive sign in the front. oA 1.6 Bintary Codes The digital data is represented, stored and transmitted as group of binary bits, so the codes used are referred to as binary codes. ‘These are suitable both for computer applications and digital communication. These codes may be classified as follows based on their properties: 1, Welghted codes: ‘These obey the positional Weighting (e.p,, binary eoded decimal). 2, Nonweighted codes; ‘These do not obey the positional weighting (e%., gray ende, excrss% code), 3, Reflective codes: A code Is said to be reflective, When the code for '9' $5 4 complement for code of 0" , code of "8" Is complement for the ede of “1 and 80 on, (ej, excess Seende), 4, Sequential codes: A code is sald tbe si When each succeeding, code is one binagy yunibay Greater than its preceding, code (6.4 Pease cody). 5. Error codes: These have the ability 10'det@/4 and Correct codes, hence may be Brror derteting, ad Error correcting types. { 1.6.1 Binary Coded De In binary coded decisiil (WCDY numbers, a given number is represented. iny equivalent binary form The BCD equidoleitof a decimal number can be obtained by replacing’each decimal digit (integer or fraction) (byits four-bit binary equivalent, For example, Thd decimal number 136 ean be repfcaented in BCD as follows 5 “0901 0011 0110 oF (O01 DOLT ON 1O)ve0 617 816 imilarly, the BCD equivalent of decimal number 29.75 is represented as (0010 10001, 051 O10 xen This code is more specifigally known as #42) cade, where 8, 4, 2 and 1 represent the weight of the different bits in the four-bit group, starting, from most significant bit and moving, to least significant Dit, Other weighted BC include 4221 and 5421 BCD codes, where the numbers represent the weights of the relevant bits, ‘To convert a given BCD atNiimbers encoded number to juivalent dec nal numbers, divide the number » groups of four- bits and imal digit for each 4-bit group. For example, consider a 16 bit number encoded BCD format: 01010110 10010011, ‘This is converted to a decimal number iis follows: ‘0101 0110 1001 0011 5. 609. 3 The value is 5693 decimal, To determine the binary equivalent of a BCD coded number, itis first converted into the equivalent decimal number and then into its binary equivalent. For example, consider a 12 bit number encoded BCD format (O11 O110 O010)%en , ‘This is converted to corresponding, decimal number (762) and binary equivalent determined ay (1OHTL1010p. write down the corresponding, de DIGITAL ELECTRONICS GATEway Engineers Academy Paye a Ph no: 9994715354, 9488030176 39, Shift register (Johnson) counter Modulus number is 2N, where N is the number of flip-flops 40, Ring counter Modulus number is 2N -1, where N number of flip-flops the VI. A/D and D/A Converters 41, Weighted resistor type D/A converter Vy P+ Vy 2h Vy x4 Vy Balaece 42. R-2R Ladder type D/A converter veer Vv Y= Tone F 43. Counter type A/D converter Total conversion time is 2n and average conversion time is 2n-1 44, Successive approximation type A/D converter Conversion time is constant and proportional to number of bits (n) in digital output. PRACTICE EXERCISES One Mark Questions 1, Decimal equivalent of 1 A 53is AV (a) 6799 (b) 6739 (c) 6993 Wen NY 2. (737)8= ()16 7 (@1DF = (B)1DE (1 EF @1EDA* {v \ 3. The decimal equivalent f o&tal 16 is (a) 13 Ab) 14 . © <-d)ié > 4, The ottalequivalent of the given binary numbéts (101101)2i 65 AY (b)55 (SL (d) 45 5, Sum of binary numbers 11111 and 00001 is (a) 100100 (b) 100000 (c) 1000001 (d) 100010 6. Gray code for number 7 is (a) 1100 (b) 1001 (©) 0100 (d)o110 7. BCD numbers are obtained by (a) converting decimal number to binary number (b) converting decimal to octal number (0) each decimal digit is represented by a farm bit binary (d) None of the above 8. 1's complement of 1001 is (a)1001——(b) 1110 (got (a) 0110 9, Sum of A and Bin half-adderis (@)A@B (b) AB (AB, (a) A+B 10, Which of the following circuit can be used a ae parallef to 10 Sciies converter? (a)Digital counter (d) Decdder . (© De-multiplexer (d) Multiplexer 11. A multiplexer is a (a) one input many output device (b) many input to one output device (©) many input many output device (d) None of above 12. A decoder is a (a) one input many output device (b) many input one output device (0) many input many output device (d) one input one output device 13. A device which changes from serial data to parallel data is {a) counter (b) multiplexer (flip flop __(d) de-muttiplexer 14. To implement the expression ABCD + ABCD + ABCD,ABCD + ABCD + ABCD, it takes one OR gate and ————— (a) three AND gates and three inverter (b) three AND gates and four inverter (0 three AND gates (d) one AND gate 15, A decoder is a aan Sea DIGITAL ELECTRONICS GATEway Engineers Academy Ph no: 9994715354, 9488030176

You might also like