1 / 45

Digital Logic

By: Safwan Mawlood. Digital Logic. Digital Principles and Logic Design, A.Saha & N.Manna. Number Systems. Number Systems. Knowing what base someone refers to Decimal uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 . Binary uses 2 digits: 0 and 1 .

dunn
Télécharger la présentation

Digital Logic

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. By: Safwan Mawlood Digital Logic Digital Principles and Logic Design, A.Saha&N.Manna Number Systems

  2. Number Systems • Knowing what base someone refers to • Decimal uses 10 digits: 0,1, 2, 3, 4, 5, 6, 7, 8, 9. • Binary uses 2 digits: 0 and 1. • Octal number system there are 8 digits—0, 1, 2, 3, 4, 5, 6, and 7. • Hexadecimal number system has 16 digits—0 to 9— and the rest of the six digits are specifies by letter symbols as A,B, C, D, E, and F. Here A, B, C, D, E, and F represent decimal 10, 11, 12, 13, 14, and 15 respectively.

  3. Base 10 Numbers

  4. Base 2 (Binary) Numbers

  5. Hexadecimal • The base16, or hexadecimal (hex), number system is used frequently when working with computers, because it can be used to represent binary numbers in a more readable form.

  6. CONVERSION BETWEEN NUMBER SYSTEMS • It is often required to convert a number in a particular number system to any other number system, e.g., it may be required to convert a decimal number to binary or octal or hexadecimal.

  7. Converting Decimal to Binary To convert a number in decimal to a number in binary we have to divide the decimal number by 2 repeatedly, until the quotient of zero is obtained.

  8. Converting Decimal to Binary Start by dividing the decimal by the largest number in the Value row that will go.

  9. Decimal to Octal Conversion Similarly, to convert a number in decimal to a number in octal we have to divide the decimal number by 8 repeatedly, until the quotient of zero is obtained.

  10. Decimal-to-hexadecimal Conversion The same steps are repeated to convert a number in decimal to a number in hexadecimal. Only here we have to divide the decimal number by 16 repeatedly, until the quotient of zero is obtained.

  11. Binary-to-decimal Conversion

  12. Binary numbers are converted to decimal numbers by multiplying the binary digits by the base number of the system, which is base 2, and raised to the exponent of its position. Converting 8-Bit Binary to Decimal

  13. Octal-to-Decimal Conversion • Ex. Convert 34628 into decimal number. • Sol. The octal number given is 3462

  14. Hexadecimal-to-decimal Conversion • Ex. Convert 42AD 16 to decimal

  15. Fractional Conversion • Example: Convert 1010.011 into decimal number

  16. Octal-to-decimal Conversion • Example: Convert 362.358 into a decimal number.

  17. Hexadecimal to Decimal number Example: 42A.1216

  18. -decimal-to-binary Conversion Example: 25.62510

  19. Convert Decimal to octal number • Convert 34.52510 into an octal number.

  20. Binary Arithmetic • Binary Addition

  21. Example: Add 10102 and 11012 • Example: Add 01102 and 11112

  22. Binary Subtraction

  23. Example: Subtract10012 and 10002

  24. Binary Multiplication

  25. Example: Multiply the following binary numbers 01112 and 11012

  26. Example: Multiply the following binary numbers 1.0112 and 10.012

  27. Binary Division

  28. Example: Divide the following binary numbers 11001and 101

  29. 1’s Complement • The ones' complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0's for 1's and vice-versa). 

  30. Subtraction Using 2’s Complement • Binary subtraction can be performed by adding the 2’s complement of the subtrahend to the minuend. If a carry is generated, discard the carry. Now if the subtrahend is larger than the minuend, then no carry is generated

  31. Code • Computers and other digital circuits process data in binary format. Various binary codes are used to represent data which may be numeric, alphabetic or special characters. Codes are also used for error detection and error correction in digital systems.

  32. Gray • Gray code belongs to a class of code known as minimum change code, in which a number changes by only one bit as it proceeds from one number to the next.

  33. Conversion of a Binary Number into Gray Code (101011)2 change to Gray

  34. Conversion of Gray Code into a Binary Number

  35. Binary Code Decimal • BCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits, or four bits are required to code each decimal number. as shown below:

  36. You must realize that BCD and binary are not the same. For example, 4910 in binary is 1100012, but 4910 in BCD is 0100 1001BCD. Each decimal digit is converted to its binary equivalent.

  37. BCD Conversion • For example, let's go through the conversion of 26410 to BCD. We'll use the block format that you used in earlier conversions. First, write out the decimal number to be converted; then, below each digit write the BCD equivalent of that digit:

More Related