1 / 77

Unit I Number System & Logic Design Minimization Techniques

Unit I Number System & Logic Design Minimization Techniques. Syllabus. Unit I : (8 Hrs) Number System& Logic Design Minimization Techniques Introduction. Binary, Hexadecimal numbers, Octal numbers and number conversion.

Download Presentation

Unit I Number System & Logic Design Minimization Techniques

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. Digital Electronics & Logic Design

  2. Unit INumber System & Logic Design Minimization Techniques Digital Electronics & Logic Design

  3. Syllabus Unit I : (8 Hrs) Number System& Logic Design Minimization Techniques Introduction. Binary, Hexadecimal numbers, Octal numbers and number conversion. Signed Binary number representation. Signed Magnitude, 1’s complement and 2’s complement representation. Binary, Hexadecimal Arithmetic. 2’s complement arithmetic. Algebra for logic circuits : Logic variables; Logic function : NOT, AND, NOR, XOR, OR, XNOR, NAND Codes : BCD, Excess-3, Gray code , Binary Code and their conversion Boolean algebra. Truth tables and Boolean algebra. Idealized logic gates and symbols. De Morgan's rules Axiomatic definition of Boolean algebra, Basic theorems and properties of Boolean algebra Digital Electronics & Logic Design

  4. Introduction • We all are familiar with the decimal number system consisting of 10 symbols (0 to 9). It is the number system which we use in our day today life. • There are some other systems also, used to represent numbers, like binary, octal & hexadecimal. • These number systems are widely used in digital systems like microprocessors, logic circuits, computers etc. & knowledge of these systems is very essential for understanding, analyzing & designing of digital systems. • Computers & other digital circuits use binary signals but are required to handle data which may be numeric, alphabets or special characters. Therefore it is necessary to convert the information available in these formats into binary format. Digital Electronics & Logic Design

  5. To achieve this, a process of coding is used & various codes like BCD, gray, excess 3, ASCII etc are used for this purpose. • In this unit we shall study the above mentioned number systems & codes as well the Boolean algebra which is used for logic design minimization. Digital Electronics & Logic Design

  6. Number systems • In any number system there is an ordered set of symbols known as digits with rules defined for performing arithmetic operations. A collection of these digits makes a number which in general has 2 parts-integer & fractional set apart by a radix point (.), that is Digital Electronics & Logic Design

  7. The digits in a number are placed side by side & each position in the number is assigned a weight. The table below gives the details of commonly used number systems. Digital Electronics & Logic Design

  8. Binary number system • The number system with base 2 is known as binary number system. (0 & 1 these 2 symbols are used.) • It is a positional system. • Any number is a collection of the digits 0 & 1 & has 2 parts: integer & fractional. These 2 parts are set apart by the radix point which is also known as binary point. • Table shown next, illustrates counting in binary number system. • The leftmost bit is known as most significant bit (MSB) & the rightmost bit is known as least significant bit (LSB). • Group of 4 bits is known as nibble & group of 8 bits is known as byte. Digital Electronics & Logic Design

  9. Digital Electronics & Logic Design

  10. Binary to decimal conversion: Any binary number can be converted into its equivalent decimal number using the weights assigned to each bit position. E.g. Find the decimal equivalent of the binary number 11111. Solution: The equivalent decimal number is = 1x24 + 1x23 + 1x22 + 1x21 + 1x20 = 16 + 8 + 4 + 2 + 1 = (31)10 Digital Electronics & Logic Design

  11. Decimal to binary conversion: Any decimal number can be converted into its equivalent binary number. For integers, the conversion is obtained by continuous division by 2 & keeping track of the remainders generated till quotient is 0. While for the fractional parts, the conversion is obtained by continuous multiplication by 2 & keeping track of the integers generated till the fractional part becomes 0 (or up to 4 bits of binary.) The conversion process is illustrated in the next example. Digital Electronics & Logic Design

  12. E.g. Find the binary equivalent of the following decimal numbers 13 & 0.65625 Digital Electronics & Logic Design

  13. Octal number system • The number system with base 8 is known as octal number system. (0 to 7 these 8 symbols are used.) • It is also a positional system. • Any number is a collection of the digits 0 to 7 & has 2 parts: integer & fractional. These 2 parts are set apart by the radix point which is also known as octal point. • In a number, the leftmost digit is known as most significant digit (MSD) & the rightmost digit is known as least significant digit (LSD). Digital Electronics & Logic Design

  14. Octal to decimal conversion: Any octal number can be converted into its equivalent decimal number using the weights assigned to each digit position. E.g. Find the decimal equivalent of the octal number 6327.4 Solution: The equivalent decimal number is = 6x83 + 3x82 + 2x81 + 7x80 + 4x8-1 = 3072 + 192 + 16 + 7 + 0.5 = (3287.5)10 Digital Electronics & Logic Design

  15. Decimal to octal conversion: Any decimal number can be converted into its equivalent octal number. For integers, the conversion is obtained by continuous division by 8 & keeping track of the remainders till quotient is 0. While for the fractional parts, the conversion is obtained by continuous multiplication by 8 & keeping track of the integers generated till the fractional part becomes 0 (or up to 4 digits of octal.). The conversion process is illustrated in the next example. Digital Electronics & Logic Design

  16. E.g. Find the octal equivalent of the following decimal numbers 247 & 0.6825 Digital Electronics & Logic Design

  17. Octal to binary conversion: Octal numbers can be converted into equivalent binary numbers by replacing each octal digit with its 3 bit binary number. Table next, gives octal numbers & their binary equivalents for decimal numbers 0 to 15. E.g. Find the binary equivalent of the octal number (736.5)8. Solution: From the table shown next, the binary equivalents of 7, 3, 6 & 5 are 111, 011, 110 & 101 respectively. Therefore, the equivalent binary number is (111 011 110.101)2 Digital Electronics & Logic Design

  18. Digital Electronics & Logic Design

  19. Binary to octal conversion: Binary numbers can be converted into equivalent octal numbers by making groups of 3 bits starting from LSB & moving towards MSB for integer part of the number & then replacing each group of 3 bits by its octal representation. For fractional part, the groupings of 3 bits are made starting from the binary point & moving towards right. The conversion process is illustrated in the next examples. From the examples it is clear that in forming the 3 bit groupings 0’s may be required to complete the first (most significant digit) group in the integer part & the last (least significant digit) group in the fractional part. Digital Electronics & Logic Design

  20. E.g. Find the octal equivalent of the following binary numbers (1001110) & (0.10100110) Digital Electronics & Logic Design

  21. Hexadecimal number system • The number system with base 16 is known as hexadecimal number system. • It is also a positional system. • Any number is a collection of the digits 0 to 9 & alphabets A to F. It has 2 parts: integer & fractional. These 2 parts are set apart by the radix point which is also known as hexadecimal point. • In a number, the leftmost digit is known as most significant digit (MSD) & the rightmost digit is known as least significant digit (LSD). • Table next, gives hexadecimal numbers with their binary equivalents for decimal numbers 0 to 15. Digital Electronics & Logic Design

  22. Digital Electronics & Logic Design

  23. Hexadecimal to decimal conversion: Any hexadecimal number can be converted into its equivalent decimal number using the weights assigned to each bit position. E.g. Find the decimal equivalent of the hexadecimal number 3A.4 Solution: The equivalent decimal number is = 3x161 + Ax160 + 4x16-1 = 48 + 10 + 0.25 = (58.25)10 Digital Electronics & Logic Design

  24. Decimal to hexadecimal conversion: Any decimal number can be converted into its equivalent hexadecimal number. For integers, the conversion is obtained by continuous division by 16 & keeping track of the remainders till quotient is 0. While for the fractional parts, the conversion is obtained by continuous multiplication by 16 & keeping track of the integers generated till the fractional part becomes 0 (or up to 4 digits of hex.). The conversion process is illustrated in the next example. Digital Electronics & Logic Design

  25. E.g. Find the hexadecimal equivalent of the decimal number 675.625 Digital Electronics & Logic Design

  26. Hexadecimal to binary conversion: Hexadecimal numbers can be converted into equivalent binary numbers by replacing each hexadecimal digit with its 4 bit binary number. E.g. Find the binary equivalent of the hexadecimal number 2F9.A Solution: From the table, the binary equivalents of 2, F, 9 & A are 0010, 1111, 1001 & 1010 respectively. Therefore, the equivalent binary number is (0010 1111 1001 . 1010)2 Digital Electronics & Logic Design

  27. Binary to hexadecimal conversion: Binary numbers can be converted into equivalent hexadecimal numbers by making groups of 4 bits starting from LSB & moving towards MSB for integer part of the number & then replacing each group of 4 bits by its hexadecimal representation. For fractional part, the groupings of 4 bits are made starting from the binary point. The conversion process is illustrated in the next examples. Digital Electronics & Logic Design

  28. E.g. Find the hexadecimal equivalent of the given binary numbers (0010100110101111) & (0.0001111010110100) Digital Electronics & Logic Design

  29. Conversion from hex to octal & vice-versa Hexadecimal numbers can be converted to equivalent octal numbers & octal numbers can be converted to equivalent hexadecimal numbers by converting the hex/octal number to equivalent binary & then to octal/hex respectively. The conversion process is illustrated in the next examples. E.g. Convert (247.36)8 to equivalent hex number. Digital Electronics & Logic Design

  30. E.g. Convert the following hex numbers to octal numbers. A72E & 0.BF85 Digital Electronics & Logic Design

  31. Signed binary number representation • In the decimal number system, a plus (+) sign is used to denote a positive number & a minus (-) sign is used to denote a negative number. This representation of numbers is known as signed number. • As the digital circuits can understand only 2 symbols 0 & 1; same is used to indicate the sign of the number also. • The 3 types of signed binary number representation are- i) Sign magnitude representation ii) One’s complement representation & iii) Two’s complement representation. Digital Electronics & Logic Design

  32. i) Sign magnitude representation In this representation, an additional bit is used as the sign bit & is placed as the most significant bit. A 0 is used to represent a positive number & a 1 to represent a negative number. The remaining bits of the number give the magnitude of it. It is illustrated in the following examples. E.g. Find the decimal equivalent of the following binary numbers assuming sign magnitude representation. 101100 & 001000 Digital Electronics & Logic Design

  33. ii) One’s complement representation In a binary number if each 1 is replaced by 0 & each 0 by 1, the resulting number is known as the one’s complement of the first number. Both the numbers are complement of each other. If one of these numbers is positive, then the other number will be negative with the same magnitude. In this representation also, MSB is 0 for positive numbers & 1 for negative numbers. E.g. Find the one’s complement of the following numbers 101100 & 001000 Solution: 101100 = 010011 001000 = 110111 Digital Electronics & Logic Design

  34. iii) Two’s complement representation If 1 is added to one’s complement of a binary number, the resulting number is known as the two’s complement of the binary number. Both the numbers are complement of each other. If one of these numbers is positive, then the other number will be negative with the same magnitude. In this representation also, MSB is 0 for positive numbers & 1 for negative numbers. The two’s complement of the two’s complement of a number is the number itself. Digital Electronics & Logic Design

  35. E.g. Find the two’s complement of the following numbers 00110101 & 01001110 Digital Electronics & Logic Design

  36. Binary arithmetic • Just like decimal numbers, arithmetic operations such as addition, subtraction, multiplication & division can be performed on binary numbers also. • The rules of binary addition are given in the following table. Digital Electronics & Logic Design

  37. In case of multibit addition, if the carry is generated as shown in last row of above table, it is added to the next higher binary position. It is as shown in the following example. • E.g. Add the binary numbers: 0101 & 1111. Digital Electronics & Logic Design

  38. The rules of binary subtraction are given in the following table. • In case of multibit subtraction, if the borrow is generated as shown in second row of the table, it is transferred to the next higher binary position. • This is as shown in the next example. Digital Electronics & Logic Design

  39. Digital Electronics & Logic Design

  40. In binary multiplication, each partial product is either 0 (multiplication by 0) or exactly same as the multiplicand (multiplication by 1). An example is given below. Digital Electronics & Logic Design

  41. Binary division is obtained using the same procedure as decimal division. An example is given below. Digital Electronics & Logic Design

  42. Hexadecimal arithmetic • The arithmetic operations in hexadecimal number system are actually performed in binary number system as each hex operand is first converted into binary & then the specified operation is carried out using the rules of binary arithmetic. • At the end, the binary result is converted back to the hex equivalent. It is shown in the next examples. • E.g. Add (7F)16 & (BA)16 Digital Electronics & Logic Design

  43. Two’s complement arithmetic • Digital circuits are used for performing binary arithmetic operations. • With the two’s complement arithmetic, a problem of subtraction can be converted into a problem of addition. • This eliminates the need of additional circuits for subtraction as the circuits of addition can be used for performing both addition and subtraction. • This makes design of arithmetic circuits very convenient and cheaper. • Rules of two’s complement arithmetic are different for the operands with opposite sign and the operands with same sign. Digital Electronics & Logic Design

  44. I) Rules for operands with opposite sign • First, we find the two’s complement representation of both the operands & then carry out their addition. • It should be noted that the two’s complement representation of positive numbers is same as that of their sign magnitude representation. Also the two’s complement representation for negative numbers is obtained from the corresponding positive number. • After performing the addition, if a final carry is generated, discard the carry and the answer is positive & the magnitude is given by the remaining bits. • After performing the addition, if a final carry is not generated, the answer is negative & is in two’s complement form. • This is illustrated in the next example. Digital Electronics & Logic Design

  45. Digital Electronics & Logic Design

  46. II) Rules for operands with same sign • In case of the two operands with the same sign, after performing the addition, the sign bit of the result (MSB) is required to be compared with the sign bit of the operands after performing the addition. • In case the sign bits are same, the result is correct & is in two’s complement form. • If the sign bits are not same, there is a problem of overflow i.e., the result is too large to fit in the destination. • This is illustrated in the next example. Digital Electronics & Logic Design

  47. E. g. Perform the following. Use 8 bit representation: i) 48 -(-23) ii) -48-23 Digital Electronics & Logic Design

  48. Logic variables • Logic variables can be represented by a letter symbol such as A, B, X, Y,….. • The variable can have only one of the two values 0 or 1. • These variables are used for denoting the various inputs & outputs in a digital circuit. • George Boole developed rules for manipulations of binary variables which is known as Boolean algebra. This is the basis of all digital systems. Digital Electronics & Logic Design

  49. Logic functions • In a digital system there are only a few basic operations performed, irrespective of the complexities of the system. These operations are also known as logic functions • These are required to be performed a number of times in a large digital system. • The basic operations are AND, OR, NOT & FLIP FLOP. • The AND, OR, NOT operations are discussed here & the FLIP FLOP will be covered n unit IV. • Along with the basic logic functions, we shall study the other logic functions such as NAND, NOR, EXOR & EXNOR. Digital Electronics & Logic Design

  50. The NOT operation • Figure below shows the logic diagram, logic equation & the truth table of a NOT gate, which is also known as an inverter. • It has one input (A) and one output (Y). • The presence of a small circle, known as the bubble, always denotes inversion in digital circuits. Digital Electronics & Logic Design

More Related