Unit3 - Subjective Questions
ECE249 • Practice Questions with Detailed Answers
Perform the following number system conversions:\n1. to Decimal\n2. to Binary\n3. to Octal
1. to Decimal:\n\nUse positional weights ():\n (Note: )\n\n\n\n2. to Binary:\n\nDivide by 2 repeatedly:\n rem $1$\n rem $0$\n rem $1$\n rem $0$\n rem $1$\n rem $1$\nRead from bottom to top: \n\n3. to Octal:\n\nGroup bits in 3s starting from LSB:\n\n\n
Explain the method of converting a Binary number to a Gray code and vice-versa. Convert the binary number $10110$ to Gray code.
Binary to Gray Conversion:\n1. The MSB (Most Significant Bit) of the Gray code is the same as the MSB of the Binary number.\n2. Each subsequent bit of the Gray code is obtained by performing an XOR operation between the current binary bit and the previous binary bit.\n\nGray to Binary Conversion:\n1. The MSB of the Binary number is the same as the MSB of the Gray code.\n2. Each subsequent binary bit is obtained by XORing the previous calculated binary bit with the current Gray bit.\n\nExample: Convert Binary $10110$ to Gray:\nLet Binary \n \n \n \n \n* \n\nResult: Gray Code = $11101$
Subtract from using 8-bit 2's complement arithmetic.
We need to perform: or .\n\nStep 1: Represent numbers in 8-bit binary.\n \n \n\nStep 2: Find 2's complement of the subtrahend (14).\n 1's complement of 14: $11110001$\n Add 1: (This represents -14)\n\nStep 3: Add minuend to 2's complement of subtrahend.\n \n \n \n\n\nStep 4: Analyze result.\n There is a carry out of $1$ (9th bit). In 2's complement addition, discard the final carry.\n Result: $00001100$\n\nVerification: .\nCalculation: . The result is correct.
Differentiate between BCD (Binary Coded Decimal) and Excess-3 codes.
BCD (8421 Code):\n Definition: A weighted code where each decimal digit (0-9) is represented by its 4-bit binary equivalent.\n Weights: It uses weights 8, 4, 2, 1.\n Valid Range: $0000$ (0) to $1001$ (9). Codes from $1010$ to $1111$ are invalid.\n Arithmetic: Requires correction (adding 6) if the sum exceeds 9.\n\nExcess-3 (XS-3) Code:\n Definition: A non-weighted code derived by adding 3 ($0011$) to the corresponding BCD code.\n Weights: It is not a positional weighted code.\n Self-Complementing: It is a self-complementing code (9's complement of the decimal can be found by taking the 1's complement of the Excess-3 code).\n Example: Decimal 5 in BCD is $0101$; in Excess-3 it is .
State and prove De Morgan’s Theorems for two variables.
Theorem 1: The complement of a product is equal to the sum of the complements.\nExpression: \n\nTheorem 2: The complement of a sum is equal to the product of the complements.\nExpression: \n\nProof (using Truth Table):\n\n| A | B | | | | | | | | |\n|---|---|---|---|---|---|---|---|---|---|\n| 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |\n| 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |\n| 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 |\n| 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |\n\nFrom the table, columns and are identical. Columns and are identical.
Why are NAND and NOR gates called Universal Gates? Implement AND, OR, and NOT logic using only NAND gates.
Universal Gates:\nNAND and NOR gates are called universal gates because any boolean function or any other logic gate (AND, OR, NOT, XOR, etc.) can be implemented using a combination of only NAND gates or only NOR gates, without the need for any other type of gate.\n\nImplementation using NAND:\n\n1. NOT Gate using NAND:\n Connect both inputs of a NAND gate together.\n \n\n2. AND Gate using NAND:\n Connect a NAND gate followed by a NOT gate (made from NAND).\n First stage: \n Second stage: \n\n3. OR Gate using NAND:\n Invert inputs A and B individually using NAND gates, then feed them into a third NAND gate.\n Inputs: \n Output: \n * Using De Morgan's:
Explain the operation of an XOR (Exclusive-OR) gate with its truth table, logic symbol, and boolean expression.
Operation:\nThe XOR gate produces a HIGH (1) output only when the inputs are different (one is HIGH and the other is LOW). If both inputs are the same (both 0 or both 1), the output is LOW (0).\n\nBoolean Expression:\n\n\nTruth Table:\n\n| Input A | Input B | Output Y |\n| :---: | :---: | :---: |\n| 0 | 0 | 0 |\n| 0 | 1 | 1 |\n| 1 | 0 | 1 |\n| 1 | 1 | 0 |\n\nLogic Symbol:\nThe symbol resembles an OR gate with a curved line across the input side.\n\nApplication: Used in Parity generators/checkers and binary adders (Half Adder/Full Adder).
Simplify the following boolean expression using Boolean algebra rules:\n
Given: \n\nStep 1: Group terms.\nCombine terms with common variables.\n\n\nStep 2: Apply Inverse Law ().\n\n\n\nStep 3: Factor out .\n\n\nStep 4: Apply Inverse Law.\n\n\n\nStep 5: Apply Distributive Law ().\n\nUsing : \n\nAlternative Simplification from Step 4:\n (if applying Redundancy/Absorption directly)\n\nFinal Simplified Expression:\n
Define Sum of Products (SOP) and Product of Sums (POS) forms. Convert the expression into canonical SOP form.
Definitions:\n Sum of Products (SOP): A boolean expression where several product terms (AND terms) are summed (ORed) together. Example: .\n Product of Sums (POS): A boolean expression where several sum terms (OR terms) are multiplied (ANDed) together. Example: .\n\nConversion of to Canonical SOP:\n\n1. Expand the expression:\n \n (Since )\n\n2. Simplify (Absorptive Law):\n \n \n\n3. Convert to Canonical (Standard) SOP:\n Each term must contain all variables (A, B, C).\n Term A: Multiply by \n \n Term BC: Multiply by \n \n\n4. Combine and remove duplicates:\n \n \n \n Minterm Notation:
Simplify the following function using a K-Map and realize the circuit using basic gates:\n
Step 1: Plot the K-Map (4 Variables)\nWe place 1s in cells: 0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14.\n\nRows (AB): 00, 01, 11, 10\nCols (CD): 00, 01, 11, 10\n\nStep 2: Grouping\n1. Quad 1: Cells 0, 1, 4, 5 ($0000, 0001, 0100, 0101$).\n AB changes 00->01, CD changes 00->01.\n Common: and . Term: .\n2. Quad 2: Cells 0, 2, 4, 6 ($0000, 0010, 0100, 0110$).\n AB changes 00->01, CD changes 00->10 (wraparound).\n Common: and . Term: .\n3. Quad 3: Cells 0, 1, 8, 9 ($0000, 0001, 1000, 1001$).\n AB changes 00->10, CD changes 00->01.\n Common: and . Term: .\n4. Quad 4: Cells 8, 9, 12, 13 ($1000, 1001, 1100, 1101$).\n AB changes 10->11, CD changes 00->01.\n Common: and . Term: .\n5. Quad 5: Cells 4, 5, 6, 12, 13, 14 (Can we group larger?)\n Let's check optimized grouping. \n Group Cells 0,1,8,9,4,5,12,13 -> Octet. Corresponds to .\n Group Cells 0,2,4,6,8,10(empty),12,14. -> Cell 10 is missing.\n Let's refine: \n Octet 1: Cells 0, 1, 4, 5, 8, 9, 12, 13. Covers three columns except column 11 and 10. Actually, these cells are columns 00 and 01. Covers all rows. The variable constant is .\n Quad 2: Cells 2, 6, 14. We can group 2, 6, 14 with something? \n Group 4, 6, 12, 14. Corresponds to .\n Group 0, 2, 8, 10(empty)? No.\n Group 2, 6 with 0, 4 (Already covered). \n Remaining 1s to cover: Cell 2, 6, 14. \n Group 2, 6, 0, 4? (Redundant). \n Group 2, 6, 14, and... maybe 10 is 0? Yes.\n Let's group 6, 14, 4, 12 ($0110, 1110, 0100, 1100$). Term: .\n Is Cell 2 covered? We need 0, 2, 4, 6. Term .\n\nFinal Simplified Expression:\n\n(Note: covers 0,1,4,5,8,9,12,13. Remaining are 2, 6, 14. covers 4,12,6,14. Remaining is 2. covers 0,4,2,6. All covered.)\n\nCircuit Realization:\nUse NOT gates for inversions, AND gates for product terms, and an OR gate for the sum.
What are 'Don't Care' conditions in K-Maps? Simplify the following function involving don't care conditions:\n
Don't Care Conditions:\nThese are input combinations for which the output state (0 or 1) does not matter or will never occur. They are denoted by 'X' or 'd' in the K-Map. They can be treated as 1s or 0s to help form larger groups for better minimization.\n\nSimplification:\nPlotting 1s: 1, 3, 7, 11, 15\nPlotting Xs: 0, 2, 5\n\nGrouping:\n1. Quad 1: Cells 1, 3, 5(X), 7. (Row 00/01, Col 01/11). Common: .\n2. Quad 2: Cells 3, 7, 11, 15. (Column 11). Common: .\n3. Quad 3: Cells 0(X), 1, 2(X), 3. (Row 00). Common: .\n\nWait, let's optimize:\n Group 1 (Cells 3, 7, 11, 15): Term .\n Group 2 (Cells 1, 3, 5, 7): Term . (Redundant if 3 and 7 covered? No, need 1 and 5).\n Group 3 (Cells 0, 1, 2, 3): Term .\n\nCheck coverage:\n 1s at 1, 3, 7, 11, 15 must be covered.\n covers 3, 7, 11, 15.\n We need to cover '1'.\n We can use Don't cares 0 and 5.\n Group 0, 1, 2, 3? No, 2 is X, 0 is X. Covers 1. Term .\n* Alternative: Group 1, 3, 5, 7. Covers 1. Term .\n\nSimplified Expression:\n or (Depending on selection).\nUsing covers 1,3,5,7. 1 is covered. 3,7 covered twice. 11,15 covered by .\nResult:
Perform the subtraction using 1's complement method: .
Problem: where and .\n\nStep 1: Find the 1's complement of the subtrahend ().\n 1's Comp = $10001$.\n\nStep 2: Add to the 1's complement of .\n\n\n\n\n\nStep 3: Check for Carry.\nThere is a carry of 1 (End-Around Carry).\n\nStep 4: Add the carry to the LSB of the result.\n\n\n\n\n\nResult: \n\nVerification:\n. . Correct.
Convert the following:\n1. to Decimal\n2. to Binary
1. to Decimal:\nWeights: \n\n\n\n\n\n2. to Binary:\nConvert each Hex digit to 4-bit Binary.\n \n \n \n \n\nCombine:\n
Implement the following boolean function using only NOR gates:\n
Step 1: Simplify/Modify Expression for NOR logic.\nNOR logic corresponds to .\nWe have . This is typically easier with NAND, but for NOR:\nApply double inversion: (This is OR form).\n\nTo use NOR, we generally want Product of Sums (POS) or manipulation.\nConvert to POS: .\n\nStep 2: Realize using NOR.\n1. Create term: Use a NOR gate, output is . Invert this to get .\n Gate 1: Inputs A, B Output .\n Gate 2 (Inverter): Input Output .\n2. Create term: Similarly.\n Gate 3: Inputs A, C Output .\n Gate 4 (Inverter): Input Output .\n3. AND them together.\n AND using NOR: Invert inputs, then NOR. (We have and ).\n Actually, a clearer way using standard 2-level NOR-NOR logic is typically for POS forms.\n * NOR . Not quite.\n\nAlternative Direct Mapping:\n.\nUsing standard POS realization:\n1. Gate 1: into NOR .\n2. Gate 2: into NOR .\n3. Gate 3: Feed outputs of Gate 1 and 2 into a NOR gate.\n \n Apply De Morgan's: .\n\nConclusion:\nThree NOR gates are required.\n1. NOR(A, B)\n2. NOR(A, C)\n3. NOR(Output1, Output2)
What are Minterms and Maxterms? Express the boolean function as a sum of minterms.
Definitions:\n Minterm: A product term in a boolean function containing all variables in either complemented or uncomplemented form. Corresponding to SOP.\n Maxterm: A sum term in a boolean function containing all variables. Corresponding to POS.\n\nConversion of :\n1. Term : Missing .\n \n Binary: , .\n2. Term : Missing .\n \n \n Binary: , , , .\n\nCombine:\nTotal Minterms: .\nExpression:
Prove the Consensus Theorem: .
Statement: The consensus term () is redundant if the terms and exist.\n\nAlgebraic Proof:\n\nMultiply the term by :\n\n\nRearrange terms:\n\nFactor out:\n\nSince :\n\n\n\n\nConclusion: The theorem is proved.
Simplify the boolean function using a K-Map.
Note: We are given Maxterms (), which corresponds to placing 0s in the K-Map and grouping them to find the POS expression.\n\nStep 1: Plot 0s.\nCells: 0, 1, 3, 8, 9, 11, 15.\n\nStep 2: Grouping 0s.\n1. Quad 1: Cells 0, 1, 8, 9.\n Row 00, 10 (), Col 00, 01 ().\n Note: In POS, variables are inverted. Variable, Complemented Variable.\n Constant bits: . Sum term: .\n2. Quad 2: Cells 1, 3, 9, 11.\n Row 00, 10 (), Col 01, 11 ().\n Constant bits: . Sum term: .\n3. Pair: Cells 11, 15.\n Row 10, 11 (), Col 11 ().\n Grouping with 3,7,11,15? Cell 7 is not 0. So just pair 11, 15?\n Wait, is 3, 11, 15... Can we group 3, 11 with 1, 9 (Already done). \n Left with 15. Group 11, 15. \n Better: Group 11, 15 with 9, 13 (Is 13 a 0? No).\n Group 3, 11? (Already in Quad 2).\n Must cover 15. Group 11, 15. Term: .\n Wait, let's check input again. Maxterms: 0,1,3,8,9,11,15.\n 11 is $1011$, 15 is $1111$. changes. . constant $11$. Term is incorrect. changes? No. $10, 11$. is 1. changes. . Term .\n Is there a better group for 15? 3, 7, 11, 15 (7 is not 0). \n Actually, let's look at grouping 3 and 1? Done.\n * 15 can only group with 11.\n\nExpression:\n
Perform the following binary arithmetic operations:\n1. \n2.
1. Addition: \n\n\n\n\n (0 carry 1)\n (0 carry 1)\n (1 carry 1)\n (0 carry 1)\n (0 carry 1)\n (1 carry 1)\n\nResult: $1100100$\n\n2. Multiplication: \n\n\n\n\n\n\n\n\n\n\nResult: $10000111$
Compare 1's complement and 2's complement representations of signed binary numbers.
1. Representation of Zero:\n 1's Complement: Has two representations for zero: Positive zero ($0000...$) and Negative zero ($1111...$).\n 2's Complement: Has a unique representation for zero ($0000...$).\n\n2. Range (for n bits):\n 1's Complement: to .\n 2's Complement: to . 2's complement can represent one extra negative number.\n\n3. Arithmetic Complexity:\n 1's Complement: Requires 'End-Around Carry' (if a carry is generated at the MSB, it must be added to the LSB).\n 2's Complement: The carry generated at the MSB is simply discarded, making arithmetic circuitry simpler and faster.\n\n4. Usage:\n* 2's Complement is the standard for signed integer arithmetic in modern computers due to the unique zero and simpler arithmetic.
Draw the logic circuit for the following boolean expression without simplifying it, then simplify it and draw the optimized circuit:\n
Original Circuit:\nRequires three 3-input AND gates and one 3-input OR gate (plus inverters).\n\nSimplification:\n\nFactor out from first two:\n\n\n\nFactor out :\n\nUsing Distributive law inside parenthesis where :\n\n\n\n\nOptimized Circuit:\n1. OR Gate: Inputs B, C Output .\n2. AND Gate: Inputs A, Output of OR Final .\nRequires only 1 AND gate and 1 OR gate (2 inputs each).