Home / Courses / CSIR NET Physics / Practice / Logic gates and Boolean algebra

Logic gates and Boolean algebra

Electronics · 13 questions and templates for CSIR NET Physics, in order from warm-up to top rank. Check each answer, then read the full solution.

Loading questions… (they need JavaScript; nothing you type is sent anywhere)

Written questions with solutions

The same questions as a list, so you can print them or read without the practice box. Templates (fresh numbers) appear only in the practice box above.

  1. MCQWarm-up

    The smallest number of bits that can represent every whole number from 0 to 100 in plain binary is
    1. 6
    2. 7
    3. 8
    4. 10
    Answer and solution

    Answer: B

    n bits cover 0 to 2n−1. 26−1=63 is too small; 27−1=127≥100. So 7 bits (100=11001002).

    Why people get this wrong: Choosing 8 because data usually comes in whole bytes: 7 bits already reach 127.

  2. NATStandard

    A memory chip stores 4 KB, organised as one byte per address (1 KB =1024 bytes). The number of address lines it needs is ______.
    Answer and solution

    Answer: 12

    4 KB =4×1024=4096=212 addresses, and n address lines select 2n locations. So 12 lines. The 8 data lines carry the byte itself and are not part of the count.

    Why people get this wrong: Counting bits (4096×8=215, giving 15) instead of addressable words.

  3. MCQStandard

    In excess-3 code, the decimal digit 5 is written as
    1. 0101
    2. 0010
    3. 0111
    4. 1000
    Answer and solution

    Answer: D

    Excess-3 adds 3 to each decimal digit and writes the result in 4-bit binary: 5+3=8=1000. The code is self-complementing: the 9's complement of a digit is obtained by inverting its bits (4→0111, 5→1000).

    Why people get this wrong: 0101 is plain BCD; 0010 subtracts 3 instead of adding.

  4. NATExam level

    A synchronous counter uses flip-flops with clock-to-output delay 10 ns and setup time 5 ns; the logic that forms each flip-flop's next input adds at most 5 ns. The highest clock frequency at which it works reliably is ______ MHz.
    Answer and solution

    Answer: 50 MHz

    In one clock period the outputs must change (10 ns), ripple through the next-state logic (5 ns) and be stable at the next flip-flop inputs for the setup time (5 ns). Tmin⁡=20 ns, so fmax⁡=1/20 ns=50 MHz. Unlike a ripple counter, this does not grow with the number of bits (as long as the logic delay does not).

    Why people get this wrong: Leaving out the setup time (66.7 MHz) or multiplying by the number of flip-flops as in a ripple counter.

  5. MSQExam level

    Which statements are correct?
    1. A shift register is a sequential circuit.
    2. A multiplexer needs a clock to choose which input to pass.
    3. A latch is level-sensitive, while an edge-triggered flip-flop responds only at a clock edge.
    4. A ROM used as a look-up table is a combinational circuit: its output depends only on the present address.
    Answer and solution

    Answer: A, C, D

    A circuit is sequential if its output depends on past inputs (it has memory). A ROM read is a fixed function of the address: combinational. A shift register stores bits in flip-flops: sequential. A multiplexer is pure gating, with select lines and no clock. A latch is transparent while its enable is active; a flip-flop samples only at an edge.

    Why people get this wrong: A ROM "stores" data, but reading it involves no state that changes with time, so it counts as combinational.

  6. MCQExam level

    A 16-bit ripple-carry adder is built from full adders, each taking 2 ns from carry-in to carry-out. The worst-case time for the carry to settle is about
    1. 32 ns
    2. 2 ns
    3. 8 ns
    4. 64 ns
    Answer and solution

    Answer: A

    In the worst case (e.g. adding 1 to 0111…1) a carry made in the lowest stage must pass through all 16 stages in turn: 16×2=32 ns. Carry-lookahead adders compute the carries in parallel, so their delay grows only as log⁡n; 8 ns is the kind of figure such a design would give.

    Why people get this wrong: Assuming all full adders work at once (2 ns): each one has to wait for the carry from below.

  7. NATHard

    A linear-feedback shift register made of 5 flip-flops, with XOR feedback chosen for the longest possible sequence, steps through ______ different states before repeating.
    Answer and solution

    Answer: 31

    Five bits have 25=32 states. With XOR feedback the all-zeros state maps to itself, so it can never be part of the main cycle. A maximal-length (primitive-polynomial) LFSR visits all the others: 25−1=31 states. Such registers make pseudo-random bit sequences and CRC checks.

    Why people get this wrong: Answering 32: the all-zero state is a lock-up state, not part of the cycle.

  8. MCQHard

    The circuit Y=AB+A‾C, built as two AND gates into an OR gate, can glitch (a brief 0) when B=C=1 and A changes. The extra product term that removes this static hazard is
    1. AC
    2. A‾B
    3. BC
    4. ABC‾
    Answer and solution

    Answer: C

    With B=C=1, Y=A+A‾=1, but as A changes one AND gate turns off before the other turns on (the inverter adds delay), so Y can dip. The consensus term BC equals 1 throughout that change and holds the output high. Logically AB+A‾C+BC=AB+A‾C (consensus theorem), so the function is unchanged; only the timing improves.

    Why people get this wrong: Minimising the expression removes exactly the redundant term that prevents the glitch.

  9. MSQHard

    Which of these sets of operations are functionally complete (able to build every Boolean function)?
    1. {NAND}
    2. {AND,OR}
    3. {AND,NOT}
    4. {XOR,AND,the constant 1}
    Answer and solution

    Answer: A, C, D

    NAND alone gives NOT (AA) and AND (NAND then NOT), and hence OR by De Morgan. AND with NOT gives OR as A‾B‾. XOR with the constant 1 gives NOT (A⊕︎1=A‾), and with AND that is complete. AND and OR alone can only build functions that never fall when an input rises (monotone functions); they can never make NOT.

    Why people get this wrong: Thinking AND and OR are enough because sums of products use them: the complements of the variables are needed as well.

  10. NATTop rank

    A Boolean function of A, B, C is called symmetric if swapping any two inputs never changes it (so it depends only on how many inputs are 1). The number of different symmetric functions of three variables is ______.
    Answer and solution

    Answer: 16

    A symmetric function is fixed by its value for each possible count of 1s: 0,1,2 or 3. That is 4 independent choices of 0 or 1, giving 24=16 functions (among them the constants, AND, OR, majority and XOR of all three). In general there are 2n+1 symmetric functions of n variables, against 22n=256 functions of three variables in all.

    Why people get this wrong: Counting 223=256 (all functions) or 23=8 (input rows).

← All topics · Timed mock test →