Unit 3: Introduction to Number System and Logic Gates - Subjective Questions
PHY175 — Modern Physics And Electronics • Practice Questions with Detailed Answers
20 questions
Explain the concept of a positional number system. Convert into decimal and binary.
Positional number system: The value of a digit depends on the digit itself, its position, and the radix . For digits , the value is .
Octal to decimal:
Octal to binary: Replace each octal digit with three binary bits:
Hence, .
Describe the method of converting a decimal fraction to binary. Convert to binary.
For the integer part, repeatedly divide by and read the remainders from bottom to top. For the fractional part, repeatedly multiply by and read the integer parts from top to bottom.
Integer part:
- , remainder
- , remainder
- , remainder
- , remainder
- , remainder
- , remainder
Thus, .
Fractional part:
Thus, . Therefore, .
Convert into binary, octal, and decimal. Explain the conversion steps.
Hexadecimal to binary: Replace each hexadecimal digit with four bits:
Therefore, .
Binary to octal: Group bits in sets of three from the radix point:
Hexadecimal to decimal:
Hence, the equivalent values are , , and .
What is Gray code? Convert the binary number to Gray code and explain why Gray code is useful.
Gray code is a non-weighted code in which two successive code words differ in only one bit.
To convert binary to Gray:
- Copy the most significant bit: .
- XOR each binary bit with the bit immediately to its left: .
For binary :
- First Gray bit:
Thus, .
Uses: Gray code reduces transition errors in rotary encoders, position sensors, analog-to-digital converters, and asynchronous systems because only one bit changes between adjacent values.
Convert the Gray code into binary. State the general rule used for Gray-to-binary conversion.
The most significant binary bit is equal to the most significant Gray bit. Every following binary bit is obtained by XORing the previous binary bit with the current Gray bit:
For Gray code :
Therefore, . A quick check by converting back to Gray gives .
Define BCD and Excess-3 codes. Represent decimal in both codes and compare their important properties.
BCD (8421 code): Each decimal digit is represented separately by its four-bit binary equivalent.
For :
Therefore, .
Excess-3 code: Add to each decimal digit and encode the result in four-bit binary.
Therefore, .
Comparison:
- BCD is a weighted code; Excess-3 is non-weighted.
- BCD is not self-complementing; Excess-3 is self-complementing.
- Both encode decimal digits independently and use only of the possible four-bit combinations.
Explain why Excess-3 is called a self-complementing code. Illustrate the property using decimal digit .
A code is self-complementing when complementing every bit of a digit's code word directly produces the code word of its 's complement.
For decimal digit :
- Add : .
- Excess-3 representation of is .
- Complement all bits: .
- The 's complement of is .
- Excess-3 representation of is the binary form of , namely .
Thus, complementing the Excess-3 code of gives the Excess-3 code of . Algebraically, the encoded values are and , which are four-bit complements because .
Define the 's and 's complements of a binary number. Find both complements of and explain their use.
The 's complement is obtained by replacing every with and every with . The 's complement is obtained by adding to the 's complement.
Given :
- 's complement:
- Add :
- 's complement:
Uses:
- Complements transform subtraction into addition.
- 's complement is the standard representation for signed integers because it has only one representation of zero.
- For an -bit number , the 's complement equals , while the 's complement equals .
Perform the binary addition . Explain the carry rules used in binary addition.
First align the numbers by place value:
Binary addition rules are:
- , giving sum and carry
- , giving sum and carry
Adding from right to left:
Therefore, . In decimal, , and , confirming the result.
Using the 's complement method, subtract from $(101001)_2. Show all steps.
Let the minuend be and the subtrahend be .
Step 1: Find the 's complement of the subtrahend.
- 's complement of is .
- Adding gives .
Step 2: Add it to the minuend.
Step 3: Discard the end carry.
The six-bit result is .
Therefore, . In decimal, , and .
Use -bit 's complement arithmetic to evaluate . Explain how a negative result is identified and interpreted.
Represent both numbers using eight bits:
Find the 's complement of :
- Invert to obtain .
- Add to obtain .
Now add:
There is no carry beyond the eighth bit, and the most significant bit is , so the result is negative. To find its magnitude, take the 's complement of :
- Invert:
- Add :
Therefore, , represented in -bit 's complement as .
Describe the basic logic gates AND, OR, and NOT using Boolean expressions and truth tables.
AND gate: The output is only when both inputs are : .
OR gate: The output is when at least one input is : .
NOT gate: The output is the complement of the input: .
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
| 0 | 1 |
| 1 | 0 |
These gates form the basic building blocks for combinational and sequential digital circuits.
Distinguish between NAND, NOR, XOR, and XNOR gates. Give their Boolean expressions and principal applications.
NAND: . Its output is only when both inputs are . It is a universal gate.
NOR: . Its output is only when both inputs are . It is also a universal gate.
XOR: . Its output is when the inputs differ. It is used in adders, parity generation, and comparators.
XNOR: . Its output is when the inputs are equal. It is used in equality detectors and digital comparators.
NAND and NOR can implement any Boolean function, whereas XOR and XNOR are especially useful for arithmetic and comparison operations.
Prove that NAND is a universal gate by realizing NOT, AND, and OR operations using NAND gates only.
Let the NAND operation be represented by .
NOT using NAND: Connect both inputs together:
AND using NAND: NAND the inputs, then NAND the result with itself:
OR using NAND: By De Morgan's theorem, . Generate the complemented inputs and NAND them:
Since NOT, AND, and OR can each be made entirely from NAND gates, and these three operations can realize every Boolean function, NAND is called a universal gate.
State the principal laws of Boolean algebra and use them to simplify .
Important Boolean laws include:
- Identity: ,
- Null: ,
- Idempotent: ,
- Complement: ,
- Absorption: ,
- De Morgan: and
Simplification:
Using absorption, :
Using :
Thus, the simplified expression is .
State and prove De Morgan's theorems for two variables using truth tables.
De Morgan's theorems are:
| 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 |
The third and fourth columns are identical, proving the first theorem. The fifth and sixth columns are identical, proving the second theorem. In words, the complement of an OR becomes the AND of the complements, while the complement of an AND becomes the OR of the complements.
Define canonical SOP and canonical POS forms. Express in both forms.
A canonical SOP is an OR of minterms, where every product term contains every variable. A canonical POS is an AND of maxterms, where every sum term contains every variable.
Given:
The canonical SOP is:
The missing indices are , so the canonical POS is:
In a minterm, a bit value gives a complemented variable. In a maxterm, a bit value gives an uncomplemented variable.
Convert the Boolean function into canonical SOP form and write its minterm notation.
The variables are , , and . Expand each term so that every product contains all three variables.
For :
For :
Removing the repeated term gives:
The corresponding indices are . Therefore:
Simplify using a three-variable Karnaugh map and give the minimal SOP expression.
Place s in K-map cells , using Gray-code column order .
Form the largest possible groups:
- Group : In these four cells, remains constant, giving the term .
- Group : Here and remain constant while changes, giving .
Thus, the minimal SOP expression is:
The overlap at is valid. Every listed minterm is covered, and no zero-valued cell is included in either group.
Minimize using a four-variable K-map. Describe the grouping and state the simplified circuit.
Enter s at minterms in a four-variable K-map with Gray-code row and column ordering.
Two groups of four can be formed:
- Group : In all these cells, and , while and vary. This gives . The group uses K-map wraparound adjacency.
- Group : In all these cells, and , while and vary. This gives .
Therefore:
This is the XNOR function of and : . The circuit may be implemented with one XNOR gate, or with two AND gates, two NOT gates, and one OR gate.
Explain the concept of a positional number system. Convert into decimal and binary.
Positional number system: The value of a digit depends on the digit itself, its position, and the radix . For digits , the value is .
Octal to decimal:
Octal to binary: Replace each octal digit with three binary bits:
Hence, .
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →