Lab viva guide

Digital electronics viva questions and answers: 60 short answers for the DE lab, from gates to counters

23 min read Updated English

Digital electronics viva questions come after you have wired the circuit on the trainer kit and shown the truth table: the examiner points at the IC and asks its number, then the Boolean expression, then what happens if an input is left open. This page gives 60 digital electronics viva questions with short spoken answers, grouped from number codes and gates through K-maps, combinational circuits, flip-flops and counters to the lab ICs and logic families, so you can jump to tomorrow's experiment and say the answers out loud.

How the examiner runs a digital electronics lab viva

The DE or digital logic design lab is usually taken in the second or third semester by ECE, EEE, CSE and IT students. You verify gates, build adders, a multiplexer, a code converter, flip-flops, shift registers and a counter on a breadboard or trainer kit with 74-series ICs. At the practical you build one circuit, show the truth table with LEDs, and then face a five-to-ten-minute viva with your record open. Viva marks are a separate part of the practical marks under most university schemes.

  • First, your circuit: 'which IC is this, what is its supply pin, why does this LED glow for 1 0?'
  • Then the expression: 'write the sum and carry of a full adder' or 'simplify this with a K-map'.
  • Then a what-if: 'what if I leave this TTL input open?', 'what if J and K are both 1?'
  • Then a comparison: latch versus flip-flop, synchronous versus asynchronous counter, TTL versus CMOS.
  • Know the pin diagram of every IC you used.

Number systems and codes

Why do digital systems use the binary number system?

Electronic switches such as transistors are reliable in two states, on and off, so two voltage levels can represent 1 and 0 with good noise immunity. Binary arithmetic and Boolean logic map directly onto these two states, which keeps circuits simple.

What is the 2's complement of a number, and why is it used?

To get the 2's complement, I invert every bit and add 1. It is used for signed numbers because subtraction becomes addition, the same adder works for both, and there is only one representation of zero. An 8-bit 2's complement number ranges from minus 128 to plus 127.

What is the difference between 1's complement and 2's complement?

1's complement only inverts the bits; 2's complement inverts and adds 1. 1's complement has two zeros, plus zero and minus zero, and needs an end-around carry in subtraction. 2's complement has a single zero and no end-around carry, which is why computers use it.

What is BCD?

Binary coded decimal represents each decimal digit separately with four bits in 8421 weighting, so 59 is 0101 1001. Only 0000 to 1001 are valid; the six codes 1010 to 1111 are unused. It is used in digital displays, clocks and calculators.

Why do we add 6 in BCD addition?

Four bits can count to 15 but a BCD digit stops at 9, so six codes are skipped. If a 4-bit sum is greater than 9 or produces a carry, adding 0110 skips those six invalid codes and gives the correct BCD digit with a carry to the next digit.

What is Gray code, and where is it used?

Gray code is an unweighted code in which only one bit changes between successive values. It is used in rotary shaft encoders, where it avoids false readings during transitions, and in K-map ordering, where adjacent cells differ by one variable.

How do you convert binary to Gray code?

The most significant Gray bit equals the most significant binary bit. Each next Gray bit is the XOR of the current binary bit and the one to its left. So binary 1011 becomes Gray 1110. In the lab I built this converter with three XOR gates from a 7486.

What is excess-3 code?

Excess-3 is obtained by adding 3, that is 0011, to the BCD code of each decimal digit, so 4 becomes 0111. It is unweighted and self-complementing: the 1's complement of a digit's code gives the code of its 9's complement, which simplified decimal subtraction in older machines.

What are weighted and unweighted codes?

In a weighted code each bit position has a fixed value, like 8, 4, 2 and 1 in BCD or 2421. In an unweighted code the positions have no fixed weight, like Gray code and excess-3. ASCII is an alphanumeric code for characters.

What is a parity bit?

An extra bit added to data so that the total number of 1s is even, for even parity, or odd, for odd parity. The receiver recounts the 1s to detect a single-bit error. Parity detects any odd number of bit errors but cannot correct them or detect two-bit errors.

Logic gates, Boolean algebra and K-maps

What is a logic gate? Name the basic gates.

A logic gate is an electronic circuit that produces an output based on a logical function of its inputs. The basic gates are AND, OR and NOT. NAND and NOR are the universal gates, and XOR and XNOR are the exclusive gates.

Why are NAND and NOR called universal gates?

Because any Boolean function, including AND, OR and NOT, can be built using only NAND gates or only NOR gates. For example, a NAND with both inputs tied together is a NOT gate. This lets a whole circuit be made from one type of IC, which is cheaper to manufacture.

