BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) Question Paper 2078 Nepal
This is the official BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) question paper for 2078, as set in the regular annual examination. It carries 100 full marks and a time allowance of 180 minutes, across 12 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 2078 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
(a) Perform the following number system conversions, showing all intermediate steps: (i) Convert the decimal number to its binary, octal and hexadecimal equivalents. (ii) Convert the hexadecimal number to decimal.
(b) Using 8-bit 2's complement representation, perform the subtraction and verify your result.
(c) Differentiate between weighted and non-weighted codes. Encode the decimal number into BCD (8421) and into Excess-3 code.
(a) Number system conversions
(i) to binary, octal and hexadecimal
Integer part (189) to binary — repeated division by 2:
| Division | Quotient | Remainder |
|---|---|---|
| 189/2 | 94 | 1 |
| 94/2 | 47 | 0 |
| 47/2 | 23 | 1 |
| 23/2 | 11 | 1 |
| 11/2 | 5 | 1 |
| 5/2 | 2 | 1 |
| 2/2 | 1 | 0 |
| 1/2 | 0 | 1 |
Reading remainders bottom-to-top: .
Fractional part (0.625) — repeated multiplication by 2:
; ; .
So .
Binary to octal — group in 3s from the binary point: .
Binary to hexadecimal — group in 4s from the binary point: .
(ii) to decimal
Using positional weights ():
(b) in 8-bit 2's complement
.
. Its 2's complement (i.e. ):
- 1's complement:
- add 1: .
Add :
00101101 (+45)
+ 10110010 (-78)
-----------
11011111
Result . The MSB is 1, so the result is negative. Its magnitude = 2's complement of :
- 1's complement , add 1 .
Hence the result is , which matches . Verified.
(c) Weighted vs non-weighted codes; BCD and Excess-3 of
Weighted code: each bit position carries a fixed numeric weight, and the digit value is the weighted sum of bits (e.g. BCD/8421, 2421, 84-2-1). Non-weighted code: positions have no fixed weights, so the digit cannot be obtained by a weighted sum (e.g. Excess-3, Gray code). Non-weighted codes are used for special properties such as error detection or self-complementing arithmetic.
BCD (8421) — encode each decimal digit in 4 bits:
Excess-3 — add 3 to each digit, then encode in 4 bits:
(a) Simplify the following Boolean function using a four-variable Karnaugh map and obtain the minimal Sum-of-Products (SOP) expression:
Indicate all the prime implicants and the essential prime implicants on the map.
(b) For the function in part (a), also obtain the minimal Product-of-Sums (POS) expression.
(c) Realize the minimal SOP expression obtained in part (a) using only NAND gates and draw the logic diagram.
(a) K-map simplification — minimal SOP
Four-variable K-map (rows , columns in Gray order ):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 1 (m0) | 1 (m1) | 0 (m3) | 1 (m2) |
| 01 | 0 (m4) | 1 (m5) | 0 (m7) | 0 (m6) |
| 11 | 1 (m12) | 1 (m13) | 0 (m15) | 1 (m14) |
| 10 | 1 (m8) | 1 (m9) | 0 (m11) | 1 (m10) |
Prime implicants (PIs):
- = {0,1,8,9}
- = {0,2,8,10}
- = {8,9,12,13}
- = {8,10,12,14}
- = {1,5,9,13}
Essential prime implicants (EPIs):
- — only PI covering m2
- — only PI covering m5
- — only PI covering m14
These three EPIs together cover all ten minterms , so no other PI is needed.
(b) Minimal POS
Group the 0s (maxterms ):
- (C=1, D=1) sum term — essential
- (A=0,B=1,D=0) sum term — essential (covers m4)
Together they cover all zeros, giving
(c) NAND-only realization of the SOP
The two-level SOP is converted to NAND-NAND by replacing every AND and the final OR with NAND gates (double inversion leaves the function unchanged):
Logic diagram (described):
- Generate complements using NAND gates as inverters (tie both inputs of a NAND together).
- First level: three 2-input NAND gates produce , , .
- Second level: a 3-input NAND combines these three outputs to give .
Thus is realized with a NAND-NAND (two-level) network plus inverters, all NAND gates.
Design a synchronous sequential circuit (a Mod-6 counter that counts in the sequence ) using JK flip-flops.
(a) Draw the state diagram and write down the present-state/next-state table.
(b) Derive the excitation table for the JK flip-flops and obtain the simplified input equations using Karnaugh maps.
(c) Draw the complete logic circuit diagram and comment on how the unused states are handled.
Synchronous Mod-6 counter () with JK flip-flops
Three flip-flops are needed (). Let outputs be (MSB ). States 6 and 7 are unused (treated as don't-cares).
(a) State diagram and next-state table
State diagram (described): a single directed ring , each transition on a clock edge.
| Present | Next |
|---|---|
| 000 | 001 |
| 001 | 010 |
| 010 | 011 |
| 011 | 100 |
| 100 | 101 |
| 101 | 000 |
| 110 | d d d |
| 111 | d d d |
(b) Excitation table and input equations
JK excitation rules: ; ; ; .
| 000 | 0d | 0d | 1d |
| 001 | 0d | 1d | d1 |
| 010 | 0d | d0 | 1d |
| 011 | 1d | d1 | d1 |
| 100 | d0 | 0d | 1d |
| 101 | d1 | 0d | d1 |
| 110 | dd | dd | dd |
| 111 | dd | dd | dd |
Using K-maps over (states 6,7 as don't-cares):
Check of : occurs only at 100 and 101; from 101 the counter must go to 000 so resets (), and from 100 it stays ( is don't-care), so is valid. is 1 only at state 011 (the 34 transition), correct.
(c) Logic circuit and unused-state handling
Circuit (described):
- : (toggles every clock).
- : (toggles when ).
- : (one AND gate), .
- All three flip-flops share a common clock (synchronous).
Unused states 110 and 111: Because they were entered as don't-cares, their behaviour follows the derived equations. Evaluating:
- From 110: ; holds at 1; . Next = 011 (a valid state).
- From 111: ; ; . Next = 000 (a valid state).
Both unused states return to valid states within one clock, so the counter is self-correcting and cannot lock up.
(a) Design a full adder using the truth table approach. Obtain the simplified Boolean expressions for the SUM and CARRY outputs and draw its logic diagram.
(b) Implement the SUM output of the full adder using an 8-to-1 multiplexer.
(c) Explain how a 3-to-8 line decoder can be used to implement the following two functions simultaneously:
(a) Full adder design
Inputs ; outputs (sum) and (carry).
| A | B | S | ||
|---|---|---|---|---|
| 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 |
, . Simplifying:
Logic diagram (described): Two XOR gates in cascade produce (, then ). uses three 2-input AND gates (, , ) feeding a 3-input OR gate. (Equivalently two half-adders + one OR.)
(b) SUM using an 8-to-1 multiplexer
Use as the three select lines (). The data input for line equals the SUM value of that minterm:
So connect to logic 1 and to logic 0; the MUX output then equals .
(c) Two functions with one 3-to-8 decoder
A 3-to-8 decoder with inputs produces all eight minterm lines (each output high for exactly one input combination). Any SOP function is then the OR of the decoder outputs for its minterms.
- : OR-gate the lines .
- : OR-gate the lines .
The same decoder feeds two separate 4-input OR gates, realizing both functions simultaneously. (Note: and , since the odd/even minterms correspond to .) For active-low decoder outputs, NAND gates would replace the OR gates.
Section B: Short Answer Questions
Attempt all / any as specified.
State and prove De Morgan's theorems for two variables. Using Boolean algebra, simplify the expression and express the result in its simplest form.
De Morgan's theorems (two variables)
Theorem 1:
Theorem 2:
Proof by truth table (Theorem 1):
| A | B | ||
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 |
Columns 3 and 4 are identical, proving . Theorem 2 is proved the same way (its truth table gives 1,1,1,0, equal on both sides). The two theorems are duals of each other.
Simplification of
Using (so ) and (idempotence):
Apply absorption and :
(a) Explain the operation of an SR latch using NOR gates and state its forbidden input condition. (b) What is meant by the 'race-around condition' in a JK flip-flop, and how does a master-slave configuration eliminate it?
(a) NOR-gate SR latch
An SR latch is built from two cross-coupled NOR gates: the output of each NOR feeds back to one input of the other. Inputs are (Set) and (Reset); outputs are and .
| S | R | Q | Action |
|---|---|---|---|
| 0 | 0 | Hold (no change) | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | 0/0 | Forbidden |
Operation: With the latch sets (); with it resets (); with it holds the stored value.
Forbidden condition: forces both and to 0, violating the requirement that they be complementary. Worse, if both inputs then return to 0 simultaneously, the final state is unpredictable (a race), so this input combination is disallowed.
(b) Race-around condition and master-slave solution
Race-around: In a level-triggered JK flip-flop with (toggle), if the clock pulse width is longer than the propagation delay of the gates, the output toggles repeatedly for the entire duration the clock is high. The final state at the end of the pulse becomes uncertain — this oscillation is the race-around condition.
Master-slave elimination: A master-slave JK uses two latches in series. The master latch is enabled when the clock is HIGH and accepts the inputs; the slave is enabled when the clock is LOW (clock inverted) and copies the master's state to the output. Because the two are never transparent at the same time, the output can change only once per clock cycle, removing the multiple-toggle oscillation. (Edge-triggered flip-flops achieve the same result.)
(a) Differentiate between a synchronous counter and an asynchronous (ripple) counter. (b) Draw the logic diagram of a 4-bit Serial-In Parallel-Out (SIPO) shift register using D flip-flops and explain its operation.
(a) Synchronous vs asynchronous (ripple) counter
| Feature | Synchronous counter | Asynchronous (ripple) counter |
|---|---|---|
| Clocking | All flip-flops share one common clock | Output of one FF clocks the next |
| Speed | Fast (all FFs change together) | Slow (delay ripples through stages) |
| Propagation delay | One FF delay | Accumulates with number of stages |
| Glitches/spikes | Free of decoding glitches | Prone to transient glitches |
| Circuit complexity | More combinational logic | Simpler hardware |
(b) 4-bit SIPO shift register using D flip-flops
Circuit (described): Four D flip-flops are cascaded. Serial data enters of ; the output connects to , to , and to . All four flip-flops share a common clock. The four outputs are available in parallel.
Operation: On each clock pulse, every flip-flop loads the value at its input, so the bit pattern shifts one position. A serial bit stream applied at is shifted in one bit per clock; after 4 clock pulses the 4 input bits occupy – and can be read out simultaneously (serial-to-parallel conversion). For example, to load 1011 the input bits are fed one per clock until all four bits sit in the register.
Design a half subtractor and a full subtractor. Write down their truth tables, derive the Boolean expressions for the DIFFERENCE and BORROW outputs, and draw the logic diagram of the full subtractor.
Half subtractor
Inputs (minuend), (subtrahend); outputs (difference ) and (borrow).
| A | B | D | |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
Full subtractor
Inputs (incoming borrow); outputs and .
| A | B | D | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
, . Simplifying:
Logic diagram of full subtractor (described):
- Two XOR gates produce the difference: , then .
- The borrow uses: an inverter for , an AND gate , and an AND gate (taking the complement of the first XOR), combined by a 2-input OR gate to give .
A full subtractor can thus be built from two half subtractors and one OR gate.
(a) What is a multiplexer? With a neat block diagram and function table, explain the working of a 4-to-1 multiplexer. (b) Show how two 4-to-1 multiplexers and one additional gate can be used to construct an 8-to-1 multiplexer.
(a) Multiplexer and 4-to-1 MUX
A multiplexer (MUX) is a combinational circuit that selects one of several input data lines and routes it to a single output, the choice being controlled by select (address) lines. An -select MUX has data inputs (a data selector / many-to-one switch).
4-to-1 MUX block (described): four data inputs , two select lines , one output .
Function table:
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
Boolean output:
The select lines decode to enable exactly one AND gate, passing its data input through the final OR gate.
(b) 8-to-1 MUX from two 4-to-1 MUX + one gate
Use three select lines :
- MUX-A (4-to-1) handles data inputs – with selects .
- MUX-B (4-to-1) handles data inputs – with selects .
- The MSB chooses between the two: when the lower group is wanted, when the upper group.
Combining gate: Enable each 4-to-1 MUX with via its active-low enable (MUX-A enabled by , MUX-B by ) and OR their outputs:
A single 2-input OR gate (with the enable arrangement) merges the two outputs, giving a complete 8-to-1 multiplexer.
(a) Define a self-complementing code and give one example. (b) Convert the binary number into Gray code and convert the Gray code back into binary. Show the bit-by-bit procedure.
(a) Self-complementing code
A self-complementing code is one in which the code of the 9's complement of a decimal digit is obtained simply by complementing (inverting) each bit of the code for that digit. Equivalently, the codes of a digit and of are bit-wise complements.
Example: Excess-3 code. For digit 4 the XS-3 code is ; its bit-complement is , which is the XS-3 code for . (The 2421 code is another example.)
(b) Gray code conversions
Binary Gray
Rule: MSB of Gray = MSB of binary; each next Gray bit (XOR of adjacent binary bits).
Binary: 1 0 1 1 0 1 1 0
Gray: 1 1 1 0 1 1 0 1
Check: ; ; ; ; ; ; ; .
Gray binary
Rule: MSB of binary = MSB of Gray; each next binary bit (XOR of the previous binary bit with the current Gray bit).
Gray: 1 1 0 1 1
Binary: 1 0 0 1 0
Check: ; ; ; ; .
Distinguish between Mealy and Moore models of a finite state machine using suitable block diagrams. State one practical advantage and one disadvantage of each model.
Mealy vs Moore finite state machines
Both are clocked sequential machines with a state register and combinational logic; they differ in how the output is generated.
| Aspect | Mealy machine | Moore machine |
|---|---|---|
| Output depends on | Present state and present inputs | Present state only |
| Output expression | ||
| Number of states | Usually fewer | Usually more |
| Output timing | Can change asynchronously with input (mid-cycle) | Changes only on clock edge (synchronous, glitch-free) |
Block diagrams (described):
- Mealy: Inputs and the state-register outputs both feed the output combinational logic (so inputs reach the output directly) as well as the next-state logic.
- Moore: Only the state-register outputs feed the output logic; the inputs feed only the next-state logic, so outputs are a pure function of state.
Mealy — Advantage: generally needs fewer states/flip-flops and reacts to input changes faster (lower latency). Disadvantage: outputs can change asynchronously with inputs, making them prone to glitches/spikes and harder to time.
Moore — Advantage: outputs change only on the clock edge, so they are stable and glitch-free, easier to synchronize. Disadvantage: usually requires more states/flip-flops and responds one clock cycle later to input changes.
What are 'don't care' conditions in a logic function? Using a Karnaugh map, simplify the BCD function and write the minimal SOP expression.
Don't-care conditions
A don't-care condition is an input combination for which the output value is irrelevant — either because that input combination never occurs (e.g. unused codes in BCD, where 1010–1111 never appear) or because the output is not used for that case. In a K-map a don't-care is marked (or X) and may be grouped as either 0 or 1, whichever yields a larger, simpler grouping, helping to minimize the logic.
K-map simplification
K-map (rows , columns ):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 0 | 1 (m1) | 1 (m3) | 0 |
| 01 | 0 | 1 (m5) | 1 (m7) | 0 |
| 11 | d (12) | d (13) | d (15) | d (14) |
| 10 | 0 | 1 (m9) | d (11) | d (10) |
All the 1-cells lie where (the and columns). Using the don't-cares to extend the grouping, the entire two columns where form a single group of eight, i.e. the single literal .
Frequently asked questions
- Where can I find the BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) question paper 2078?
- The full BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2078 (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) 2078 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) 2078 paper?
- The BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2078 paper carries 100 full marks and is meant to be completed in 180 minutes, across 12 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.