MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Similar documents
Department of Computer Science and Engineering Question Bank- Even Semester:

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

MODULE 3. Combinational & Sequential logic

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Vignana Bharathi Institute of Technology UNIT 4 DLD

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

St. MARTIN S ENGINEERING COLLEGE

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

1. Convert the decimal number to binary, octal, and hexadecimal.

EE292: Fundamentals of ECE

Asynchronous (Ripple) Counters

RS flip-flop using NOR gate

Chapter 4. Logic Design

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

MC9211 Computer Organization

A Review of logic design

Experiment 8 Introduction to Latches and Flip-Flops and registers


Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Computer Architecture and Organization

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

UNIVERSITI TEKNOLOGI MALAYSIA

Chapter 3 Unit Combinational

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Counter dan Register


DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

UNIT IV. Sequential circuit

CHAPTER 4: Logic Circuits

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad ELECTRICAL AND ELECTRONICS ENGINEERING

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

RS flip-flop using NOR gate

AIM: To study and verify the truth table of logic gates

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

VU Mobile Powered by S NO Group

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

WINTER 15 EXAMINATION Model Answer

Department of CSIT. Class: B.SC Semester: II Year: 2013 Paper Title: Introduction to logics of Computer Max Marks: 30

D Latch (Transparent Latch)

Module -5 Sequential Logic Design

SEMESTER ONE EXAMINATIONS 2002

Scanned by CamScanner

EECS 270 Midterm Exam Spring 2011

Subject : EE6301 DIGITAL LOGIC CIRCUITS

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Principles of Computer Architecture. Appendix A: Digital Logic

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY CS6201-DIGITAL PRINCIPLE AND SYSTEM DESIGN. I Year/ II Sem PART-A TWO MARKS UNIT-I

CHAPTER 4: Logic Circuits

Analogue Versus Digital [5 M]

EKT 121/4 ELEKTRONIK DIGIT 1

A.R. ENGINEERING COLLEGE, VILLUPURAM ECE DEPARTMENT

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Microprocessor Design

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

IT T35 Digital system desigm y - ii /s - iii

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Lecture 8: Sequential Logic

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

Chapter 6 Registers and Counters

BHARATHIDASAN ENGINEERING COLLEGE, NATTRAMPALLI DEPARTMENT OF ECE

PURBANCHAL UNIVERSITY

Decade Counters Mod-5 counter: Decade Counter:

Synchronous Sequential Logic

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath


Sequential Logic Circuits

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

DIGITAL ELECTRONICS MCQs

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Logic Design Viva Question Bank Compiled By Channveer Patil

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Digital Fundamentals: A Systems Approach

WINTER 14 EXAMINATION

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

North Shore Community College

Logic Design. Flip Flops, Registers and Counters

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

S.K.P. Engineering College, Tiruvannamalai UNIT I

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM

CS302 - Digital Logic Design FAQs By

Question Bank. Unit 1. Digital Principles, Digital Logic

Digital Principles and Design

211: Computer Architecture Summer 2016

ME 515 Mechatronics. Introduction to Digital Electronics

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Transcription:

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER 2016 CS 203: Switching Theory and Logic Design Time: 3 Hrs Marks: 100 PART A ( Answer All Questions Each carries 3 Marks ) 1. Perform the following conversions 2. What you mean by weighted code? Weighted binary codes are those binary codes which obey the positional weight principle. Each position of the number represents a specific weight. Several systems of the codes are used to express the decimal digits 0 through 9. In these codes each decimal digit is represented by a group of four bits. In the example below, 100101, which is a binary base 2 number, is converted to a decimal (base 10) number.100101 = Binary (base 2) number543210 = positional weights (1 x 2^5) + (0 x 2^4) + (0 x 2^3) + (1 x 2^2) + (0 x 2^1) + (1 x 2^0) =32 + 0 + 0 + 4 + 0 + 1 = 3737base10 = decimal conversion Other weighted methods include BCD and 2421, each of which uses a similar formula to assign weights and convert to decimal

3. Add the following BCD numbers. 01100111 + 01010011. 4. What are the universal gates? Why they are called universal gate? NAND and NOR gates are called universal gates because they can be used in place of all basic gates that AND,OR and NOT. PART B ( Answer any TWO, Each carries 9 Marks ) 5. Simplify the following Boolean functions, using four-variable maps: a) F(w, x, y, z) = (1, 4, 5, 6, 12, 14, 15) ( 5 marks) b) F(A, B, C, D) = (0, 1, 2, 4, 5, 7, 11, 15) (4 marks)

5. Implement the following functions with NAND Gate F(x, y, z) = (0, 6) 6. Minimize the function F= Σm(4,5,10,11,15,1820,24,26,30,31) + Σm(9,12, 14,16,19,21,25) where Σ are the minters corresponding to don t care conditions using QuinMcClusky method Minimize the function given below by Quine-McClusky method. f (A,B,C,D) m(0, 5, 6, 7, 9,10,13,14,15) Step 1: Form a table of functions of minterms according to the number of 1 s in each minterm as shown in Table E1.a

Step 2: Start pairing off each element of first group with the next, however since m0 has no 1 s, it and the next group of numbers with one 1 s are missing, therefore they cannot be paired off. Start by pairing elements of m5 with m7, m13, m14, and m6 with m7, m13, m14, and so on If they pair off, write them in the minterm that pair, i.e. m5 and m7 pair off 0101 anda separate table and 0111 to produce 01x1, so in the next table E1.b under minterm paired we sign in front ofenter 5, 7 and under ABCD we enter 01x1 and place a 5 and 7 in Table E1.a Note: Each minterm in a group must be compared with every minterm in the other.group even if either or both of them have already been checked Step 3: Now repeat the same procedure by pairing each element of a group with the elements of the next group for elements that have x in the same position. For example, 5,7 matches 13,15 to produce x1x1. These elements are placed in table E1.c as shown, and the above elements in Table E1.b are checked. (The elements that produce the same ABCD pattern are eliminated.) Since 9,13 and 10,14 in Table E1.b do not pair off, they are prime implicants and with m0, from E1.a, and (d) and (e) from E1.c are unpaired individuals. Therefore, it is possible to write the minimized SOP as a+b+c+d+r or f (A,B,C,D) ABCD ACD ACD BD BC Note: Check this result for Example 1 by Karnaugh map approach.

Table E1.b represents all possible two-square implicants and the literals that they eliminate, i.e. 9 (1001b) combined with 13 (1101b) produces 1x01. As a result, literal B is eliminated. Corresponding product is ACD. Since the only way of making an implicant that contains m9 is to combine it with m13, the implicant 9-13 is a prime one. The same rule applies to m10. Table E1.c represents all possible four-square implicants and the literals that they eliminate, i.e. 5 (0101b) combined with 7 (0111b) and 13 (1101b) and 15 (1111b) produces x1x1. As a result, literals A and C are eliminated. Corresponding product is BD. PART C ( Answer All Questions Each Carries 3 Marks ) 7. Explain binary subtractor. Binary Subtractor is a decision making circuit that subtracts two binary numbers from each other, for example, X Y to find the resulting difference between the two numbers.

8. show the logic digram of SR flip-flop with four NAND gate The SR flip-flop, also known as a SR Latch, can be considered as one of the most basic sequential logic circuit possible. This simple flip-flop is basically a one-bit memory bistable device that has two inputs, one which will SET the device (meaning the output = 1 ), and is labelled S and another which will RESET the device (meaning the output = 0 ), labelled R. 9. what are the differences of flip-flop and Latch?

10. Implement 4:1 multiplexer 4-to-1 Multiplexer A 4-to-1 multiplexer consists four data input lines as D0 to D3, two select lines as S0 and S1 and a single output line Y. The select lines S1 and S2 select one of the four input lines to connect the output line. The particular input combination on select lines selects one of input (D0 through D3) to the output. The figure below shows the block diagram of a 4-to-1 multiplexer in which the multiplexer decodes the input through select line. The truth table of a 4-to-1 multiplexer is shown below in which four input combinations 00, 10, 01 and 11 on the select lines respectively switches the inputs D0, D2, D1 and D3 to the output. That means when S1=0 and S0 =0, the output at Y is D0, similarly Y is D1 if the select inputs S1=0 and S0= 1 and so on.

PART D ( Answer any TWO, Each carries 9 Marks ) 11. Explain how a look ahead adder speeds up the addition process.(9 marks) A carry-lookahead adder is a fast parallel adder as it reduces the propagation delay by more complex hardware, hence it is costlier. In this design, the carry logic over fixed groups of bits of the adder is reduced to two-level logic, which is nothing but a transformation of the ripple carry design. This method makes use of logic gates so as to look at the lower order bits of the augend and addend to see whether a higher order carry is to be generated or not Consider the full adder circuit shown above with corresponding truth table. If we define two variables as carry generate Gi and carry propagate Pi then, P i = A i B i Gi = Ai Bi

The sum output and carry output can be expressed as Si = Pi Ci C i +1 = Gi + Pi Ci Where Gi is a carry generate which produces the carry when both Ai, Bi are one regardless of the input carry. Pi is a carry propagate and it is associate with the propagation of carry from Ci to Ci +1. The carry output Boolean function of each stage in a 4 stage carry-lookahead adder can be expressed as C1 = G0 + P0 Cin C2 = G1 + P1 C1 = G1 + P1 G0 + P1 P0 Cin C3 = G2 + P2 C2 = G2 + P2 G1+ P2 P1 G0 + P2 P1 P0 Cin C4 = G3 + P3 C3 = G3 + P3 G2+ P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 Cin From the above Boolean equations we can observe that C4 does not have to wait for C3 and C2 to propagate but actually C4 is propagated at the same time as C3 and C2. Since the Boolean expression for each carry output is the sum of products so these can be implemented with one level of AND gates followed by an OR gate. The implementation of three Boolean functions for each carry output (C2, C3 and C4) for a carry-lookahead carry generator shown in below figure.

12. a) Express the Boolean function F = A + B C in a sum of minterms The function has three variables, A, B and C. The first term A is missing two variables; therefore A = A(B+B ) = AB+AB This is still missing one variable C: A = (AB+AB ) (C+C ) = ABC+ABC +AB C+AB C The second term B C is missing one variable: B C = B C (A+A ) = AB C+A B C F = A+B C = ABC+ABC +AB C+AB C + AB C+A B C But AB C appears twice, and according to theorem 1 F = ABC+ABC +AB C+AB C +A B C = m7+m6+m5+m4+m1 = Σ( 1,4,5,6,7) b) Describe the differences between PLA and PAL(5 mark) PLA has both programmable AND and OR planes whereas PAL has only programmable AND planes and OR plane is fixed PLA has more flexibility in the logic circuit function implementation than PAL PAL is simpler to manufacture than PLA PLA have reduced speed performance PAL devices are manufactured in smaller size. Drawbacks of PLA o PLA were hard to be implemented o PLA reduced the speed performance of circuits. Advantage of PAL

o Simple to manufacturers Less expensive o Better performance Disadvantage of PAL Not flexible as compared PLA, because OR plane is fixed. 13. a)implement Full adder circuit using NAND gate only.(5 marks) Full Adder using NAND gate only To construct a full adder circuit, we ll need three inputs and two outputs. Since we ll have both an input carry and an output carry, we ll designate them as C IN and C OUT. At the same time, we ll use S to designate the final Sum output. The resulting truth table is shown to the right. This is looking a bit messy. It looks as if C OUT may be either an AND or an OR function, depending on the value of A, and S is either an XOR or an XNOR, again depending on the value of A. Looking a little more closely, however, we can note that the S output is actually an XOR between the A input and the half-adder SUM output with B and C IN inputs. Also, the output carry will be true if any two or all three inputs are logic 1. What this suggests is also intuitively logical: we can use two half-adder circuits. The first will add A and B to produce a partial Sum, while the second will add C IN to that Sum to produce the final S output. If either half-adder produces a carry, there will be an output carry. Thus, C OUT will be an OR function of the half-adder Carry outputs. The resulting full adder circuit is shown here

b) Use an 8-to-1 multiplexer to realize the function f(a, b, c, d) = P m(1, 5, 7, 8, 9, 13, 14), with b, c, and d as the control inputs.

PART E ( Answer any FOUR, Each carries 10 Marks ) 15. (a) Design a 4 but binary ripple counter using flip-flop that trigger on the i) Positive edge transition ii) Negative edge transition (10) A ripple counter is an asynchronous counter where only the first flipflop is clocked by an external clock. All subsequent flip-flops are clocked by the output of the preceding flip-flop. Asynchronous counters are also called ripple-counters because of the way the clock pulse ripples it way through the flip-flops. The MOD of the ripple counter or asynchronous counter is 2 n if n flip-flops are used. For a 4- bit counter, the range of the count is 0000 to 1111 (2 4-1). A counter may count up or count down or count up and down depending on the input control. The count sequence usually repeats itself. When counting up, the count sequence goes from 0000, 0001, 0010,... 1110, 1111, 0000, 0001,... etc. When counting down the count sequence goes in the opposite manner: 1111, 1110,... 0010, 0001, 0000, 1111, 1110,... etc. The complement of the count sequence counts in reverse direction. If the uncomplemented output counts up, the complemented output counts down. If the uncomplemented output counts down, the complemented output counts up. There are many ways to implement the ripple counter depending on the characteristics of the flip flops used and the requirements of the count sequence. Clock Trigger: Positive edged or Negative edged JK or D flip-flops Count Direction: Up, Down, or Up/Down Asynchronous counters are slower than synchronous counters because of the delay in the transmission of the pulses from flip-flop to flip-flop. With a synchronous circuit, all the bits in the count change synchronously with the assertion of the clock. Examples of synchronous counters are the Ring and Johnson counter. It can be implemented using D-type flip-flops or JK-type flip-flops. The circuit below uses 2 D flip-flops to implement a divide-by-4 ripple counter (2 n = 2 2 = 4). It counts down. 011

Notes: Click on CLK (Red) switch and observe the changes in the outputs of the flip flops. The CLK switch is a momentary switch (similar to a door bell switch - normally off). PR and CLR are both connected to VCC (set to 1) The D flip flop clock has a rising edge CLK input. For example Q0 behaves as follows: o The D input value just before the CLK rising edge is noted (Q0 0 ). o When CLK rising edge occurs, Q0 is assigned the previously noted D value (Q0 0 ). o Thus, whenever a rising edge appears at the CLK of the D flip flop, the output Q changes state (or toggles). The MOD or number of unique states of this 2 flip flop ripple counter is 4 (2 2 ). Simulate and Breadboard the Ripple Counter circuit. A Truncated Ripple Counter is used if a MOD of less than 2 n is required. For example, if you want to change the sequence from 3,2,1,0,3,2,1,0... to 3,2,0,3,2,0 16. design a synchronous sequential circuit whose state diagram is shown in Figure 13. The type of flip-flop to be use is J-K.

. From the state diagram, we can generate the state table shown in Table 9. Note that there is no output section for this circuit. Two flip-flops are needed to represent the four states and are designated Q0Q1. The input variable is labelled x. In the first row of Table 11, we have a transition for flip-flop Q0 from 0 in the present state to 0 in the next state. In Table 10 we find that a transition of states from 0 to 0 requires that input J = 0 and input K = X. So 0 and X are copied in the first row under J0 and K0 respectively. Since the first row also shows a transition for the flip-flop Q1 from 0 in the present state to 0 in the next state, 0 and X are copied in the first row under J1 and K1. This process is continued for each row of the table and for each flip-flop, with the input conditions as specified in Table 10. The simplified Boolean functions for the combinational circuit can now be derived. The input variables are Q0, Q1, and x; the output are the variables J0, K0, J1 and K1. The information from the truth table is plotted on the Karnaugh maps shown in Figure 14.

17. a) Design a mod 6 asynchronous up counter using T flip-flop(6 marks) Normal binary counter counts from 0 to 2 N - 1, where N is the number od bits/flipflops in the counter. In some cases, we want it to count to numbers other than 2 N - 1. This can be done by allowing the counter to skip states that are normally part of the counting sequence. There are a few methods of doing this. One of the most common methods is to use the CLEAR input on the flip-flops. In the example above, we have a MOD-6 counter. Without the NAND gate, it is a MOD-8 counter. Now, with the NAND gate, the output from the NAND gate is connected to the

asynchronous CLEAR inputs of each flip-flop. The inputs to the NAND gate are the outputs of the B and C flip-flops. So, all the flip-flops will be cleared when B = C = 1 (110 2 = 6 10 ). When the counter goess from state 101 to state 110, the NAND output will immediately clear the counter to state 000. Once the flip-flops have been cleared, the B = C = 1 condition no longer exists and the NAND output goes back to high. The counter will therefore count from 000 to 101, and for a very short period of time, be in state 110 before the counter is cleared. This state is called the temporary state and the counter usually only remains in a temporary state for a few nanoseconds. We can essentially say that the counter skips 110 and 111 so that it goes only six different states; thus, it is a MOD-6 counter. We also have to note that the temporary state causes a spike or glitch on the output waveform of B. This glitch is very narrow and will not normally be a problem unless it is used to drive other circuitry outside the counter. The 111 state is the unused state here. In a state machine with unused states, we need to make sure that the unused states do not cause the system to hang, ie. no way to get out of the state. We don't have to worry about this here because even if the system does go to the 111 state, it will go to state 000, a valid state) on the next clock pulse. b) Differentiate between combinational and sequential circuits (4 marks) Combinational Logic Circuits Output is a function of the present inputs (Time Independent Logic). Do not have the ability to store data (state). It does not require any feedback. It simply outputs the input according to the logic designed. Used mainly for Arithmetic and Boolean operations. Logic gates are the elementary building blocks. Independent of clock and hence does not require triggering to operate. Sequential Logic Circuits Output is a function of clock, present inputs and the previous states of the system. Have memory to store the present states that is sent as control input (enable) for the next operation. It involves feedback from output to input that is stored in the memory for the next operation. Used for storing data (and hence used in RAM). Flip flops (binary storage device) are the elementary building unit. Clocked (Triggered for operation with electronic pulses).

Example: Adder [1+0=1; Dependency only on present inputs i.e., 1 and 0]. Example: Counter [Previous O/P +1=Current O/P; Dependency on present input as well as previous state]. 18. Design BCD counter using JK flip-flop A binary coded decimal (BCD) is a serial digital counter that counts ten digits.and it resets for every new clock input. As it can go through 10 unique combinations of output, it is also called as Decade counter. A BCD counter can count 0000, 0001, 0010, 1000, 1001, 1010, 1011, 1110, 1111, 0000, and 0001 and so on. A 4 bit binary counter will act as decade counter by skipping any six outputs out of the 16 (24) outputs. There are some available ICs for decade counters which we can readily use in our circuit, like 74LS90. It is an asynchronous decade counter. The above figure shows a decade counter constructed with JK flip flop. The J output and K outputs are connected to logic 1. The clock input of every flip flop is connected to the output of next flip flop, except the last one. The output of the NAND gate is connected in parallel to the clear input CLR to all the flip flops. This ripple counter can count up to 16 i.e. 24. Decade Counter Operation When the Decade counter is at REST, the count is equal to 0000. This is first stage of the counter cycle. When we connect a clock signal input to the counter circuit, then the circuit will count the binary sequence. The first clock pulse can make the circuit to count up to 9 (1001). The next clock pulse advances to count 10 (1010).

Then the ports X1 and X3 will be high. As we know that for high inputs, the NAND gate output will be low. The NAND gate output is connected to clear input, so it resets all the flip flop stages in decade counter. This means the pulse after count 9 will again start the count from count 0. 19. Draw and explain 4 bit Johnson counter. Draw the timing diagram also. A Johnson counter is a modified ring counter, where the inverted output from the last flip flop is connected to the input to the first. The register cycles through a sequence of bitpatterns. The MOD of the Johnson counter is 2n if n flip-flops are used. The main advantage of the Johnson counter counter is that it only needs half the number of flip-flops compared to the standard ring counter for the same MOD. It can be implemented using D-type flip-flops (or JK-type flip-flops).

Notes: Enable the flips flops by clicking on the RESET (Green) switch. The RESET switch is a on/off switch (similar to a room light switch) Click on CLK (Red) switch and observe the changes in the outputs of the flip flops. The CLK switch is a momentary switch (similar to a door bell switch - normally off). The D flip flop clock has a rising edge CLK input. For example Q 1 behaves as follows: o The D input value just before the CLK rising edge is noted (Q 0 ). o When CLK rising edge occurs, Q 1 is assigned the previously noted D value (Q 0 ). 20. a) what is race condition? How it can be avoided?(5 marks) A race condition is a result of poor design for a latch or flip-flop. It denotes a condition in which the data and clock are changing at the same time and the result depends on which one wins. In rare cases the data can be exactly on the threshold between a 0 and 1 and when the clock changes, the output actually stays between a 0 and 1 for a while (for example in a 5V system the output may stay around 2.5 volts for a short time (microseconds, maybe). When this happens the output is said to be 'metastable'. This could have serious effects on the operation of the system and worse, could be virtually impossible to duplicate and thus very hard to find and fix. This same problem can exist at inputs to a logic gate and produce unwanted 'glitches'. In order to prevent these design flaws, the designer needs to do a 'worst case timing analysis' on all the logic. This analysis uses propagation delays, rise and fall times, threshold points, etc. to calculate timings. He must do both minimum and maximum times for each device and choose the worst case combinations. In a large system this can be very time consuming but there are tools to aid in this analysis. Power gating is used to simply turn the clock on and off (or gate the clock) to sections of logic that aren't in use for periods of time. This results in a reduction in power.

b) Implement a JK flip-flop with a T flip-flop and a minimal AND-OR-NOT network. Let us assume that the complements of J, K and Q signals are available. Draw the logic diagram to show your design..(5 marks) ktubtechquestions.com