



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
All Questions and Solutions for 2021 Monsoon Semester Digital Electronics midsem exam
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Question 1 : ( 6 marks) To prepare his mind about the ensuing state elections, a voter wants to record all the information he has about the candidates in terms of binary variables as follows, and then apply digital logic to arrive at the decision regarding whom he should vote for. (i) Whether the candidate is a current MLA: M = 1 if yes, else 0. (ii) If M = 1, the level of his performance, expressed by a 2-bit variable: P1 P0 = 1 1 if EXCELLENT, 0 1 if GOOD and 0 0 if POOR. (iii) The level of his HONESTY, expressed by a 2-bit variable H 1 H 0 : H 1 H 0 = 1 1 if HIGH, 1 0 if MEDIUM and 0 0 if LOW. (iv) His stature in his party: S = 1 if HIGH level, else 0. Based on these pieces of information, he would like to assign a grade to each candidate on a scale of 0 to 3, represented by a 2-bit variable A1 A 0 , given on the following basis: (a) High-level sitting MLA having EXCELLENT performance and HIGH honesty – 11, (b) Sitting MLA, either having at least GOOD performance and HIGH honesty, or having EXCELLENT performance and at least MEDIUM honesty – 10 , (c) New candidate having HIGH stature in his party, and a reputation for honesty – 10, (d) Sitting MLA, having at least GOOD performance and at least MEDIUM honesty – 01 , (e) New candidate who is relatively unknown but has a reputation for honesty – 0 1, (f) Sitting MLA, having a record of POOR performance – 00. Obtain Boolean expressions for the grade variables A1 and A0 in terms of the input variables M , P1 , P0 , H1 , H0 and S. Answer A 1 = M • S • P1 • (P0) • H1 • H0 + M • ( P 0 • H1 • H0 + P1 • H1 ) + M’ • S • H1 • H0 , A0 = M • S • P1 • (P0) • H1 • H0 + M • P0 • H1 + M’ • S’ • H1 • H. Most Common Mistake A large number of students wrote down Boolean expressions for A1 A 0 , just listing the six options for grading given in the question. Separate Boolean expressions for A1 and A0 were required in the question.
Question 2: ( 8 marks) Consider arithmetic operations in a digital system designed to handle signed numbers represented by 8 bits including the sign bit. Let M = + 43 and N = – 9 1 in decimal notation. (a) Perform the operations M + N , M – N , N – M and – M – N using two’s complement arithmetic and interpret the results in terms of their decimal equivalents. [4] (b) State in each case whether the result is correct, giving reasons. [ 4 ] Answer In 8 - bit sign-magnitude representation, M = 0010 1011 and N = 1101 101 1. (a) In 8 - bit two’s complement representation, M = 0010 1011 and N = 1010 0101 – M = 1101 0101 and – N = 0101 101 1. M + N M – N – M + N – M – N 0010 1011 0010 1011 1101 0101 1101 0101 1010 0101 0101 1011 1010 0101 0101 1011 110 1 0 000 1000 0110 1 0111 1010 1 0011 0000 (b) Correct Incorrect Incorrect Correct negative result = – 122. result = 122. positive result = – 4 8. Value should Value should result = 48. be positive. be negative. Most Common Mistakes Not considering the Sign Bit as specified in the question. Incorrect use of Two’s complement arithmetic. Overflow not recognised as the reason for incorrect result.
(b) The circuit is the 8-bit to 3-bit Priority Encoder. Most Common Mistake Not considering all possible values of B0 B1 B2 B3 B4 B5 B6 B that give the same value of Q3 Q2 Q. Question 4: ( 8 marks) A circuit performs the operation z = x ( y + 2 ), where both x and y are integers in the range
z being represented by the four-bit binary code Z3 Z2 Z1 Z0. (a) Construct the Truth Table of the circuit in the format given below. [ 2 ] X1 X 0 Y1 Y0 Z3 Z2 Z1 Z 0 1 0 0 0 0 1 0 (b) Write down a Verilog code in the Dataflow model for implementing the Truth Table as obtained above for the circuit. Note that the minterms corresponding to each of the bits Z3 Z2 Z1 Z0 are directly given by the truth table. [6]
Answer (a) X1 X0 Y1 Y0 Z3 Z2 Z1 Z 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 assign Z3 = ( X1 &&( !X0 )&& Y1 ))||( X1 && X0 &&(! Y1 )&& Y0 )||( X1 && X0 && Y1 ), assign Z 2 = (( !X1) && X0 && Y1 ))||( X1 &&( !X0 )&&( !Y1 ))||( X1 && X0 &&( !Y1 )&&( !Y0 )) ||( X1 && X0 && Y1 ), assign Z 1 = (( !X1 )&& X0 &&( !Y1 ))||( X1 &&( !X0 )&&( !Y1 )&& Y0 ) ||( X1 &&( !X0 )&& Y1 && Y0 )||( X1 && X 0 &&( !Y1 )&&( !Y0 )) ||( X1 && X0 && Y1 && Y0 ), assign Z 0 = (( !X1 )&& X0 && Y0 )||( X1 && X0 && Y 0 ). As all variables are 1-bit, & instead of &&, | instead of || and ~ instead of! can be used.