BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) Question Paper 2079 Nepal
This is the official BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) question paper for 2079, as set in the regular annual examination. It carries 100 full marks and a time allowance of 180 minutes, across 11 questions. On Kekkei you can attempt this Digital Logic (PU, ELX 110) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) exam or solving previous years' question papers, this 2079 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
(a) Convert the following numbers as indicated, showing all steps: (i) to its decimal and octal equivalents. (ii) to its binary and decimal equivalents. (6)
(b) Perform the subtraction using the 2's complement method and verify your answer in decimal. (3)
(c) What is a weighted code? Encode the decimal number in BCD (8421) and explain why the Gray code is preferred for shaft-position encoders. (3)
(a) Number conversions
(i)
To decimal:
To octal (group bits in 3s from the binary point):
So .
(ii)
To binary (each hex digit -> 4 bits):
To decimal:
(b) Subtraction by 2's complement
Make both 6 bits: minuend , subtrahend .
2's complement of : 1's complement , add 1 .
Add:
There is a carry-out of the MSB, so the result is positive and we discard the carry:
Verification: , , and . Confirmed.
(c) Weighted code, BCD encoding, Gray code
A weighted code is one in which each bit position is assigned a fixed weight, and the decimal value equals the weighted sum of the bits (e.g. BCD 8-4-2-1).
BCD (8421) of — encode each digit in 4 bits:
Gray code for shaft encoders: Gray code is preferred because only one bit changes between any two consecutive values. On a rotating shaft this prevents large transient errors that would occur if several bits changed at once and were read at slightly different instants, eliminating spurious ambiguous readings.
(a) State and prove De Morgan's theorems. Using Boolean algebra, simplify the expression and express the result in its simplest form. (6)
(b) A logic function is given by . Use a four-variable Karnaugh map to obtain the minimal sum-of-products expression and implement it using only NAND gates. (8)
(a) De Morgan's theorems and simplification
Statements:
- (complement of a sum = product of complements)
- (complement of a product = sum of complements)
Proof by truth table (Theorem 1):
| A | B | A+B | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 |
Columns and are identical, proving Theorem 1. Theorem 2 follows by the same method (columns and match).
Simplification:
(b) Karnaugh-map minimization
K-map (rows AB, columns CD in Gray order 00,01,11,10):
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 (0) | 1 (1) | 1 (7→via) 0? | 1 (2) |
| 01 | 1 (4) | 1 (5) | 1 (7) | 0 (6) |
| 11 | 1 (12) | 1 (13) | 1 (15) | 0 (14) |
| 10 | 1 (8) | 1 (9) | 0 (11) | 0 (10) |
(Cell 3 = m3 is 0; minterm 7 sits at AB=01,CD=11.)
Groups:
- Column CD=01 all four cells (m1,5,13,9) =
- Column CD=00 all four cells (m0,4,12,8) = → combine the two columns: (CD = 0x, i.e. C=0): covers m0,1,4,5,8,9,12,13.
- Remaining 1s: m2 () groups with m0 (): (already in ). m2 is covered by ? m2 has C=1, so NOT in . Group m0,m2 = .
- m7 () and m15 () group: .
Minimal SOP:
(Here covers all eight C=0 minterms; covers m2; covers m7, m15.)
NAND-only implementation: convert by double-negation and De Morgan:
- First level: a NAND used as inverter to form ; 3-input NANDs produce and .
- Second level: a 3-input NAND combines the three terms. All gates are NAND, giving a two-level NAND-NAND realization equivalent to the SOP.
(a) Design a synchronous sequential circuit that detects the input sequence 1011 (overlapping allowed) using a Mealy model. Draw the state diagram, construct the state table, perform state assignment, and obtain the excitation equations using JK flip-flops. (10)
(b) Differentiate between a Moore machine and a Mealy machine with the help of a suitable diagram. (4)
(a) Mealy sequence detector for 1011 (overlapping)
States (track longest matched prefix):
- : no useful prefix matched
- : matched "1"
- : matched "10"
- : matched "101"
Output (on the transition) when the 4th bit completes 1011; overlap means after detecting 1011 the trailing "1" can begin a new match (go to , and the "...11" path).
State diagram (described): transitions labelled input/output.
- : on 1 → ; on 0 →
- : on 1 → ; on 0 →
- : on 1 → ; on 0 →
- : on 1 → (1011 done, trailing 1 = new prefix); on 0 →
State table:
| Present | Next (X=0) | Next (X=1) | Out X=0 | Out X=1 |
|---|---|---|---|---|
| 0 | 0 | |||
| 0 | 0 | |||
| 0 | 0 | |||
| 0 | 1 |
State assignment (): .
Transition/excitation table (JK: from present to next ):
| X | Z | ||||
|---|---|---|---|---|---|
| 00 | 0 | 00 | 0X | 0X | 0 |
| 00 | 1 | 01 | 0X | 1X | 0 |
| 01 | 0 | 10 | 1X | X1 | 0 |
| 01 | 1 | 01 | 0X | X0 | 0 |
| 10 | 0 | 00 | X1 | 0X | 0 |
| 10 | 1 | 11 | X0 | 1X | 0 |
| 11 | 0 | 10 | X0 | X1 | 0 |
| 11 | 1 | 01 | X1 | X0 | 1 |
Excitation equations (K-map reduction of the columns):
(Here make follow ; are read from the table.)
(b) Moore vs Mealy machine
| Feature | Moore | Mealy |
|---|---|---|
| Output depends on | present state only | present state AND input |
| Output labelled on | states | transitions (arcs) |
| Number of states | usually more | usually fewer |
| Output timing | synchronous, changes with state | can change asynchronously with input |
| Glitches | less prone | input glitches can appear at output |
Diagram (described): In a Moore diagram each state circle carries its output (e.g. ); in a Mealy diagram each arrow carries input/output (e.g. ).
(a) Implement the Boolean function using an 8-to-1 multiplexer. Draw the complete connection diagram. (5)
(b) Design a 3-to-8 line decoder using logic gates and show how two such decoders can be cascaded with an enable input to build a 4-to-16 line decoder. (5)
(a) using an 8:1 MUX
Use as the select lines . Each minterm drives the corresponding data input to 1; others to 0.
| Minterm | Data line | Value | |
|---|---|---|---|
| 0 | 000 | 0 | |
| 1 | 001 | 1 | |
| 2 | 010 | 0 | |
| 3 | 011 | 1 | |
| 4 | 100 | 0 | |
| 5 | 101 | 1 | |
| 6 | 110 | 1 | |
| 7 | 111 | 0 |
Connection diagram (described): an 8:1 MUX with selects . Tie to logic 1 () and to logic 0 (GND). The MUX output .
(b) 3-to-8 decoder and cascading to 4-to-16
3-to-8 decoder: inputs , enable , eight active-high outputs where
Each output is a 4-input AND gate fed by the appropriate true/complement input lines plus ; three inverters generate the complements.
Cascading to 4-to-16: use two 3-to-8 decoders sharing inputs . The 4th (MSB) input acts as the enable selector:
- Decoder-0 enabled when → produces outputs – (use on its enable).
- Decoder-1 enabled when → produces outputs – (use on its enable).
At any time only one decoder is active, so exactly one of the 16 outputs is high, giving a complete 4-to-16 line decoder.
Section B: Short Answer Questions
Attempt all / any as specified.
(a) Draw the truth table of a full adder and derive the simplified expressions for the SUM and CARRY outputs. (4)
(b) Construct a 4-bit binary parallel adder using full adders and explain the limitation caused by carry-propagation delay. (4)
(a) Full adder
Inputs: and carry-in . Outputs: and .
| A | B | SUM | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Simplified expressions:
(b) 4-bit parallel adder and carry-propagation limitation
Cascade four full adders FA0–FA3. The carry-out of each stage is wired to the carry-in of the next:
A0 B0 A1 B1 A2 B2 A3 B3
| | | | | | | |
[FA0]--C1-->[FA1]--C2-->[FA2]--C3-->[FA3]--> C4 (final carry)
| | | |
S0 S1 S2 S3
Carry-in of FA0 is 0 (or used for subtraction). Outputs with final carry .
Limitation — carry-propagation (ripple) delay: Each full adder must wait for the carry from the previous stage before it can produce a correct sum and carry. The carry therefore ripples through all four stages, so the worst-case settling time grows linearly with the number of bits ( gate delay of one stage). This makes the ripple-carry adder slow for large word lengths; it is overcome by carry-look-ahead logic.
(a) Explain the operation of a JK flip-flop with its characteristic table and characteristic equation. What is the race-around condition and how does a master-slave configuration eliminate it? (5)
(b) Convert a D flip-flop into a T flip-flop, showing the required logic. (2)
(a) JK flip-flop
The JK flip-flop removes the forbidden state of the SR flip-flop. With clock applied:
Characteristic table:
| J | K | Action | |
|---|---|---|---|
| 0 | 0 | No change | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Toggle |
Characteristic equation:
Race-around condition: When and the clock pulse width is greater than the propagation delay of the flip-flop, the output toggles repeatedly during the single high level of the clock. The final state becomes unpredictable. This is the race-around problem of a level-triggered JK flip-flop.
Master-slave elimination: Two latches are connected in series. The master is enabled when the clock is HIGH and accepts the inputs; the slave is enabled when the clock is LOW (it uses the inverted clock) and copies the master's output. Because input and output sections are never enabled at the same instant, the output can change at most once per clock cycle, eliminating race-around.
(b) D flip-flop to T flip-flop
For a T flip-flop, . For a D flip-flop, . Equating:
So connect an XOR gate whose inputs are and the flip-flop output , and feed its output to the input. The clock is common.
(a) Design a MOD-6 synchronous up counter using T flip-flops and draw its timing diagram. (5)
(b) Distinguish between a synchronous counter and a ripple (asynchronous) counter. (2)
(a) MOD-6 synchronous up counter using T flip-flops
Counts (0–5) then back to 000. Three flip-flops .
State / excitation table (T = 1 where the bit changes):
| Count | Next | ||||
|---|---|---|---|---|---|
| 0 | 000 | 001 | 0 | 0 | 1 |
| 1 | 001 | 010 | 0 | 1 | 1 |
| 2 | 010 | 011 | 0 | 0 | 1 |
| 3 | 011 | 100 | 1 | 1 | 1 |
| 4 | 100 | 101 | 0 | 0 | 1 |
| 5 | 101 | 000 | 1 | 0 | 1 |
Excitation equations (K-map reduction, states 6 and 7 are don't-cares):
(With don't-cares for 110,111: ; ; .)
Timing diagram (described): All flip-flops share one clock.
- toggles every clock (square wave, period = 2 clocks).
- toggles when and .
- goes high after count 3 and resets after count 5. The waveforms repeat every 6 clock cycles; the count sequence read top-down is 0,1,2,3,4,5,0,...
(b) Synchronous vs ripple counter
| Synchronous counter | Ripple (asynchronous) counter |
|---|---|
| All flip-flops clocked by the same common clock | Output of one FF clocks the next |
| Faster; no cumulative delay | Slower; delays add up (ripple) |
| Needs combinational logic for inputs | Simple, minimal logic |
| No decoding glitches | Prone to transient glitches |
With the help of a neat logic diagram, explain the working of a 4-bit Serial-In Parallel-Out (SIPO) shift register. State two practical applications of shift registers.
4-bit Serial-In Parallel-Out (SIPO) shift register
Structure: Four D flip-flops (FF0–FF3) in cascade, all driven by a common clock. Serial data enters of FF0; the output of each flip-flop feeds the input of the next.
Din -> [D Q]FF0 -> [D Q]FF1 -> [D Q]FF2 -> [D Q]FF3
|Q0 |Q1 |Q2 |Q3
v v v v
(parallel outputs Q0 Q1 Q2 Q3 read together)
Working: On each clock edge every flip-flop loads the value at its input, so the bit pattern shifts one position to the right. After four clock pulses a 4-bit serial word has been fully shifted in and is available simultaneously on the four parallel outputs .
Example (input bits 1,0,1,1 LSB first):
| Clk | Q0 | Q1 | Q2 | Q3 |
|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 1 | 0 | 1 | 0 |
| 4 | 1 | 1 | 0 | 1 |
Thus serial data is converted to parallel form.
Two applications of shift registers:
- Serial-to-parallel (and parallel-to-serial) data conversion in communication interfaces such as UART/SPI.
- Temporary data storage and delay, ring/Johnson counters, and sequence generators.
(a) Express the function in canonical sum-of-products (minterm) form. (3)
(b) What are universal gates? Realize the EX-OR function using only NOR gates. (3)
(a) Canonical SOP of
First simplify/expand:
Expand to all three variables by inserting missing variables:
Combine and drop duplicate :
In minterm form:
(b) Universal gates and EX-OR using NOR only
Universal gates: NAND and NOR are called universal because any Boolean function (AND, OR, NOT) can be implemented using only that single gate type.
EX-OR with NOR gates: . A standard 5-NOR realization:
G1 = NOR(A,B) = (A+B)'
G2 = NOR(A,G1) = (A + (A+B)')' = A'(A+B) = AB'
G3 = NOR(B,G1) = (B + (A+B)')' = B'(A+B) = A'B
G4 = NOR(G2,G3) = (AB' + A'B)'
G5 = NOR(G4,G4) = inverter -> (AB' + A'B) = A XOR B
So five NOR gates (G5 acting as an inverter) produce .
(a) Design a BCD-to-seven-segment decoder, listing the truth table for the segment 'a' and obtaining its simplified expression. (4)
(b) Differentiate between an encoder and a decoder. (2)
(a) BCD-to-seven-segment decoder, segment 'a'
Inputs are BCD digits (=MSB), driving a common-cathode display (segment ON = 1). Codes 10–15 are invalid → don't-care (X).
Truth table for segment 'a' (a is OFF only for digits 1 and 4):
| Dec | A B C D | a |
|---|---|---|
| 0 | 0000 | 1 |
| 1 | 0001 | 0 |
| 2 | 0010 | 1 |
| 3 | 0011 | 1 |
| 4 | 0100 | 0 |
| 5 | 0101 | 1 |
| 6 | 0110 | 1 |
| 7 | 0111 | 1 |
| 8 | 1000 | 1 |
| 9 | 1001 | 1 |
| 10–15 | – | X |
K-map simplification (with don't-cares):
(b) Encoder vs decoder
| Encoder | Decoder |
|---|---|
| Converts (or many) active input lines into an -bit coded output | Converts an -bit coded input into one of active output lines |
| Inputs > outputs (compresses) | Inputs < outputs (expands) |
| Example: octal-to-binary, priority encoder | Example: 3-to-8 decoder, BCD-to-7-segment |
(a) Add the BCD numbers and and explain why a correction factor is sometimes required in BCD addition. (3)
(b) Write short notes on parity bit and its use in error detection. (2)
(a) BCD addition
, .
Binary sum:
The result is an invalid BCD code (greater than 9). Apply the correction factor +6 ():
So the BCD result is — i.e. digit 1 with a carry of 1 to the next decade.
Why correction is needed: BCD uses only 0000–1001 (0–9); the six combinations 1010–1111 are unused. Whenever a 4-bit sum exceeds 9 or produces a carry out of the group, adding 6 skips over those six illegal codes and restores a valid BCD digit plus the proper decimal carry.
(b) Parity bit and error detection
A parity bit is an extra bit appended to a binary word to make the total number of 1s either even (even parity) or odd (odd parity).
Use: The transmitter computes the parity bit; the receiver recomputes parity on the received word. If the parity no longer matches, a transmission error is flagged. A simple parity bit can detect any single-bit (odd number of) error but cannot detect an even number of errors and cannot correct errors.
Frequently asked questions
- Where can I find the BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) question paper 2079?
- The full BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2079 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
- Does the Digital Logic (PU, ELX 110) 2079 paper come with solutions?
- Yes. Every question on this Digital Logic (PU, ELX 110) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2079 paper?
- The BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2079 paper carries 100 full marks and is meant to be completed in 180 minutes, across 11 questions.
- Is practising this Digital Logic (PU, ELX 110) past paper free?
- Yes — reading and attempting this Digital Logic (PU, ELX 110) past paper on Kekkei is completely free.