How do you make an OR gate using only NAND gates?

Invert each input with a NAND whose inputs are tied together, then feed both inverted inputs to a third NAND. By De Morgan's theorem, NOT of NOT A AND NOT B equals A OR B. So three NAND gates make an OR gate.

What is the truth table of XOR, and where is it used?

XOR gives 1 when the inputs are different and 0 when they are the same: 0 0 gives 0, 0 1 gives 1, 1 0 gives 1, 1 1 gives 0. It is used for the sum in adders, parity generators, comparators and binary to Gray conversion.

What is XNOR called, and why?

XNOR is called the equality or equivalence gate because its output is 1 only when both inputs are equal. It is used in magnitude comparators to check whether two bits match.

State De Morgan's theorems.

First: the complement of a product equals the sum of the complements, so NOT of A AND B equals NOT A OR NOT B. Second: the complement of a sum equals the product of the complements, so NOT of A OR B equals NOT A AND NOT B. They are verified in the lab with a truth table.

Say 'break the bar, change the sign'; examiners like the short form.

What are SOP and POS forms?

Sum of products is an OR of AND terms, like AB plus BC, and is built with AND-OR or NAND-NAND logic. Product of sums is an AND of OR terms, like A plus B into B plus C, and is built with OR-AND or NOR-NOR logic.

What are minterms and maxterms?

A minterm is a product term containing every variable once, complemented or not, and is 1 for exactly one input combination. A maxterm is a sum term containing every variable and is 0 for exactly one combination. A function is the sum of its minterms or the product of its maxterms.

What is a Karnaugh map, and why are the cells in Gray code order?

A K-map is a grid of cells, one per minterm, used to simplify Boolean expressions by grouping adjacent 1s. The rows and columns follow Gray code order so that physically adjacent cells, including the wrap-around edges, differ in only one variable, which can then be eliminated.

What are the rules for grouping in a K-map?

Groups must contain 1, 2, 4, 8 or another power of two cells, must be rectangular, and can wrap around the edges. Make each group as large as possible and use as few groups as possible. Every 1 must be covered at least once, and overlapping is allowed.

What are don't-care conditions?

Input combinations that never occur or whose output does not matter, marked X in the K-map. I can treat each X as 1 or 0, whichever gives a bigger group. In a BCD circuit, the inputs 1010 to 1111 are don't-cares.

What is the limitation of the K-map method?

It becomes difficult beyond four or five variables because adjacency is hard to see. For more variables, the Quine-McCluskey tabular method is used, and in practice simplification is done by software tools.

Combinational circuits: adders, multiplexers, decoders

What is the difference between combinational and sequential circuits?

In a combinational circuit the output depends only on the present inputs, and there is no memory, as in adders and multiplexers. In a sequential circuit the output depends on present inputs and the past state, so it needs memory elements such as flip-flops and usually a clock.

What are the outputs of a half adder?

A half adder adds two bits and gives sum equals A XOR B and carry equals A AND B. It cannot take a carry from a previous stage, which is why it is called half. In the lab I built it with one 7486 XOR gate and one 7408 AND gate.

What are the sum and carry expressions of a full adder?

A full adder adds A, B and a carry-in. Sum equals A XOR B XOR carry-in, and carry-out equals AB plus carry-in into A XOR B, which is the same as AB plus B carry-in plus A carry-in. It can be built from two half adders and an OR gate.

What is a half subtractor?

It subtracts one bit from another and gives difference equals A XOR B and borrow equals NOT A AND B, assuming A minus B. A full subtractor also takes a borrow-in. Like the adder, the difference is an XOR function.

What is the drawback of a ripple-carry adder, and how is it solved?

Each stage must wait for the carry from the previous stage, so the delay grows with the number of bits. A carry look-ahead adder computes all carries in parallel from generate and propagate signals, which makes it faster at the cost of more gates.

What is a multiplexer?

A multiplexer, or data selector, has 2 to the power n data inputs, n select lines and one output; the select lines decide which input reaches the output. An 8-to-1 mux, the 74151, has three select lines. It is used in data routing and to implement Boolean functions.

How do you implement a Boolean function with a multiplexer?

For a function of three variables with an 8-to-1 mux, I connect the variables to the select lines and tie each data input to 1 or 0 according to the truth table. With a 4-to-1 mux, two variables go to the select lines and each input becomes 0, 1, the third variable or its complement.

What is a demultiplexer?

A demultiplexer does the reverse of a multiplexer: it takes one input and sends it to one of 2 to the power n outputs selected by n select lines. A decoder with an enable input works as a demultiplexer, which is why the 74138 is called a decoder-demultiplexer.

What is the difference between a decoder and an encoder?

A decoder converts an n-bit code into one of 2 to the power n outputs, so a 3-to-8 decoder activates one of eight lines. An encoder does the reverse, converting one active input line out of 2 to the power n into an n-bit code.

What is a priority encoder?

An encoder that gives the code of the highest-priority active input when more than one input is active at the same time, and usually a valid output to show at least one input is active. An ordinary encoder gives a wrong code if two inputs are high together.

What does a magnitude comparator do?

It compares two binary numbers and gives three outputs: A greater than B, A equal to B and A less than B. Equality is checked with XNOR gates on each bit pair. The 7485 is a 4-bit magnitude comparator that can be cascaded for longer numbers.

What is a seven-segment display, and what does the 7447 do?

A seven-segment display has seven LED segments, a to g, to show digits 0 to 9. The 7447 is a BCD to seven-segment decoder-driver with active-low outputs, used with a common-anode display. For a common-cathode display a decoder with active-high outputs, such as the 7448, is used.

Latches, flip-flops, registers and counters

What is the difference between a latch and a flip-flop?

A latch is level-sensitive: its output follows the inputs while the enable is active. A flip-flop is edge-triggered: it changes state only at the rising or falling edge of the clock. Flip-flops are preferred in synchronous circuits because their timing is precise.

What is the invalid state of an SR latch?

For an SR latch made of NOR gates, S equals 1 and R equals 1 forces both outputs to 0, so Q and Q-bar are no longer complements, and when both inputs return to 0 the next state is unpredictable. For a NAND latch, the forbidden input is both inputs at 0.

How does a JK flip-flop remove the invalid state?

In a JK flip-flop, J equals 1 and K equals 1 makes the output toggle instead of being invalid. The other inputs behave like SR: 0 0 holds, 1 0 sets and 0 1 resets. Its characteristic equation is Q next equals J Q-bar plus K-bar Q.

What is the race-around condition?

In a level-triggered JK flip-flop with J and K both 1, if the clock pulse stays high longer than the propagation delay, the output toggles repeatedly within one pulse and the final state is uncertain. It is removed by a master-slave arrangement or by edge triggering.

How does a master-slave flip-flop work?

It has two latches in series. The master accepts the inputs while the clock is high; the slave, driven by the inverted clock, copies the master when the clock goes low. So the output changes only once per clock cycle, which removes race-around.

What is a D flip-flop, and where is it used?

A D flip-flop has one data input, and on the active clock edge Q takes the value of D, so Q next equals D. Since S and R can never both be 1, there is no invalid state. It is used in registers, data storage and delay elements; the 7474 has two of them.

What is a T flip-flop?

A toggle flip-flop holds its state when T is 0 and toggles when T is 1, so Q next equals T XOR Q. It is made by tying J and K of a JK flip-flop together. A T flip-flop with T tied high divides the clock frequency by two, which is the basis of counters.

What is the difference between a characteristic table and an excitation table?

A characteristic table gives the next state for given inputs and present state, and is used for analysis. An excitation table gives the inputs needed to move from a present state to a desired next state, and is used for designing counters and sequential circuits.

What are setup time and hold time?

Setup time is the minimum time the input must be stable before the clock edge; hold time is the minimum time it must stay stable after the edge. Violating them can make the flip-flop go metastable, with an unpredictable output for a while.

What are the types of shift registers?

By how data enters and leaves: serial-in serial-out, serial-in parallel-out, parallel-in serial-out and parallel-in parallel-out. A shift register of n flip-flops stores n bits. Shifting left multiplies an unsigned number by two and shifting right divides it by two.

What is the difference between asynchronous and synchronous counters?

In an asynchronous or ripple counter, only the first flip-flop gets the clock and each next one is clocked by the previous output, so delays add up and glitches appear. In a synchronous counter all flip-flops share the same clock, so they change together and the counter is faster.

How many flip-flops are needed for a mod-N counter?

The smallest n such that 2 to the power n is at least N. A mod-10 counter needs four flip-flops, since three give only eight states. The unused states are skipped by resetting the counter when it reaches N, or by design using the excitation table.

How do you make a mod-6 counter?

With a 3-bit ripple counter, I detect the count 110, that is 6, with a NAND gate on the Q-B and Q-C outputs and feed it to the clear inputs, so the counter resets to 000 and counts 0 to 5. The same idea works with the reset pins of a 7490 or 7493.

