Digital logic : Computer Science Engineering, THE GATE ACADEMY
-
Upload
the-gate-academy -
Category
Documents
-
view
234 -
download
1
description
Transcript of Digital logic : Computer Science Engineering, THE GATE ACADEMY
DIGITAL LOGIC
FFoorr
Computer Science
&
Information Technology
By
www.thegateacademy.com
Syllabus Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com
Syllabus for Digital Logic
Logic functions, Minimization, Design and synthesis of combinational and sequential circuits;
Number representation and computer arithmetic (fixed and floating point).
Analysis of GATE Papers
(Digital Logic)
Year Percentage of marks Overall Percentage
2013 3.00
5.90%
2012 4.00
2011 5.00
2010 7.00
2009 1.33
2008 4.00
2007 8.67
2006 7.33
2005 9.33
2004 9.33
2003 6.00
Contents Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page I
CC OO NN TT EE NN TT SS
Chapters Page No.
#1. Number Systems & Code Conversions 1-18 Base or Radix (r) of a Number System 1-2 Decimal to Binary Conversion 2-4 Coding Techniques 4-9 Character Codes 9-10 Assigment – 1 11-12 Assigment – 2 13-14 Answer Keys 15 Explanations 15-18
#2. Boolean Algebra & Karnaugh Maps 19-43
Basic Boolean Postulates 19-22 Complement of Function 22-25 Karnaugh Maps 25-29 Assigment – 1 30-33 Assigment – 2 33-35 Answer Keys 36 Explanations 36-43
#3. Logic Gates 44-64 Types of Logic Systems 44-52 Assigment – 1 53-56 Assigment – 2 57-58 Answer Keys 59 Explanations 59-64
#4. Logic Gate Families 65-83
Types of Logic Gate Families 65-72 Assigment – 1 73-77 Assigment – 2 78-79 Answer Keys 80 Explanations 80-83
#5. Combinational and Sequential Digital Circuits 84-120 Combinational Digital Circuit 84-91 Multiplexer 92 Demultiplexer 92-98 Counters 99-103 Assigment – 1 104-111 Assigment – 2 111-113
Contents Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page II
Answer Keys 114 Explanations 114-120
#6. Semiconductor Memory 121-125 Types of Memories 122 Memory Devices Parameters or Characteristic 122-123 Assigment 124 Answer Keys 125 Explanations 125
Module Test 126-141
Test Questions 126-136
Answer Keys 137
Explanations 137-141
Reference Book 142
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 1
CHAPTER 1
Number Systems & Code Conversions
Important Points
The concept of counting is as old as the evolution of man on this earth. The number systems are used to quantify the magnitude of something. One way of quantifying the magnitude of something is by proportional values. This is called analog representation. The other way of representation of any quantity is numerical (Digital). There are many number systems present. The most frequently used number systems in the applications of Digital Computers are Binary Number System, Octal Number System, Decimal Number System and Hexadecimal Number System.
Base or Radix (r) of a Number System
The Base or Radix of a number system is defined as the number of different symbols (Digits or Characters) used in that number system. The radix of Binary number system = 2 i .e. it uses two different symbols 0 and 1 to write the number sequence.
The radix of octal number system = 8 i.e. it uses eight different symbols 0, 1, 2, 3, 4, 5, 6 and 7 to write the number sequence.
The radix of decimal number system = 10 i.e. it uses ten different symbols 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 to write the number sequence.
The radix of hexadecimal number system = 16 i.e. it uses sixteen different symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,A, B, C, D, E and F to write the number sequence.
The radix of Ternary number system = 3 i.e. it uses three different symbols 0, 1 and 2 to write the number sequence.
To distinguish one number system from the other, the radix of the number system is used as suffix to that number. Example: 102 Binary Numbers; 108 Octal Numbers;
1010 Decimal Number; 1016 Hexadecimal Number;
Characteristics of any number system are: 1. Base or radix is equal to the number of digits in the system 2. The largest value of digit is one (1) less than the radix and 3. Each digit is multiplied by the base raised to the appropriate power depending upon
the digit position. The maximum value of digit in any number system is given by (r – 1)
Example: maximum value of digit in decimal number system = (10 – 1) = 9.
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 2
Binary, Octal, Decimal and Hexadecimal number systems are called positional number systems.
The number system in which the weight of each digit depends on its relative position within the number is called positional number system.
Any positional number system can be expressed as sum of products of place value and the digit value.
Example : 75610 =
156.248 = 1
The place values or weights of different digits in a mixed decimal number are as follows decimal point
The place values or weights of different digits in a mixed binary number are as follows binary point
The place values or weights of different digits in a mixed octal number are as follows octal point
The place values or weights of different digits in a mixed hexadecimal number are as follows: hexadecimal point
Decimal to Binary Conversion (a) Integer Number
Divide the given decimal integer number repeatedly by 2 and collect the remainders. This must continue until the integer quotient becomes zero. Example: 3710
Operation Quotient Remainder
37/2 18 +1
18/2 9 +0
9/2 4 +1
4/2 2 +0
2/2 1 +0
1/2 0 +1
1 0 0 1 0 1 Fig 1.1
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 3
Note: The conversion from decimal integer to any base-r system is similar to the above example except that division is done by r instead of 2.
(b) Fractional Number The conversion of a decimal fraction to a binary is as follows:
Example: 0.6875510 = X2
First, 0.6875 is multiplied by 2 to give an integer and a fraction. The new fraction is multiplied by 2 to give a new integer and a new fraction. This process is continued until the fraction becomes 0 or until the numbers of digits have sufficient accuracy.
Example: Integer value
1
0
1
1
Note: To convert a decimal fraction to a number expressed in base r, a similar procedure is used. Multiplication is done by r instead of 2 and the coefficients found from the integers range in value from 0 to (r – 1).
The conversion of decimal number with both integer and fraction parts are done separately and then combining the answers together.
Example: (41.6875)10 = X2
4110 = 1010012 0.687510 = 0.10112
Since, (41.6875)10 = 101001.10112.
Example : Convert the decimal number to its octal equivalent: 15310 = X8
Integer Quotient Remainder
153/8 +1
19/8 +3
2/8 +2
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 4
Example:(0.513)10 = X8
etc (153)10 …… 8
Example: Convert 25310 to hexadecimal 253/16 = 15 + (13 = D) 15/16 = 0 + (15 =F) D .
Example: Convert the binary number 1011012 to decimal. 101101 = = 32 + 8 + 4 + 1 = 45 (101101)2 = 4510.
Example: Convert the octal number 2578 to decimal. 2578 = = 128 + 40+7 = 17510
Example: Convert the hexadecimal number 1AF.23 to Decimal. 1AF.2316 =
Coding Techniques BCD (Binary Coded Decimal): In this each digit of the decimal number is represented by its
four bit binary equivalent. It is also called natural BCD or 8421 code. It is a weighted code.
Excess – 3 Code: This is an un-weighted binary code used for decimal digits. Its code assignment is obtained from the corresponding value of BCD after the addition of 3.
BCO (Binary Coded Octal): In this digit of the Octal number is represented by its three bit binary equivalent.
BCH (Binary Coded Hexadecimal): In this digit of the hexadecimal number is represented by its four bit binary equivalent.
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 5
Decimal
Digits
BCD (8421) Excess -3 Octal
digits
BCO Hexadecimal
digits
BCH
0
1
2
3
4
5
6
7
8
9
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
0
1
2
3
4
5
6
7
000
001
010
011
100
101
110
111
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Don’t care values or unused states in BCD code are , , , , , Don’t care values or unused state in excess – 3 codes are 0000, 0001, 0010, 1101, 1110,
1111. The binary equivalent of a given decimal number is not equivalent to its BCD value.
Example: 2510 = 110012. The BCD equivalent of decimal number 25 = 00100101. From the above example the BCD value of a given decimal number is not equivalent to its straight binary value.
The BCO (Binary Coded Octal) value of a given octal number is exactly equal to its straight binary value.
Chapter 1 Digital Logic
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750, [email protected] © Copyright reserved. Web: www.thegateacademy.com Page 6
Example: 258 = 2110 = 0101012. The BCO value of 258 is 0101012
From the above example, the BCO value of a given octal number is same as binary equivalent of the same number. BCO number can be directly converted into binary equivalent by writing each digit of BCO number into its equivalent binary into 3 digits.
The BCH (Binary Coded Hexadecimal) value of a given hexadecimal number is exactly equal to straight binary. Example: 2516 = 3710 = 1001012 The BCH value of hexadecimal number 2516 = 00100101. From this example the above statement is true. BCH can be converted into binary equivalent by writing each digit of BCH number into its equivalent binary into 4 digits from left side.
The r’s complement: Given a positive number N in a base r with an integer parts of n digits, the r’s complement of N is defined as Example: The ’s complement of is The ’s complement of is The ’s complement of is The (r ’s complement: Given a positive number N is base r with an integer part of n digits and a fraction part of m digits, the (r 1) complement of N is defined as .
Example: The ’s complement of 10 is The ’s complement of a binary number is obtained: the ’s are changed to ’s and the ’s to ’s
Rules of binary addition: 0+0=0; 0+1=1; 1+0=1; 1+1= Sum = 0, Carry =1 Rules of binary subtraction: 0-0=0; 0 1=difference = 1, Borrow = 1;
Example Add the two binary numbers 1011012 and 1001112
Solution
Augend 1 0 1 1 0 1
Addend 1 0 0 1 1 1 Sum 1 0 1 0 1 0 0
(r-1)’s Complement
r’s Complement
Binary
r=2
1’s
2’s
Octal
r=8
7th’s
8th’s
Decimal
r=10
9’s
10’s
Hexadecimal
r=16
15th’s
16th’s