Combinational blocks (adders, multiplexers, decoders, encoders) and sequential circuits (latches, flip-flops, registers, counters, state machines), with the MUX counts, counter states and clock-rate numericals GATE asks.
A combinational circuit has outputs that depend only on the present inputs; it has no memory.
Half adder: , .
Full adder: , . Two half adders and an OR gate make one full adder.
Ripple-carry adder: full adders in a chain. The carry must pass through every stage, so the worst-case delay grows as times the carry delay of one stage.
Carry-lookahead adder: uses generate and propagate with . Expanding this gives every carry in two gate levels, at the cost of wide gates.
Comparator: two bits are equal when (XNOR); an -bit equality check ANDs the XNOR outputs.
A subtractor is an adder that adds the 2's complement: invert and set .
2. Multiplexers, decoders and encoders
Block
Inputs → outputs
What it does
multiplexer
data + select → 1
Routes the selected input to the output
-to- decoder
→
Exactly one output is 1: the minterm of the input
-to- encoder
→
Gives the index of the one active input
Priority encoder
→ (+ valid bit)
Gives the index of the highest-priority active input
Demultiplexer
1 + select →
Sends the input to the selected output
Implementing functions. A MUX implements any function of variables: put the function's truth-table values on the data inputs. A MUX also works: use variables as selects and feed each data input with , , or , where is the leftover variable.
A decoder with an OR gate implements any function: OR together the decoder outputs for its minterms.
Building bigger blocks. A tree of MUXes for a MUX needs of them. Decoders with an enable input expand in the same way: one decoder on the high bits enables one of several decoders on the low bits.
4:1 MUX with selects A, B implementing F = Σm(1, 2, 4, 7), the odd-parity function
3. Latches and flip-flops
A sequential circuit has memory: its outputs depend on the inputs and the stored state. A latch is level-sensitive (transparent while enabled); a flip-flop is edge-triggered (samples only at a clock edge).
Flip-flop
Characteristic equation
Behaviour
SR
, with
is not allowed
D
Copies D at the edge
JK
toggles
T
toggles, holds
The excitation table is the reverse view: for a wanted change , what inputs are needed. For JK: needs ; needs ; needs ; needs . The don't-cares make JK designs small.
Race-around: a level-triggered JK with toggles again and again while the clock stays high. Edge triggering or a master-slave design fixes it.
A NOR-based SR latch has as the forbidden input (both outputs go to 0); a NAND-based latch with active-low inputs has as the forbidden input.
4. Registers and counters
A register is a row of flip-flops sharing a clock. A shift register passes each bit to its neighbour on every clock (SISO, SIPO, PISO, PIPO by input and output style).
Counters. With flip-flops there are at most states, so a mod- counter needs flip-flops.
Asynchronous (ripple) counter: each flip-flop is clocked by the previous one's output. Simple, but the delays add: the last bit settles after , so the clock period must be at least .
Synchronous counter: all flip-flops share one clock; the next state comes from combinational logic. The period needs only one flip-flop delay plus the logic delay.
Ring counter: -bit shift register with fed back to the first input; states (one hot).
Johnson (twisted-ring) counter: feed back ; states. A 4-bit Johnson counter cycles 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001.
States outside the main cycle are unused states. A good design makes sure every unused state leads back into the cycle (self-starting).
5. Designing sequential circuits and timing
Design steps: (1) draw the state diagram; (2) write the state table; (3) assign binary codes to states; (4) use the flip-flop excitation table to get each input as a function of present state and inputs; (5) minimise with K-maps.
Mealy vs Moore. In a Moore machine the output depends only on the state; in a Mealy machine it depends on the state and the input. A Mealy machine usually needs fewer states and responds in the same clock cycle; a Moore output is delayed by one clock but is glitch-free.
For an overlapping sequence detector of a pattern of length , the minimal Mealy machine has states ("matched 0, 1, …, symbols") and the Moore machine has (an extra state that outputs 1). Overlap only changes where transitions go, not the count.
Timing. For a synchronous circuit, a signal leaves one flip-flop, passes through logic and must reach the next flip-flop a setup time before the next edge:
The hold time rule is separate: the data must not change for after the edge.
Formulas to remember
Full adder sum
Full adder carry
Carry lookahead
JK flip-flop
T flip-flop
Flip-flops for a mod-N counter
2:1 MUXes in a 2^n:1 MUXA full binary tree of MUXes
Ring and Johnson counter states flip-flops
Maximum clock frequency
Common mistakes
Counting instead of two-input MUXes for a MUX tree.
Mixing up the characteristic table (inputs → next state) with the excitation table (wanted change → inputs).
Giving a ring counter states or a Johnson counter states; it is the other way round.
Forgetting that a ripple counter's settling time grows with the number of bits while a synchronous counter's does not.
Adding one extra state to a Mealy sequence detector; only the Moore machine needs the output state.
Leaving out the setup time (or the clock-to-Q delay) when finding the minimum clock period.
Worked examples
Try each step yourself, then reveal the working.
Example 1: A 3-variable function on a 4:1 MUX
numerical
Implement using one multiplexer with and on the select lines ( is the higher bit). What goes on each data input?
Step 1: Group the minterms by the select value AB.
Try it on paper first.
Example 2: Analysing a synchronous counter
numerical
Two D flip-flops share a clock with and . Starting from , list the states. How many distinct states does it cycle through, and what code is it?
Step 1: Apply the equations to 00.
Try it on paper first.
Example 3: Maximum clock frequency: synchronous vs ripple
numerical
Flip-flops have a clock-to-Q delay of 10 ns and a setup time of 5 ns. (a) A synchronous circuit has 25 ns of logic between flip-flops. (b) A 4-bit ripple counter uses the same flip-flops, and all four outputs must settle before the next clock edge. Find the maximum clock frequency in each case.
Step 1: Write the minimum period for the synchronous circuit.
Try it on paper first.
Example 4: States in a sequence detector
conceptual
A circuit reads one bit per clock and outputs 1 whenever the last four bits are 1011 (overlapping allowed). How many states do the minimal Mealy and Moore machines need?
Step 1: List what the machine must remember.
Try it on paper first.
Previous year questions
21 official GATE CSE questions on this topic, newest first.
10 questions: up to 4 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.
Mark as mastered
Loading your progress…
My revision notes
Notes written by the GATEiit team against the official GATE CSE syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.