What is the 7490?

The 7490 is a decade counter containing a divide-by-2 section and a divide-by-5 section. Connecting the Q-A output to the input B clock gives a BCD counter from 0 to 9. It has reset-to-0 and set-to-9 inputs, which are used to build other mod counters.

What is a ring counter and a Johnson counter?

A ring counter is a shift register whose last output feeds the first input, circulating a single 1; with n flip-flops it has n states. A Johnson or twisted-ring counter feeds back the complement of the last output and has 2n states with n flip-flops.

What is the difference between Moore and Mealy machines?

In a Moore machine the outputs depend only on the present state. In a Mealy machine they depend on the present state and the present inputs, so a Mealy machine often needs fewer states but its outputs can change between clock edges.

Lab ICs, logic families, converters and memory

ICFunctionViva hook
7400Quad 2-input NANDUniversal gate; build NOT, AND, OR from it
7402Quad 2-input NORUniversal gate; its pinout differs from 7400
7404Hex inverterSix NOT gates in one chip
7408Quad 2-input ANDCarry of a half adder
7432Quad 2-input ORCarry-out of a full adder from two half adders
7486Quad 2-input XORSum of an adder, parity, Gray code
74834-bit binary full adderBCD adder with correction logic
741518-to-1 multiplexerImplement a 3-variable function
741383-to-8 decoder-demultiplexerActive-low outputs, three enable inputs
7474Dual D flip-flop, positive edgePreset and clear inputs
7476Dual JK flip-flopToggle mode, preset and clear
7490Decade counterDivide-by-2 plus divide-by-5

Which pins are Vcc and ground for a 7400?

For the 14-pin gate ICs like the 7400, 7408 and 7486, pin 14 is Vcc at plus 5 volts and pin 7 is ground. Not every IC follows this: the 7490 and 7476 have their supply on different pins, so I always check the datasheet before wiring.

How do you test whether a gate IC is working?

I place it on the breadboard across the centre gap, connect Vcc and ground, apply all input combinations from logic switches to each gate and check the output on LEDs against the truth table. A digital IC tester on the trainer kit does the same automatically.

What happens if a TTL input is left floating?

An open TTL input usually behaves as logic 1, because of the internal circuit of the input transistor, but it picks up noise and is unreliable. Unused inputs should be tied to Vcc through a resistor or to ground, as the function needs. Floating CMOS inputs are worse and can oscillate.

What is the difference between TTL and CMOS?

TTL uses bipolar transistors, runs on 5 volts and is fairly fast but uses more power. CMOS uses complementary MOSFETs, draws almost no static power, works over a wider supply range and has a better noise margin, but is sensitive to static discharge. Modern chips are mostly CMOS.

What are the TTL logic levels and noise margin?

For standard TTL, an input below 0.8 volts is low and above 2.0 volts is high; an output gives at most 0.4 volts for low and at least 2.4 volts for high. The noise margin is the difference, 0.4 volts in both states.

What are fan-in, fan-out and propagation delay?

Fan-in is the number of inputs a gate has. Fan-out is the number of standard gate inputs one output can drive while keeping valid logic levels, 10 for standard TTL. Propagation delay is the time between an input change and the resulting output change, in nanoseconds.

What is a tri-state buffer?

A buffer with three output states: logic 0, logic 1 and high impedance, where the output is effectively disconnected. An enable input controls it. It lets several devices share one bus, with only the enabled device driving it at a time.

What is the difference between an ADC and a DAC?

An analog-to-digital converter turns a continuous voltage into a binary number; a digital-to-analog converter does the reverse. Resolution depends on the number of bits: an 8-bit converter has 256 levels. Common types are the R-2R ladder DAC and the successive approximation ADC.

Which ADC is the fastest?

The flash or parallel ADC is fastest because it compares the input with all reference levels at once using a bank of comparators, but an n-bit flash ADC needs 2 to the power n minus 1 comparators, so it is costly. Successive approximation balances speed and cost.

What is the difference between SRAM and DRAM?

SRAM stores each bit in a flip-flop, so it keeps data without refresh while powered and is fast, but takes more area; it is used for cache. DRAM stores each bit as charge on a capacitor, which leaks, so it must be refreshed periodically; it is denser and used for main memory.

What are PROM, EPROM and EEPROM?

All are non-volatile read-only memories. A PROM can be programmed once. An EPROM is erased by exposing the chip to ultraviolet light through its window and then reprogrammed. An EEPROM is erased electrically, byte by byte, without removing it from the circuit; flash memory is a block-erased form of it.

Common mistakes in a digital electronics viva

  • Not knowing the number of the IC on your own breadboard. Read it before the examiner arrives.
  • Saying a latch and a flip-flop are the same. The answer the examiner wants is level-triggered versus edge-triggered.
  • Writing the full adder carry as A AND B. That is the half adder; the full adder carry also involves the carry-in.
  • Calling Gray code a weighted code, or BCD 1010 a valid digit.
  • Saying a mod-10 counter needs ten flip-flops. It needs four.
  • Forgetting the active-low outputs of the 74138 and 7447 and then being puzzled when the LED logic looks inverted.
  • Leaving unused inputs floating and blaming the IC when the output flickers.

What the ExamPilot AI examiner checks when you practise

In an ECE/EE lab viva session on ExamPilot you tell the AI examiner which experiment you built, say a full adder with half adders or a mod-6 counter, and it questions you by voice for about ten minutes. It asks for the IC numbers and expressions, a what-if on an input or the clock, a comparison and one design question, and it follows up whenever an answer is vague. You can answer in English or Hindi.

  • Exact expressions said aloud: sum, carry, borrow and characteristic equations.
  • IC knowledge: the number, function and supply pins of the chips you used.
  • What-if reasoning: a floating input, J and K both 1, a missing reset connection.
  • Clear comparisons with the deciding difference stated first.
  • Brevity and honesty: two or three sentences, and a clean 'I am not sure' rather than a guess.
  • Fluency and pace, since a clear explanation is part of the viva mark.

Start with the ECE and EE lab viva mock. You get a transcript, the questions you fumbled and a tighter version of each answer to say again.

The night before the DE lab exam

  1. 1

    Redraw every circuit from your record

    For each one, write the IC numbers, the pins you used and the truth table without looking. Those are the first questions.

  2. 2

    Say the expressions aloud

    Half and full adder, half subtractor, De Morgan's theorems, and the characteristic equations of JK, D and T flip-flops.

  3. 3

    Solve one K-map and one counter design

    A four-variable K-map with don't-cares, and a mod-N counter with the reset logic. Explain each step as you would to the examiner.

  4. 4

    Run one mock viva

    Ten minutes with the AI examiner on your experiment shows which answers come out cleanly and which ones you only recognise on paper.

For the other labs in the same year, see C programming viva questions, operating system viva questions and computer network viva questions. For how every lab viva works, read the engineering viva questions hub.

Frequently asked questions

What are the most important digital electronics viva questions?
Universal gates and why NAND and NOR are universal, De Morgan's theorems, K-map grouping rules and don't-cares, half and full adder expressions, multiplexer versus demultiplexer, decoder versus encoder, latch versus flip-flop, the race-around condition, JK, D and T flip-flops, synchronous versus asynchronous counters, and TTL versus CMOS. Before these, expect questions on the circuit and ICs of your own experiment.
Do examiners ask IC numbers and pin diagrams?
Very often. The usual questions are the number and function of the IC you used, which pins are Vcc and ground, and how many gates are inside. Learn the IC table on this page and the pin diagram of every chip in your record. Saying 'pin 14 is Vcc, pin 7 is ground for the 7400' in one breath makes a good first impression.
Is the digital electronics viva the same for CSE and ECE students?
The core is the same: codes, gates, K-maps, combinational circuits, flip-flops and counters. ECE and EEE examiners go further into logic families, noise margin, ADCs and DACs and timing, while CSE examiners lean towards number systems, Boolean simplification and the link to computer organisation. Both ask about the circuit you built.
How long should a viva answer be?
Two or three sentences, about twenty to thirty seconds. Give the definition or the expression, then one fact from your own circuit, then stop. For a design question, talk through the steps. If the examiner wants more, they ask a follow-up, and handling that follow-up well is where full viva marks come from.
How can I practise digital electronics viva questions out loud?
Reading an expression is easy; saying it under questioning is not. On ExamPilot you can run an ECE/EE lab viva by voice: name your experiment, and the AI examiner asks about your ICs, expressions and what-ifs, follows up like an external examiner and gives a transcript with the answers to tighten. It is free to start, in English or Hindi.

Practise out loud

Practise your DE lab viva out loud

The AI examiner asks about the circuit you built, the ICs and expressions, tests a what-if on inputs or the clock, and scores correctness, clarity and brevity.

Engineering Viva · ECE / EE lab viva

Read how this interview works

Official sources