- Information
- AI Chat
Switching Theory and Logic Design notes
Electronic Circuit: devices and analysis (ECDA 223)
STI West Negros University
Recommended for you
Preview text
Warning: TT: undefined function: 32 Warning: TT: undefined function: 32 Warning: TT: undefined function: 32 Warning: TT: undefined function: 32
SWITCHING THEORY
AND
LOGIC DESIGN
LECTURE NOTES
B
(II YEAR – II SEM)
(2017-18)
Prepared by:
Mr.K, Assistant Professor
Mr.T, Assistant Professor
Department of Electronics and Communication Engineering
####### MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution – UGC, Govt. of India)
Recognized under 2(f) and 12 (B) of UGC ACT 1956 (Affiliated to JNTUH, Hyderabad, Approved by AICTE - Accredited by NBA & NAAC – ‘A’ Grade - ISO 9001:2015 Certified) Maisammaguda, Dhulapally (Post Via. Kompally), Secunderabad – 500100, Telangana State, India
MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY II Year B. ECE-II Sem L T/P/D C 3 1/ - /- 3
(R15A0407) SWITCHING THEORY AND LOGIC DESIGN OBJECTIVES This course provides in-depth knowledge of switching theory and the logic design techniques of digital circuits, which is the basis for design of any digital circuit. The course objecti ves are: To learn basic techniques for the design of digital circuits and fundamental concepts used in the design of digital systems. To understand common forms of number representation in digital electronic circuits and to be able to convert between different representations. To implement simple logical operations using combinational logic circuits
To design combinational logic circuits, sequential logic circuits. To impart to student the concepts of sequential circuits, enabling them to analyze sequential systems in terms of state machines. To implement synchronous state machines using flip-flops. UNIT -I: Number System and Boolean Algebra And Switching Functions: Number Systems, Base Conversion Methods, Complements of Numbers, Codes- Binary Codes, Binary Coded Decimal Code and its Properties, Unit Distance Codes, Error Detecting an d Correcting Codes, Hamming Code. Boolean Algebra: Basic Theorems and Properties, Switching Functions, Canonical and Standard Forms, Algebraic Simplification of Digital Logic Gates, Properties of XOR Gates, Universal Logic Gates vel NAND/NOR realizations. UNIT -II: Minimization and Design of Combinational Circuits: K- Map Method, up to Five variable K- Maps, Don’t Care Map Entries, Prime and Essential prime Implications, Quine Mc Cluskey Tabular Method, Combinational Design, Arithmetic Circuits, Comparator, decoder, Encoder, Multiplexers, DeMultiplexers, Code Converters. UNIT -III: Sequential Machines Fundamentals: Introduction, Basic Architectural Distinctions between Combinational and Sequential circuits, classification of sequential circuits, The binary cell, The S-R-Latch Flip-Flop The D-Latch Flip-Flop, The “Clocked T” Flip-Flop, The “ Clocked J-K” Flip-Flop, Design of a Clocked Flip-Flop, Conversion from one type of Flip-Flop to another, Timing and Triggering Consideration. UNIT -IV: Sequential Circuit Design and Analysis: Introduction, State Diagram, Analysis of Synchronous Sequential Circuits, Approaches to the Design of Synchronous Sequential Finite State Machines, Design Aspects, State Reduction, Design Steps, Realization using Flip-Flops Counters - Design of Ripple Counter, Synchronous counter, Ring Counter, Registers, Shift Register.
UNIT -V: Sequential Circuits: Finite state machine- capabilities and limitations ,Mealy and Moore models, , minimization of completely specified and incompletely specified sequential machines, Partition techniques and Merger chart methods-concept of minimal cover table. Algorithmic State Machines: Salient features of the ASM chart-Simple examples- Weighing machine and Binary multiplier.
UNIT - 1 NUMBER SYSTEMS & CODES
Introduction about digital system Philosophy of number systems Complement representation of negative numbers Binary arithmetic Binary codes Error detecting & error correcting codes Hamming codes
INTRODUCTION ABOUT DIGITAL SYSTEM
A Digital system is an interconnection of digital modules and it is a system that manipulates discrete elements of information that is represented internally in the binary form.
Now a day’s digital systems are used in wide variety of industrial and consumer products such as automated industrial machinery, pocket calculators, microprocessors, digital computers, digital watches, TV games and signal processing and so on.
Characteristics of Digital systems
Digital systems manipulate discrete elements of information. Discrete elements are nothing but the digits such as 10 decimal digits or 26 letters of alphabets and so on. Digital systems use physical quantities called signals to represent discrete elements. In digital systems, the signals have two discrete values and are therefore said to be binary. A signal in digital system represents one binary digit called a bit. The bit has a value either 0 or 1.
Analog systems vs Digital systems
Analog system process information that varies continuously i; they process time varying signals that can take on any values across a continuous range of voltage, current or any physical parameter.
Digital systems use digital circuits that can process digital signals which can take either 0 or 1 for binary system.
Advantages of Digital system over Analog system
- Ease of programmability
The digital systems can be used for different applications by simply changing the program without additional changes in hardware.
- Reduction in cost of hardware
The cost of hardware gets reduced by use of digital components and this has been possible due to advances in IC technology. With ICs the number of components that can be placed in a given area of Silicon are increased which helps in cost reduction.
3 speed
Digital processing of data ensures high speed of operation which is possible due to advances in Digital Signal Processing.
- High Reliability
Digital systems are highly reliable one of the reasons for that is use of error correction codes.
- Design is easy
The design of digital systems which require use of Boolean algebra and other digital techniques is easier compared to analog designing.
- Result can be reproduced easily
Since the output of digital systems unlike analog systems is independent of temperature, noise, humidity and other characteristics of components the reproducibility of results is higher in digital systems than in analog systems.
Disadvantages of Digital Systems
Use more energy than analog circuits to accomplish the same tasks, thus producing more heat as well. Digital circuits are often fragile, in that if a single piece of digital data is lost or misinterpreted the meaning of large blocks of related data can completely change. Digital computer manipulates discrete elements of information by means of a binary code. Quantization error during analog signal sampling.
For Ex: 1001 2 = [ ( 1 ) × 2 3 ] + [ ( 0 ) × 2 2 ] + [ ( 0 ) × 2 1 ] + [ ( 1 ) × 2 0 ] + [ ( 0 ) × 2-1 ] + [ ( 1 ) × 2 2 ] 1001 2 = [ 1 × 8 ] + [ 0 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ] + [ 0 × 0 ] + [ 1 × 0 ] 1001 2 = 9 10
Decimal Number system
The decimal system has ten symbols: 0,1,2,3,4,5,6,7,8,9. In other words, it has a base of 10.
Octal Number System
Digital systems operate only on binary numbers. Since binary numbers are often very long, two shorthand notations, octal and hexadecimal, are used for represent ing large binary numbers. Octal systems use a base or radix of 8. It uses first eight digits of decimal number system. Thus it has digits from 0 to 7.
Hexa Decimal Number System
The hexadecimal numbering system has a base of 16. There are 16 symbols. The decimal digits 0 to 9 are used as the first ten digits as in the decimal system, followed by the letters A, B, C, D, E and F, which represent the values 10, 11,12,13,14 and 15 respectively.
Decima l
Binar y
Octal Hexadeci mal 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
Number Base conversions
The human beings use decimal number system while computer uses binary number system. Therefore it is necessary to convert decimal number system into its equivalent binary.
i) Binary to octal number conversion ii) Binary to hexa decimal number conversion
iii) Octal to binary Conversion
iv) Hexa to binary conversion
v) Octal to Decimal conversion
Ex: convert 4057 8 to octal
=4x8 3 +0x8 2 +5x8 1 +7x8 0 +0x8-1+6x8-
=2048+0+40+7+0+0.
0= 0 -- 10. = =
0 -- 12 ↓ 0 -- 12. = 0 -- 12. =0 16
2598 10 = A26 16
ix) Octal to hexadecimal conversion:
The simplest way is to first convert the given octal no. to binary & then the binary no. to hexadecimal.
Ex: 756 8
7 5 6. 6 0 3 111 101 110. 110 000 011 0001 1110 1110. 1100 0001 1000 1 E E. C 1 8
x) Hexadecimal to octal conversion:
First convert the given hexadecimal no. to binary & then the binary no. to octal.
Ex: B9F
B 9 F. A E 1011 1001 1111. 1010 1110 101 110 011 111. 101 011 100 5 6 3 7. 5 3 4
=5637.
Complements:
In digital computers to simplify the subtraction operation & for logical manipulation complements are used. There are two types of complements used in each radix system.
i) The radix complement or r’s complement ii) The diminished radix complement or (r-1)’s complement
Representation of signed no binary arithmetic in computers:
Two ways of rep signed no 1. Sign Magnitude form 2. Complemented form Two complimented forms 1. 1‘s compliment form 2. 2‘s compliment form Advantage of performing subtraction by the compliment method is reduction in the hardware.( instead of addition & subtraction only adding ckt‘s are needed.) i. e, subtraction is also performed by adders only. Instead of subtracting one no. from other the compliment of the subtrahend is added to minuend. In sign magnitude form, an additional bit called the sign bit is placed in front of the no. If the sign bit is 0, the no. is +ve, If it is a 1, the no is _ve.
Ex: 0 1 0 1 0 0 1
↓ Sign bit =+41 magnitude ↑ 1 1 0 1 0 0 1
= - Note: manipulation is necessary to add a +ve no to a –ve no
Representation of signed no using 2’s or 1’s complement method: If the no. is +ve, the magnitude is rep in its true binary form & a sign bit 0 is placed in front of the MSB f the no is _ve , the magnitude is rep in its 2‘s or 1‘s compliment form &a sign bit 1 is placed in front of the MSB.
Ex:
Given no. Sign mag form 2‘s comp form 1‘s comp form 01101 +13 +13 + 010111 +23 +23 + 10111 -7 -7 - 1101010 -42 -22 -
Methods of obtaining 2’s comp of a no:
In 3 ways 1. By obtaining the 1‘s comp of the given no. (by changing all 0‘s to 1‘s & 1‘s to 0‘s) & then adding 1. 2. By subtracting the given n bit no N from 2n 3. Starting at the LSB , copying down each bit upto & including the first 1 bit encountered , and complimenting the remaining bits. Ex: Express -45 in 8 bit 2‘s comp form
+45 in 8 bit form is 00101101
I method: 1‘s comp of 00101101 & the add 1 00101101 11010010 +
11010011 is 2‘s comp form II method:
Subtract the given no. N from 2n
2 n = 100000000 Subtract 45= - +
11010011 is 2‘s comp
III method:
Original no: 00101101 Copy up to First 1 bit 1 Compliment remaining : 1101001
bits 11010011
Ex:
- 73 in 12 bit 2‘s comp form I method 01001001. 10110110. +
10110110 is 2‘s
II method: 28 = 100000000. Sub 73=-01001001.
10110110 is 2‘s comp III method :
Orginalno : 01001001. Copy up to 1‘st bit : 100 Comp the remaining bits: 10110110.
2’s compliment Arithmetic: The 2‘s comp system is used to rep –ve no using modulus arithmetic. The word length of a computer is fixed. i, if a 4 bit no. is added to another 4 bit no. the result will be only of 4 bits. Carry if any , from the fourth bit will overflow called the Modulus arithmetic. Ex:1100+1111= In the 2‘s compl subtraction, add the 2‘s comp of the subtrahend to the minuend. If there is a carry out , ignore it , look at the sign bit I,e, MSB of the sum term .If the MSB is a 0, the result is positive.& it is in true binary form. If the MSB is a ` ( carry in or no carry at all) the result is negative.& is in its 2‘s comp form. Take its 2‘s comp to find its magnitude in binary.
Ex:Subtract 14 from 46 using 8 bit 2‘s comp arithmetic:
= 00001110 = 11110010 2‘s comp +46 = 00101110 -14 =+11110010 2‘s comp form of -
Ex: Subtract 14 from 25 using 8 bit 1‘s EX: ADD -25 to +
25 = 00011001 +14 = 00001110 -45 = 11110001 -25 =+
+11 (1)
-11 11110100
No carry MSB = 00001011 result=-ve=-11 10 MSB is a 0 so result is +ve (binary )
=+11 10
Binary codes
Binary codes are codes which are represented in binary system with modification from the original ones. Weighted Binary codes Non Weighted Codes Weighted binary codes are those which obey the positional weighting principles, each position of the number represents a specific weight. The binary counting sequence is an example.
Reflective Code
A code is said to be reflective when code for 9 is complement for the code for 0, and
so is for 8 and 1 codes, 7 and 2, 6 and 3, 5 and 4. Codes 2421, 5211, and excess-3 are reflective, whereas the 8421 code is not.
Sequential Codes
A code is said to be sequential when two subsequent codes, seen as numbers in binary representation, differ by one. This greatly aids mathematical manipulation of data. The 8421 and Excess-3 codes are sequential, whereas the 2421 and 5211 codes are not.
Non weighted codes
Non weighted codes are codes that are not positionally weighted. That is, each position within the binary number is not assigned a fixed value. Ex: Excess-3 code
Excess-3 Code
Excess-3 is a non weighted code used to express decimal numbers. The code derives its name from the fact that each binary code is the corresponding 8421 code plus 0011(3).
Gray Code
The gray code belongs to a class of codes called minimum change codes, in which only one bit in the code changes when moving from one code to the next. The Gray code is non-weighted code, as the position of bit does not contain any weight. The gray code is a reflective digital code which has the special property that any two subsequent numbers codes differ by only one bit. This is also called a unit- distance code. In digital Gray code has got a special place.
(b). 679 + 536. 679 = 0110 0111 1001 .0110 in BCD +536 = +0101 0011 0010 .1000 in BCD
1216 1011 1010 0110. 1110 illegal codes +0110 + 0011 +0110. + 0110 add 0110 to each
(1)0001 (1)0000 (1)0101. (1)0100 propagate carry / / / / +1 +1 +1 +
0001 0010 0001 0110. 0100
1 2 1 6. 4
BCD Subtraction:
Performed by subtracting the digits of each 4 bit group of the subtrahend the digits from the corresponding 4- bit group of the minuend in binary starting from the LSD. if there is no borrow from the next group , then 6 10 (0110)is subtracted from the difference term of this group. (a)38-
In BCD 38= 0011 1000 In BCD -15 = -0001 0101
23 0010 0011 No borrow, so correct difference.
.(b) 206-147.
206 = 0010 0000 0110. 0111 in BCD -147 = -0001 0100 0111. 0110 in BCD
58 0000 1011 1110. 1111 borrows are present -0110 -0110. -0110 subtract 0110
0101 1000. 1001
BCD Subtraction using 9’s & 10’s compliment methods:
Form the 9‘s & 10‘s compliment of the decimal subtrahend & encode that no. in the 8421 code. the resulting BCD no are then added.
EX: 305 – 168.
305 = 305. -168= +83 9‘s comp of -168. _ _
(1)136. +1 end around carry
68 in BCD
(1)0001 0011 0110. 0110 +1 End around carry
0001 0011 0110. 0111 = 136.
Excess three(xs-3)code:
It is a non-weighted BCD code .Each binary codeword is the corresponding 8421 codeword plus 0011(3).It is a sequential code & therefore , can be used for arithmetic operations. is a self-complementing code o the subtraction by the method of compliment addition is more direct in xs-3 code than that in 8421 code. The xs-3 code has six invalid states 0000,0010,1101,1110,1111.. It has interesting properties when used in addition & subtraction.
Excess-3 Addition:
Add the xs-3 no by adding the 4 bit groups in each column starting from the LSD. If there is no carry starting from the addition of any of the 4-bit groups , subtract 0011 from the sum term of those groups ( because when 2 decimal digits are added in xs-3 & there is no carry , result in xs-6). If there is a carry out, add 0011 to the sum term of those groups( because when there is a carry, the invalid states are skipped and the result is normal binary).
136 corrected difference 305 10 = 0011 0000 0101. 0101 +831 10 = +1000 0011 0001. 0001 9‘s comp of 1 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +1011 0011 0110. 0110 1011 is illegal code +0110 add 0110
Switching Theory and Logic Design notes
Course: Electronic Circuit: devices and analysis (ECDA 223)
University: STI West Negros University
- Discover more from: