1 / 32

Decimal to Binary Conversion: Basics of Digital Electronics

Learn how to convert decimal numbers to binary and vice versa in digital electronics. This lesson covers methods and examples for easy understanding.

lauracortez
Download Presentation

Decimal to Binary Conversion: Basics of Digital Electronics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. e – Lesson Module for C-16 Curriculum State Board of Technical Education & Training Andhra Pradesh Year/Semester : III Semester Branch : Electronics and Communication Engg Subject : EC-303,Digital Electronics Topic : Basics of Digital Electronics Sub Topic : Decimal to Binary conversion and vice- versa Duration : 50 min Prepared by T.MadhaviKumari,Lecturer in ECE Under the guidance of G.V.V.S.Murty, Head of ECE Government Polytechnic for Women , Kakinada C-16-EC-302-1.2

  2. Objectives On completion of this period, you will be able to Convert a Decimal number to Binary number & Vice-versa. C-16-EC-302-1.2

  3. Decimal to Binary conversion. It is necessary to convert Decimal numbers into binary to make computers to accept. 3 Decimal Binary C-16-EC-302-1.2

  4. Bridging the Digital Divide Decimal-to-Binary Conversion 010 00100 10101 1101 10010 16 16 63 00101101 0101011 010 63 23 1101 23 1101 010 1101 10010 935 935 00100 721 721 010 00101 534 534 00101101 Binary-to-Decimal Conversion 011011 935 935 275 275 1101 011011 00100 234 234 00101101 137 011011 137 0101011 0101011 145 145 1101 10010 10010 10101 001011 011011 00101101 00100 C-16-EC-302-1.2

  5. Decimal to Binary conversion Conversion of integer part –Successive division by 2 Double dabble method Conversion of fractional part-Successive multiplication by 2 Click here:D to B conversion video C-16-EC-302-1.2

  6. Decimal to Binary conversion(integer part) Double- dabble Method In this method the Decimal number is repeatedly divided by 2 till quotient becomes 0 with a remainder of 1. Start Divide the integer by 2 Record Quotient (Q)and Remainder(R) Is Q=0 NO Yes Collect Rs to form binary number with first R as LSB and last R as MSB C-16-EC-302-1.2 End

  7. Decimal to Binary conversion EX: Find Binary equivalent of decimal 25 Division Quotient Remainder 25/2 12 1 LSB 12/2 6 0 6/2 3 0 3/2 1 1 1/2 0 1 MSB C-16-EC-302-1.2

  8. Decimal to Binary conversion EX: Find Binary equivalent of decimal 25 Division Quotient Remainder 25/2 12 1 1 12/2 6 0 0 6/2 3 0 0 3/2 1 1 0 1 1 1/2 0 1 25 = 1 1 0 0 1 • The answer is read from the last remainder and up as shown by the arrow C-16-EC-302-1.2

  9. Decimal to Binary conversion EX: Find Binary equivalent of decimal 34 Division Quotient Remainder 34/2 17 1 17/2 8 1 8/2 4 0 4/2 2 0 1 2/2 1 1 0 1/2 0 1 34 = 1 1 1 0 0 1 • The answer is read from the last remainder and up as shown by the arrow C-16-EC-302-1.2

  10. 2 125 62 1 2 31 0 2 15 1 2 3 1 2 7 1 2 0 1 2 1 1 Example EX: Find Binary equivalent of decimal 125 12510 = ?2 12510 = 11111012 1 1 1 1 1 0 1 C-16-EC-302-1.2

  11. Convert decimal 34 into binary 3410=1000102 C-16-EC-302-1.2

  12. C-16-EC-302-1.2

  13. Decimal-Binary equivalent C-16-EC-302-1.2

  14. Decimal to Binary conversion(fractional part) • Steps: • Multiply decimal fraction by 2 • Record the carry in the integer position • Continue step 1 and 2 until the value of decimal fraction • becomes 0.If the value of decimal fraction is not equal to • 0,multiplication by 2 to decimal fraction is carried out only • for six times. • Equivalent binary number is equal to the reading of • recorded carry bit from top(MSB) to bottom(LSB) C-16-EC-302-1.2

  15. Convert decimal 0.3125 into binary Decimal fraction base product carry 0.3125 X2 0. 625 0 = 1 0.625 X2 = 1. 25 0 0.25 X2 0. 5 = 0.5 1. 0 1 X2 = Ans:0.312510=0.01012 C-16-EC-302-1.2

  16. Exercises • Convert decimal 0.125 into binary • Soution: Decimal fraction base product fraction carry 0.125 X2 =0.25 0.25 0 0.25 X2 =0.5 0.5 0 0.5 x2 =1.0 0.0 1 Ans: 0.12510= 0.0012 C-16-EC-302-1.2

  17. Exercises • Convert decimal 0.6 into binary Decimal fraction base product fraction carry 0.6 X2 =1.2 0.2 1 0.2 X2 =0.4 0.4 0 0.4 x2 =0.8 0.8 0 0.8 X2 =1.6 0.6 1 0.6 X2 =1.2 0.2 1 Terminating the conversion after 5 or 6 bits Ans:0.6 10 =0.1000112 C-16-EC-302-1.2

  18. EX:Convert 44.625 10 into binary Exercises • Solution:Separate integer and fractional part • Integer part = 44 -use successive division by 2 • Fractional part = 0.625 -use successive multiplication by 2 C-16-EC-302-1.2

  19. Decimal to Binary conversion(integer) EX: Find Binary equivalent of decimal 44 Division Quotient Rem ainder 44/2 22 0 22/2 11 0 11/2 5 1 5/2 2 1 2/2 1 0 1/2 0 1 44 = 1 0 1 1 0 0 • The answer is read from the last remainder and up as shown by the arrow C-16-EC-302-1.2 21

  20. Convert decimal 0.625 into binary Decimal fraction base product carry 1 0.625 X2 = 1. 25 0 0.25 X2 0. 5 = 0.5 1. 0 1 X2 = 0.625 0=0.1012 4410=1011002 Ans:44.62510=101100.1012 C-16-EC-302-1.2

  21. Binary – Decimal Conversion Click here:B to D conversion video • Steps: • Write the binary number • Write the binary weights 20,21,22, • 23 etc above the binary digits • starting with the bit on the right • hand side (LSB) say 1101 , • below the binary weights • Cross out the weights under zeros • Add the remaining weights 24 23 22 21 20 16 8 4 2 1 1 1 1 0 1 + + + 16 8 4 1 (11101) 2 = (29)10 C-16-EC-302-1.2

  22. Example: find the decimal value of 1110012: 1110012 = 1X25+1X24+1X23+0X22+0X21+1X20 = 32 + 16 + 8 + 0 + 0 + 1 =5710 C-16-EC-302-1.2

  23. Convert ( 101.101 )2in to decimal Solution: ( 101.101 )2= 1 x 22+ 0 x 21+ 1 x 20+1 x 2-1+ 0 x 2-2+ 1 x 2-3= 1 x 4+ 0 x 2+ 1 x 1+1 x ( 1 / 2 )+ 0 x ( 1 / 4 )+ 1 x ( 1 / 8 )= 4+ 0 + 1 +( 1 / 2 )+ 0+ ( 1 / 8 )= 5 +0.5 + 0.125 = 5 . 625 Therefore ( 1 0 1 . 1 0 1 )2 =  ( 5.625 )10 C-16-EC-302-1.2

  24. Binary – Decimal Conversion 15.5 37.75 439.625 496 Exercise: Convert the following binary numbers into Decimal • 1111.1 • 100101.11 • 110110101.101 • 111100110 C-16-EC-302-1.2

  25. C-16-EC-302-1.2

  26. C-16-EC-302-1.2

  27. C-16-EC-302-1.2

  28. C-16-EC-302-1.2

  29. Summary Click here:B=D and D-B conversion video • In this session we have learnt • Decimal Number system • Binary Number System • Conversion from Binary to Decimal & Decimal to Binary C-16-EC-302-1.2 23

  30. Quiz 1. Which of the following binary number is eqivalent to decimal 20 a)10100 b) 100 c) 10101 d) 11111 C-16-EC-302-1.2

  31. C-16-EC-302-1.2

  32. Assignments • Covert the following decimal numbers into binary • 225 • 96.125 • 74.6125 • 29.5 • Convert the following binary numbers into decimal • 11011.11 • 100011.1 • 11101110.101 • 111.1101 C-16-EC-302-1.2

More Related