Computer Organization & Architecture

Unit 1: Basics of Digital Systems

From logic gates to flip-flops โ€” master combinational and sequential circuits that form the foundation of every computer ever built.

โฑ๏ธ 5 hrs theory + 3 hrs lab  |  ๐ŸŽฏ GATE ~3 marks  |  ๐Ÿ’ฐ โ‚น6โ€“12 LPA  |  ๐Ÿ–ฅ๏ธ ISRO PSLV

๐Ÿ’ผ Jobs this unlocks: VLSI Design Engineer (โ‚น6โ€“12 LPA)  |  Embedded Systems Developer (โ‚น5โ€“10 LPA)  |  GATE/ISRO/DRDO PSU roles

Section A

Opening Hook โ€” The Digital Brain Behind ISRO's PSLV

๐Ÿš€ PSLV-C58: How Digital Circuits Put India in Orbit

On January 1, 2024, ISRO's PSLV-C58 thundered into the sky carrying the XPoSat satellite. Inside the rocket's flight computer, thousands of digital circuits executed flawlessly at 100 MHz โ€” making life-or-death decisions every 10 nanoseconds.

Combinational circuits computed real-time thrust vector calculations for stage separation โ€” pure logic, no memory, instantaneous output. When the first stage burned out at T+113 seconds, a combinational decoder triggered the pyrotechnic bolts that separated the booster. One wrong gate? The rocket tumbles into the Bay of Bengal.

Sequential circuits tracked the rocket's state โ€” "Are we in Stage 1? Stage 2? Coasting? Payload separation?" โ€” using flip-flops that remember the current state and transition only on clock edges. The flight computer's state machine cycled through 47 distinct states from launch to orbit insertion.

What if YOU understood these circuits? What if you could design the logic that decides when a 320-tonne rocket drops its booster? That's exactly what this unit teaches you โ€” the same fundamentals used by ISRO, Intel, and Qualcomm engineers.

๐Ÿ‡ฎ๐Ÿ‡ณ ISRO๐Ÿ‡ฎ๐Ÿ‡ณ DRDO๐Ÿ‡ฎ๐Ÿ‡ณ BHELIntel IndiaQualcomm HyderabadTexas Instruments Bangalore
Every smartphone you use has over 15 billion transistors โ€” all organized into combinational and sequential circuits. Apple's M2 chip has 20 billion transistors, each a tiny switch doing exactly what you'll learn in this chapter: AND, OR, NOT, flip, flop. The principles are the same whether it's a โ‚น500 calculator or a โ‚น5 crore satellite computer.
Section B

Learning Outcomes โ€” Bloom's Taxonomy Mapped (12 Outcomes)

Bloom's LevelLearning Outcome
๐Ÿ”ต RememberLO1: List the five functional units of a computer and identify the role of each unit
๐Ÿ”ต RememberLO2: State the truth tables for all basic gates (AND, OR, NOT, NAND, NOR, XOR, XNOR) and standard combinational circuits
๐ŸŸข UnderstandLO3: Explain the difference between combinational and sequential circuits with real-world analogies
๐ŸŸข UnderstandLO4: Describe the operation of SR, D, JK, and T flip-flops using characteristic equations and timing diagrams
๐ŸŸก ApplyLO5: Design a Half Adder and Full Adder from truth tables and draw their gate-level circuits
๐ŸŸก ApplyLO6: Construct a 4-bit Ripple Carry Adder by cascading Full Adders and trace binary addition through it
๐ŸŸ  AnalyzeLO7: Compare SR, D, JK, and T flip-flops on parameters like race condition, toggling, and input constraints
๐ŸŸ  AnalyzeLO8: Analyze the propagation delay issue in Ripple Carry Adders and contrast with Carry Look-Ahead Adders
๐Ÿ”ด EvaluateLO9: Evaluate which flip-flop type is most suitable for a given application (counter, register, frequency divider)
๐Ÿ”ด EvaluateLO10: Justify the use of MUX as a universal logic element and assess trade-offs vs discrete gates
๐ŸŸฃ CreateLO11: Design a 3-bit synchronous counter using JK flip-flops with complete state table and circuit diagram
๐ŸŸฃ CreateLO12: Build a Python simulator that generates truth tables for any n-input combinational circuit
Section C

Concept Explanation โ€” Digital Systems from Scratch

1. The 5-Unit Computer Model

Every computer โ€” from a โ‚น500 Arduino to a โ‚น5 crore supercomputer โ€” has exactly five functional units. Think of them as five departments in a factory, each with a specific job, connected by highways called buses.

๐Ÿ–ฅ๏ธ The Five Functional Units of a Computer

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚                      COMPUTER SYSTEM                        โ”‚
  โ”‚                                                             โ”‚
  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
  โ”‚  โ”‚           โ”‚    Data/Address Bus       โ”‚               โ”‚   โ”‚
  โ”‚  โ”‚   INPUT   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚    MEMORY     โ”‚   โ”‚
  โ”‚  โ”‚   UNIT    โ”‚                          โ”‚  (RAM / ROM)  โ”‚   โ”‚
  โ”‚  โ”‚           โ”‚                          โ”‚               โ”‚   โ”‚
  โ”‚  โ”‚ Keyboard  โ”‚                          โ”‚  Stores Data  โ”‚   โ”‚
  โ”‚  โ”‚ Mouse     โ”‚                          โ”‚  & Programs   โ”‚   โ”‚
  โ”‚  โ”‚ Scanner   โ”‚                          โ”‚               โ”‚   โ”‚
  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
  โ”‚        โ”‚                                        โ”‚           โ”‚
  โ”‚        โ”‚          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚           โ”‚
  โ”‚        โ”‚          โ”‚  CONTROL UNIT โ”‚              โ”‚           โ”‚
  โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚     (CU)      โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚
  โ”‚                   โ”‚               โ”‚                         โ”‚
  โ”‚                   โ”‚ Fetches &     โ”‚      Control Bus         โ”‚
  โ”‚                   โ”‚ Decodes       โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
  โ”‚                   โ”‚ Instructions  โ”‚                    โ”‚    โ”‚
  โ”‚                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚    โ”‚
  โ”‚                           โ”‚                            โ”‚    โ”‚
  โ”‚                           โ”‚ Control Signals            โ”‚    โ”‚
  โ”‚                           โ–ผ                            โ”‚    โ”‚
  โ”‚                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”โ”‚
  โ”‚                   โ”‚     ALU       โ”‚              โ”‚  OUTPUT  โ”‚โ”‚
  โ”‚                   โ”‚ (Arithmetic   โ”‚             โ”‚  UNIT    โ”‚โ”‚
  โ”‚                   โ”‚  Logic Unit)  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚         โ”‚โ”‚
  โ”‚                   โ”‚               โ”‚              โ”‚ Monitor  โ”‚โ”‚
  โ”‚                   โ”‚ +, -, ร—, รท    โ”‚              โ”‚ Printer  โ”‚โ”‚
  โ”‚                   โ”‚ AND, OR, NOT  โ”‚              โ”‚ Speaker  โ”‚โ”‚
  โ”‚                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
  โ”‚                                                             โ”‚
  โ”‚  โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•     โ”‚
  โ”‚   Three Buses: Data Bus, Address Bus, Control Bus           โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Input Unit

Accepts data and instructions from the outside world. Examples: keyboard, mouse, scanner, microphone, touchscreen. In ISRO's PSLV, sensors (accelerometers, gyroscopes) act as input devices feeding flight data.

Memory Unit

Stores data and instructions. Primary memory (RAM โ€” volatile, fast) holds currently executing programs. Secondary memory (HDD/SSD โ€” non-volatile, slower) stores permanent data. ROM holds firmware/BIOS.

Arithmetic Logic Unit (ALU)

The calculator of the computer. Performs arithmetic operations (+, โˆ’, ร—, รท) and logical operations (AND, OR, NOT, XOR). Every computation ultimately happens here.

Control Unit (CU)

The brain's manager. Fetches instructions from memory, decodes them, and sends control signals to other units. It coordinates everything โ€” like a traffic police officer at a busy crossing.

Output Unit

Presents processed results to the user. Examples: monitor, printer, speaker, LED display. In PSLV, the output includes telemetry signals sent to the ground station.

System Buses

Data Bus: Carries actual data between units (bidirectional). Address Bus: Carries memory addresses (unidirectional โ€” CPU to memory). Control Bus: Carries control signals like read/write, clock, interrupt.

India's PARAM Siddhi supercomputer (63rd in TOP500, 2023) at C-DAC Pune has the same 5-unit architecture โ€” just scaled massively. It has thousands of ALUs (GPU cores), terabytes of memory, and high-speed interconnects as buses. The fundamental structure you just learned applies at every scale.

2. Combinational Circuits โ€” No Memory, Pure Logic

Definition: A combinational circuit's output depends only on its current inputs. It has no memory, no feedback, no clock. Change the input โ†’ output changes instantly (after gate delay).

Analogy โ€” The Vending Machine: A combinational circuit is like a vending machine. You press โ‚น20 button + "Cold Coffee" โ†’ out comes cold coffee. The machine doesn't remember what you bought yesterday. Same input always produces same output. No history, no state.

2.1 Half Adder

The simplest arithmetic circuit. Adds two single bits (A and B) and produces a Sum (S) and a Carry (C).

  HALF ADDER โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  A  โ”‚  B  โ”‚ Sum  โ”‚ Carry โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚  0   โ”‚   0   โ”‚
  โ”‚  0  โ”‚  1  โ”‚  1   โ”‚   0   โ”‚
  โ”‚  1  โ”‚  0  โ”‚  1   โ”‚   0   โ”‚
  โ”‚  1  โ”‚  1  โ”‚  0   โ”‚   1   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Equations:  Sum = A โŠ• B  (XOR)
              Carry = A ยท B  (AND)
  HALF ADDER โ€” Gate Diagram
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   A โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚         โ”‚
              โ”‚   XOR   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ–บ Sum (S)
   B โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ–บโ”‚         โ”‚
         โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   A โ”€โ”€โ”€โ–บโ”‚โ”€โ”€โ”€โ–บโ”‚         โ”‚
              โ”‚   AND   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ–บ Carry (C)
   B โ”€โ”€โ”€โ–บโ”‚โ”€โ”€โ”€โ–บโ”‚         โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

2.2 Full Adder

Adds three single bits: A, B, and a Carry-In (Cin) from the previous stage. Produces Sum and Carry-Out (Cout). This is the building block for multi-bit adders.

  FULL ADDER โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  A  โ”‚  B  โ”‚ Cin  โ”‚ Sum  โ”‚ Cout โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  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   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Equations:  Sum  = A โŠ• B โŠ• Cin
              Cout = (A ยท B) + (Cin ยท (A โŠ• B))
  FULL ADDER โ€” Gate Diagram (using 2 Half Adders + OR)

   A โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚  HALF    โ”‚โ”€โ”€โ”€โ”€ S1 โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   B โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  ADDER 1 โ”‚             โ”‚  HALF    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Sum
            โ”‚          โ”‚โ”€โ”€โ”€โ”€ C1      โ”‚  ADDER 2 โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚ Cinโ”€โ–บโ”‚          โ”‚โ”€โ”€C2โ”€โ”
                              โ”‚      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
                              โ”‚                       โ”‚
                              โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”‚
                              โ””โ”€โ”€โ”€โ–บโ”‚      โ”‚           โ”‚
                                   โ”‚  OR  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บCout
                              โ”Œโ”€โ”€โ”€โ–บโ”‚      โ”‚
                              โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              C2

2.3 4:1 Multiplexer (MUX)

A MUX selects one of several input lines and forwards it to a single output. Think of it as a railway track switch โ€” 4 tracks converge into 1, and the switchman (select lines) decides which train passes.

  4:1 MUX โ€” Block Diagram

   I0 โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   I1 โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚               โ”‚
   I2 โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   4:1 MUX     โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ–บ Y (Output)
   I3 โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚               โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
               S1 โ”€โ”€โ”€โ”€โ”˜โ”€โ”€โ”€โ”€ S0
            (Select Lines)

  Truth Table:
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ S1  โ”‚ S0  โ”‚ Output โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚   I0   โ”‚
  โ”‚  0  โ”‚  1  โ”‚   I1   โ”‚
  โ”‚  1  โ”‚  0  โ”‚   I2   โ”‚
  โ”‚  1  โ”‚  1  โ”‚   I3   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Equation: Y = S1'ยทS0'ยทI0 + S1'ยทS0ยทI1 + S1ยทS0'ยทI2 + S1ยทS0ยทI3
GATE Favourite: A 2โฟ:1 MUX can implement ANY n-variable Boolean function. This makes MUX a universal logic element. To implement f(A,B) using a 4:1 MUX, connect A and B to select lines, then connect the function's output column values to I0, I1, I2, I3. This trick saves you in GATE 2-mark questions.

2.4 Decoder (2:4)

A decoder takes an n-bit binary input and activates exactly one of 2โฟ output lines. Think of it as a hotel keycard system โ€” your room number (binary input) opens exactly one door (output).

  2:4 DECODER โ€” Block Diagram & Truth Table

   A โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”€โ”€โ”€โ”€โ”€โ”€โ–บ D0 = A'ยทB'
   B โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  2:4 DECODER  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–บ D1 = A'ยทB
             โ”‚               โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–บ D2 = AยทB'
             โ”‚               โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–บ D3 = AยทB
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Truth Table:
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  A  โ”‚  B  โ”‚ D0  โ”‚ D1  โ”‚ D2  โ”‚ D3  โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚  1  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚
  โ”‚  0  โ”‚  1  โ”‚  0  โ”‚  1  โ”‚  0  โ”‚  0  โ”‚
  โ”‚  1  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  1  โ”‚  0  โ”‚
  โ”‚  1  โ”‚  1  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  1  โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”˜

2.5 Encoder (4:2 Priority Encoder)

The reverse of a decoder. Takes 2โฟ input lines and produces an n-bit binary code. A priority encoder handles the case when multiple inputs are active โ€” it encodes the highest-priority one.

  4:2 PRIORITY ENCODER โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ I3  โ”‚ I2  โ”‚ I1  โ”‚ I0  โ”‚  A  โ”‚  B  โ”‚ Valid โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  X  โ”‚  X  โ”‚   0   โ”‚
  โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  1  โ”‚  0  โ”‚  0  โ”‚   1   โ”‚
  โ”‚  0  โ”‚  0  โ”‚  1  โ”‚  X  โ”‚  0  โ”‚  1  โ”‚   1   โ”‚
  โ”‚  0  โ”‚  1  โ”‚  X  โ”‚  X  โ”‚  1  โ”‚  0  โ”‚   1   โ”‚
  โ”‚  1  โ”‚  X  โ”‚  X  โ”‚  X  โ”‚  1  โ”‚  1  โ”‚   1   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  (X = Don't Care โ€” higher priority input overrides lower)

2.6 Ripple Carry Adder (4-bit)

Four Full Adders cascaded โ€” the carry-out of each stage "ripples" into the carry-in of the next. This adds two 4-bit binary numbers.

  4-BIT RIPPLE CARRY ADDER

   A3 B3        A2 B2        A1 B1        A0 B0
    โ”‚  โ”‚         โ”‚  โ”‚         โ”‚  โ”‚         โ”‚  โ”‚
    โ–ผ  โ–ผ         โ–ผ  โ–ผ         โ–ผ  โ–ผ         โ–ผ  โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚      โ”‚     โ”‚      โ”‚     โ”‚      โ”‚     โ”‚      โ”‚
  โ”‚  FA  โ”‚โ—„โ”€โ”€โ”€โ”€โ”‚  FA  โ”‚โ—„โ”€โ”€โ”€โ”€โ”‚  FA  โ”‚โ—„โ”€โ”€โ”€โ”€โ”‚  FA  โ”‚โ—„โ”€โ”€ C0 (0)
  โ”‚  3   โ”‚ C3  โ”‚  2   โ”‚ C2  โ”‚  1   โ”‚ C1  โ”‚  0   โ”‚
  โ”‚      โ”‚     โ”‚      โ”‚     โ”‚      โ”‚     โ”‚      โ”‚
  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
     โ”‚            โ”‚            โ”‚            โ”‚
  C4(Cout)       S3           S2           S1          S0

  Example: A = 0101 (5), B = 0011 (3), Cin = 0
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  FA0: A0=1, B0=1, Cin=0 โ†’ S0=0, C1=1
  FA1: A1=0, B1=1, Cin=1 โ†’ S1=0, C2=1
  FA2: A2=1, B2=0, Cin=1 โ†’ S2=0, C3=1
  FA3: A3=0, B3=0, Cin=1 โ†’ S3=1, C4=0
  Result: S = 1000 (8) โœ“  (5 + 3 = 8)
Students forget that carry ripples cause delay. In a 4-bit RCA, the worst-case delay is 4 ร— (gate delay per FA). For a 64-bit adder, this becomes unacceptably slow. That's why real processors use Carry Look-Ahead Adders (CLA) that compute all carries in parallel using generate (G) and propagate (P) signals.
The ALU inside your phone's processor doesn't use Ripple Carry Adders. Modern ARM processors (used in Qualcomm Snapdragon chips designed partly in Hyderabad) use Carry Look-Ahead and Carry-Select Adder hybrids that complete 64-bit addition in under 1 nanosecond.

3. Sequential Circuits โ€” Circuits with Memory

Definition: A sequential circuit's output depends on both current inputs AND past history (stored state). It has feedback loops and is typically controlled by a clock signal.

Analogy โ€” The ATM Machine: A sequential circuit is like an ATM. It remembers your state โ€” "Card inserted? PIN entered? Amount selected?" Each action moves it to the next state. The ATM's output (dispense cash, show error) depends on its current state AND your current input. It has memory โ€” it knows where you are in the process.
FeatureCombinational CircuitSequential Circuit
MemoryโŒ No memoryโœ… Has memory (flip-flops)
FeedbackโŒ No feedback pathโœ… Output fed back to input
ClockโŒ Not neededโœ… Clock-driven (synchronous)
Output depends onCurrent inputs onlyCurrent inputs + present state
ExamplesAdder, MUX, Decoder, EncoderFlip-flops, Counters, Registers
ISRO PSLV useThrust calculationsFlight state tracking

3.1 SR Flip-Flop (Set-Reset)

The most basic memory element. Has two inputs: S (Set) and R (Reset). Stores one bit of data.

  SR FLIP-FLOP โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  S  โ”‚  R  โ”‚  Q(t+1)โ”‚     Action           โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚  Q(t)  โ”‚  No change (Hold)    โ”‚
  โ”‚  0  โ”‚  1  โ”‚   0    โ”‚  Reset               โ”‚
  โ”‚  1  โ”‚  0  โ”‚   1    โ”‚  Set                 โ”‚
  โ”‚  1  โ”‚  1  โ”‚   ?    โ”‚  โš  INVALID (Race!)   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Characteristic Equation: Q(t+1) = S + R'ยทQ(t)
  Constraint: SยทR = 0  (S and R cannot both be 1)

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚         SR FLIP-FLOP               โ”‚
  โ”‚                                    โ”‚
  โ”‚  S โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”                   โ”‚
  โ”‚         โ”‚  NOR โ”œโ”€โ”€โ–บ Q              โ”‚
  โ”‚    โ”Œโ”€โ”€โ”€โ–บโ”‚      โ”‚     โ”‚             โ”‚
  โ”‚    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚             โ”‚
  โ”‚    โ”‚                 โ”‚(Feedback)   โ”‚
  โ”‚    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚             โ”‚
  โ”‚    โ””โ”€โ”€โ”€โ”€โ”ค  NOR โ”‚โ—„โ”€โ”€โ”€โ”€โ”˜             โ”‚
  โ”‚         โ”‚      โ”œโ”€โ”€โ–บ Q'             โ”‚
  โ”‚  R โ”€โ”€โ”€โ”€โ–บโ”‚      โ”‚                   โ”‚
  โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
S=1, R=1 is FORBIDDEN in an SR flip-flop. It forces both Q and Q' to 0, violating the rule Q' = complement of Q. When both S and R return to 0, the output is unpredictable (race condition). This is the fundamental limitation that led to the invention of JK and D flip-flops.

3.2 D Flip-Flop (Data/Delay)

Solves the SR flip-flop's invalid state problem by using a single data input. Whatever is on D at the clock edge gets stored. Think of it as a "copy-paste on clock tick" circuit.

  D FLIP-FLOP โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  D  โ”‚ Q(t+1) โ”‚     Action           โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚   0    โ”‚  Stores 0 (Reset)    โ”‚
  โ”‚  1  โ”‚   1    โ”‚  Stores 1 (Set)      โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Characteristic Equation: Q(t+1) = D
  (Output simply follows input at each clock edge)

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚      D FLIP-FLOP         โ”‚
  โ”‚                          โ”‚
  โ”‚  D โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”        โ”‚
  โ”‚           โ”‚     โ”‚โ”€โ”€โ–บ Q   โ”‚
  โ”‚  CLK โ”€โ”€โ”€โ”€โ–บโ”‚  D  โ”‚        โ”‚
  โ”‚           โ”‚  FF โ”‚โ”€โ”€โ–บ Q'  โ”‚
  โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

3.3 JK Flip-Flop (The Universal Flip-Flop)

The most versatile flip-flop. Fixes the SR flip-flop's invalid state โ€” when J=1, K=1, the output toggles (flips to opposite). Named after Jack Kilby, inventor of the integrated circuit.

  JK FLIP-FLOP โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  J  โ”‚  K  โ”‚ Q(t+1) โ”‚     Action           โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  0  โ”‚  Q(t)  โ”‚  No change (Hold)    โ”‚
  โ”‚  0  โ”‚  1  โ”‚   0    โ”‚  Reset               โ”‚
  โ”‚  1  โ”‚  0  โ”‚   1    โ”‚  Set                 โ”‚
  โ”‚  1  โ”‚  1  โ”‚  Q'(t) โ”‚  Toggle              โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Characteristic Equation: Q(t+1) = JยทQ'(t) + K'ยทQ(t)
GATE Trick: Any flip-flop can be converted to any other. To convert JK โ†’ D: Connect D to J and D' to K. To convert JK โ†’ T: Connect J = K = T. These conversions are asked in GATE almost every other year.

3.4 T Flip-Flop (Toggle)

A simplified JK flip-flop with a single input T. When T=1, the output toggles on every clock edge. Perfect for building binary counters.

  T FLIP-FLOP โ€” Truth Table
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  T  โ”‚ Q(t+1) โ”‚     Action           โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  0  โ”‚  Q(t)  โ”‚  No change (Hold)    โ”‚
  โ”‚  1  โ”‚  Q'(t) โ”‚  Toggle              โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Characteristic Equation: Q(t+1) = T โŠ• Q(t)
  (T=1: flip; T=0: hold)

3.5 Flip-Flop Comparison Table

FeatureSRDJKT
InputsS, RDJ, KT
Invalid state?Yes (S=R=1)NoNoNo
Toggle?NoNoYes (J=K=1)Yes (T=1)
Char. EquationS + R'QDJQ' + K'QT โŠ• Q
Best forBasic latchRegisters, data storageCounters, universal useFrequency dividers
GATE frequencyLowHighVery HighMedium

3.6 4-Bit Register

A register is a group of flip-flops that stores a multi-bit binary word. A 4-bit register uses 4 D flip-flops, all sharing the same clock, to store a 4-bit value.

  4-BIT PARALLEL REGISTER (using D Flip-Flops)

  D3โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”   D2โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”   D1โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”   D0โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”
      โ”‚ D  โ”‚       โ”‚ D  โ”‚       โ”‚ D  โ”‚       โ”‚ D  โ”‚
      โ”‚ FF โ”‚       โ”‚ FF โ”‚       โ”‚ FF โ”‚       โ”‚ FF โ”‚
      โ”‚    โ”‚       โ”‚    โ”‚       โ”‚    โ”‚       โ”‚    โ”‚
  CLKโ–บโ”‚    โ”‚   CLKโ–บโ”‚    โ”‚   CLKโ–บโ”‚    โ”‚   CLKโ–บโ”‚    โ”‚
      โ””โ”€โ”ฌโ”€โ”€โ”˜       โ””โ”€โ”ฌโ”€โ”€โ”˜       โ””โ”€โ”ฌโ”€โ”€โ”˜       โ””โ”€โ”ฌโ”€โ”€โ”˜
        โ”‚             โ”‚            โ”‚            โ”‚
       Q3            Q2           Q1           Q0

  โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  CLK โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  (Common clock โ€” all FFs sample D simultaneously)

  On each rising clock edge:
    Q3โ†D3, Q2โ†D2, Q1โ†D1, Q0โ†D0

  Example: Load value 1010
  Set D3=1, D2=0, D1=1, D0=0 โ†’ on clock edge โ†’ Q = 1010

3.7 3-Bit Asynchronous (Ripple) Counter

A counter that counts in binary from 000 to 111 (0 to 7) and then wraps around. Uses T flip-flops with T=1 (always toggle). Each flip-flop's output clocks the next one.

  3-BIT RIPPLE COUNTER (using T Flip-Flops, T=1)

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
  CLK โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ T FF โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ T FF โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ T FF โ”‚
                    โ”‚  Q0  โ”‚ Q0  โ”‚  Q1  โ”‚ Q1  โ”‚  Q2  โ”‚
                    โ”‚(LSB) โ”‚clockโ”‚      โ”‚clockโ”‚(MSB) โ”‚
                    โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
                       โ”‚             โ”‚              โ”‚
                      Q0            Q1             Q2

  State Sequence (Count-Up):
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Clock โ”‚ Q2  โ”‚ Q1  โ”‚ Q0  โ”‚ Decimal โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚   0   โ”‚  0  โ”‚  0  โ”‚  0  โ”‚    0    โ”‚
  โ”‚   1   โ”‚  0  โ”‚  0  โ”‚  1  โ”‚    1    โ”‚
  โ”‚   2   โ”‚  0  โ”‚  1  โ”‚  0  โ”‚    2    โ”‚
  โ”‚   3   โ”‚  0  โ”‚  1  โ”‚  1  โ”‚    3    โ”‚
  โ”‚   4   โ”‚  1  โ”‚  0  โ”‚  0  โ”‚    4    โ”‚
  โ”‚   5   โ”‚  1  โ”‚  0  โ”‚  1  โ”‚    5    โ”‚
  โ”‚   6   โ”‚  1  โ”‚  1  โ”‚  0  โ”‚    6    โ”‚
  โ”‚   7   โ”‚  1  โ”‚  1  โ”‚  1  โ”‚    7    โ”‚
  โ”‚   8   โ”‚  0  โ”‚  0  โ”‚  0  โ”‚  0 (โ†บ)  โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  Counts from 0 to 2ยณโˆ’1 = 7, then resets to 0.
  Modulus = 2ยณ = 8 (Mod-8 counter)
ISRO's onboard timer uses sequential counters to track mission elapsed time. A 32-bit counter at 10 MHz clock can count up to 2ยณยฒ โˆ’ 1 = 4,294,967,295 clock ticks, which equals ~429 seconds (~7 minutes). For the full PSLV mission (~20 minutes to orbit), they use cascaded counters with wider bit-widths.
Section D

Learn by Doing โ€” 3-Tier Lab Structure

๐ŸŸข Tier 1 โ€” GUIDED: Truth Table Trace for Full Adder

โฑ๏ธ 30โ€“45 minutesBeginnerPen-and-paper exercise

Objective:

Manually trace the truth table of a Full Adder and verify the Sum and Carry-Out equations gate by gate.

Step 1: Draw the Circuit

Draw a Full Adder using 2 XOR gates, 2 AND gates, and 1 OR gate. Label all intermediate wires.

  A โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ–บ[XOR1]โ”€โ”€โ”€Pโ”€โ”€โ”ฌโ”€โ”€โ”€โ–บ[XOR2]โ”€โ”€โ”€โ”€โ”€โ–บ Sum
         โ”‚                โ”‚       โ–ฒ
  B โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ–บ           โ”‚      โ”‚
         โ”‚    [AND1]โ”€โ”€G   โ”‚   Cinโ”€โ”ค
         โ”‚       โ–ฒ        โ”‚      โ”‚
         โ”‚       โ”‚        โ”œโ”€โ”€โ”€โ–บ[AND2]โ”€โ”€T
         โ”‚       B        โ”‚
         A                โ”‚
                          โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
                     Gโ”€โ”€โ”€โ–บโ”‚โ”€โ”€โ”€โ–บโ”‚      โ”‚
                          โ”‚    โ”‚  OR  โ”œโ”€โ”€โ”€โ–บ Cout
                     Tโ”€โ”€โ”€โ–บโ”‚โ”€โ”€โ”€โ–บโ”‚      โ”‚
                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Where: P = A โŠ• B,  G = AยทB,  T = PยทCin

Step 2: Trace Row by Row

For each input combination, compute every intermediate signal:

ABCinP=AโŠ•BG=AยทBT=PยทCinSum=PโŠ•CinCout=G+T
00000000
00100010
01010010
01110101
10010010
10110101
11001001
11101011

Step 3: Verify

Check that Sum = A โŠ• B โŠ• Cin and Cout = AB + Cin(A โŠ• B) match for every row. If even one row doesn't match, your wiring has a bug โ€” go back and trace again.

Stretch Goal: Now trace a Half Subtractor. Inputs: A, B. Outputs: Difference = A โŠ• B, Borrow = A'ยทB. Draw its truth table and gate diagram.

๐ŸŸก Tier 2 โ€” SEMI-GUIDED: Build a 4-Bit Ripple Carry Adder on Paper

โฑ๏ธ 60โ€“90 minutesIntermediateCircuit design + numerical verification

Your Mission:

Design a 4-bit Ripple Carry Adder, then use it to compute 3 additions manually.

Tasks:

  1. Draw the full circuit: 4 Full Adders cascaded, with carry chain clearly shown
  2. Compute: 7 + 5 = ? (0111 + 0101). Trace carry through each FA stage.
  3. Compute: 9 + 6 = ? (1001 + 0110). Does it overflow for 4 bits?
  4. Compute: 15 + 1 = ? (1111 + 0001). What happens? Explain overflow.
  5. Calculate worst-case propagation delay if each FA has a delay of 10 ns.

Expected Results:

OperationBinary ABinary BResultCarry OutOverflow?
7 + 5011101011100 (12)0No
9 + 6100101101111 (15)0No
15 + 1111100010000 (0!)1Yes!
Worst-case delay for n-bit RCA = 2n ร— gate_delay. Each FA has 2 gate levels for carry. For 4-bit RCA with 10 ns gate delay: worst case = 2 ร— 4 ร— 10 = 80 ns. A 64-bit RCA would take 1280 ns โ€” far too slow for GHz processors!

๐Ÿ”ด Tier 3 โ€” OPEN CHALLENGE: Python Truth Table Generator

โฑ๏ธ 90โ€“120 minutesAdvancedPython programming project

The Brief:

Write a Python program that generates truth tables for any n-input combinational circuit. The user provides a Boolean expression, and the program outputs the complete truth table.

Python
# Truth Table Generator for Combinational Circuits
from itertools import product

def generate_truth_table(variables, expression):
    """Generate truth table for a Boolean expression."""
    n = len(variables)
    
    # Print header
    header = " | ".join(variables) + " | Output"
    print(header)
    print("-" * len(header))
    
    # Generate all input combinations
    for values in product([0, 1], repeat=n):
        # Map variable names to values
        env = dict(zip(variables, values))
        
        # Evaluate expression
        result = eval(expression, {"__builtins__": {}}, env)
        result = 1 if result else 0
        
        row = " | ".join(str(v) for v in values)
        print(f"{row} |   {result}")

# Example: Full Adder
print("=== FULL ADDER: Sum ===")
generate_truth_table(
    ["A", "B", "C"],
    "(A ^ B ^ C)"   # XOR for Sum
)

print("\n=== FULL ADDER: Carry ===")
generate_truth_table(
    ["A", "B", "C"],
    "(A and B) or (C and (A ^ B))"  # Carry equation
)

print("\n=== 2:4 DECODER ===")
for i in range(4):
    print(f"\nOutput D{i}:")
    expr = [
        "(not A) and (not B)",
        "(not A) and B",
        "A and (not B)",
        "A and B"
    ][i]
    generate_truth_table(["A", "B"], expr)
=== FULL ADDER: Sum === A | B | C | Output -------------------- 0 | 0 | 0 | 0 0 | 0 | 1 | 1 0 | 1 | 0 | 1 0 | 1 | 1 | 0 1 | 0 | 0 | 1 1 | 0 | 1 | 0 1 | 1 | 0 | 0 1 | 1 | 1 | 1
Stretch Goals:
โ€ข Add a 4:1 MUX simulation that accepts select lines + data inputs
โ€ข Add a JK flip-flop simulator that takes a clock sequence and shows Q at each edge
โ€ข Output truth tables as formatted HTML files (portfolio piece!)
Section E

Problem Bank โ€” Diagrams, Numericals, Industry & GATE

Diagram-Based Problems (3)

๐Ÿ“ P1: Draw the gate-level circuit for a 4:1 MUX using basic gates

Task: Using AND, OR, and NOT gates only, draw the complete circuit for a 4:1 MUX with inputs I0โ€“I3, select lines S1, S0, and output Y.

Solution:

  S1 โ”€โ”€โ”ฌโ”€โ”€โ–บ[NOT]โ”€โ”€S1'    S0 โ”€โ”€โ”ฌโ”€โ”€โ–บ[NOT]โ”€โ”€S0'
       โ”‚                       โ”‚
       โ”‚                       โ”‚
  I0 โ”€โ”€โ–บ[AND]โ—„โ”€โ”€ S1' โ—„โ”€โ”€ S0'  โ”€โ”€โ–บ AND0 out
  I1 โ”€โ”€โ–บ[AND]โ—„โ”€โ”€ S1' โ—„โ”€โ”€ S0   โ”€โ”€โ–บ AND1 out
  I2 โ”€โ”€โ–บ[AND]โ—„โ”€โ”€ S1  โ—„โ”€โ”€ S0'  โ”€โ”€โ–บ AND2 out      โ”€โ”€โ–บ[OR]โ”€โ”€โ–บ Y
  I3 โ”€โ”€โ–บ[AND]โ—„โ”€โ”€ S1  โ—„โ”€โ”€ S0   โ”€โ”€โ–บ AND3 out

  Each AND gate is 3-input:
  AND0 = I0 ยท S1' ยท S0'
  AND1 = I1 ยท S1' ยท S0
  AND2 = I2 ยท S1  ยท S0'
  AND3 = I3 ยท S1  ยท S0
  Y    = AND0 + AND1 + AND2 + AND3

Gate count: 2 NOT + 4 AND (3-input) + 1 OR (4-input) = 7 gates total.

๐Ÿ“ P2: Draw a 3-bit synchronous counter using JK flip-flops

Task: Design a Mod-8 synchronous up-counter. All flip-flops share the same clock. Show the excitation table and connections.

Solution:

  Excitation Table (JK FF):
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚Present โ”‚  Next  โ”‚  JK inputs needed           โ”‚
  โ”‚Q2 Q1 Q0โ”‚Q2 Q1 Q0โ”‚  J2 K2  J1 K1  J0 K0       โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚ 0  0  0โ”‚ 0  0  1โ”‚  0  X   0  X   1  X        โ”‚
  โ”‚ 0  0  1โ”‚ 0  1  0โ”‚  0  X   1  X   X  1        โ”‚
  โ”‚ 0  1  0โ”‚ 0  1  1โ”‚  0  X   X  0   1  X        โ”‚
  โ”‚ 0  1  1โ”‚ 1  0  0โ”‚  1  X   X  1   X  1        โ”‚
  โ”‚ 1  0  0โ”‚ 1  0  1โ”‚  X  0   0  X   1  X        โ”‚
  โ”‚ 1  0  1โ”‚ 1  1  0โ”‚  X  0   1  X   X  1        โ”‚
  โ”‚ 1  1  0โ”‚ 1  1  1โ”‚  X  0   X  0   1  X        โ”‚
  โ”‚ 1  1  1โ”‚ 0  0  0โ”‚  X  1   X  1   X  1        โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Simplified (using K-maps):
  J0 = K0 = 1  (always toggle)
  J1 = K1 = Q0
  J2 = K2 = Q0 ยท Q1

  Circuit:
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
  1 โ”€โ”€J0โ”€โ–บโ”‚ JK   โ”‚  Q0โ”€J1โ–บโ”‚ JK   โ”‚Q0ยทQ1โ”€J2โ–บโ”‚ JK   โ”‚
  1 โ”€โ”€K0โ”€โ–บโ”‚ FF0  โ”‚  Q0โ”€K1โ–บโ”‚ FF1  โ”‚Q0ยทQ1โ”€K2โ–บโ”‚ FF1  โ”‚
  CLKโ”€โ”€โ”€โ”€โ–บโ”‚      โ”‚  CLKโ”€โ”€โ–บโ”‚      โ”‚  CLKโ”€โ”€โ”€โ–บโ”‚      โ”‚
          โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
            Q0              Q1                Q2

๐Ÿ“ P3: Draw the timing diagram for a D flip-flop

Task: Given CLK and D waveforms, draw Q output for a positive-edge-triggered D flip-flop.

  CLK:  โ”€โ”€โ”  โ”Œโ”€โ”€โ”  โ”Œโ”€โ”€โ”  โ”Œโ”€โ”€โ”  โ”Œโ”€โ”€โ”  โ”Œโ”€โ”€โ”  โ”Œโ”€โ”€
          โ””โ”€โ”€โ”˜  โ””โ”€โ”€โ”˜  โ””โ”€โ”€โ”˜  โ””โ”€โ”€โ”˜  โ””โ”€โ”€โ”˜  โ””โ”€โ”€โ”˜
  Edge:    โ†‘1    โ†‘2    โ†‘3    โ†‘4    โ†‘5    โ†‘6
          
  D:    โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€0โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€0โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€0โ”€โ”€
  
  Q:    โ”€โ”€0โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€0โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€0โ”€โ”€1โ”€โ”€1โ”€โ”€0โ”€โ”€
           โ†‘     โ†‘     โ†‘     โ†‘     โ†‘     โ†‘
           D=1   D=0   D=1   D=0   D=1   D=0
           atโ†‘1  atโ†‘2  atโ†‘3  atโ†‘4  atโ†‘5  atโ†‘6

  Rule: Q takes the value of D at each rising edge of CLK.
  Between clock edges, Q holds its previous value.

Numerical Problems (6)

๐Ÿ”ข N1: Binary Addition using 4-bit RCA

Q: Add 1011โ‚‚ (11) and 0110โ‚‚ (6) using a 4-bit Ripple Carry Adder. Show carry at each stage.

Solution:

  FA0: A0=1, B0=0, Cin=0 โ†’ Sum=1, Cout=0
  FA1: A1=1, B1=1, Cin=0 โ†’ Sum=0, Cout=1
  FA2: A2=0, B2=1, Cin=1 โ†’ Sum=0, Cout=1
  FA3: A3=1, B3=0, Cin=1 โ†’ Sum=0, Cout=1
  
  Result: Cout=1, S = 0001
  Full answer: 10001โ‚‚ = 17โ‚โ‚€  โœ“ (11 + 6 = 17)
  Note: Cout=1 means result needs 5 bits.

๐Ÿ”ข N2: MUX-based Function Implementation

Q: Implement f(A,B) = ฮฃm(1,2,3) using a 4:1 MUX.

Solution:

  Truth table:
  A  B | f
  0  0 | 0  โ†’ I0 = 0
  0  1 | 1  โ†’ I1 = 1
  1  0 | 1  โ†’ I2 = 1
  1  1 | 1  โ†’ I3 = 1

  Connect: S1=A, S0=B
  I0=0 (GND), I1=1 (VCC), I2=1 (VCC), I3=1 (VCC)
  
  This is equivalent to f = A + B (OR gate)

๐Ÿ”ข N3: Propagation Delay Calculation

Q: A 16-bit Ripple Carry Adder uses Full Adders with a gate delay of 5 ns per gate. Each FA has 2 gate levels for carry propagation. Calculate the worst-case delay.

Solution:

  Worst-case carry delay per FA = 2 ร— 5 ns = 10 ns
  Total carry chain for 16-bit = 16 FAs
  Worst-case total delay = 16 ร— 10 ns = 160 ns
  
  Maximum operating frequency = 1 / 160 ns = 6.25 MHz
  
  Compare: Modern CPUs run at 4 GHz = 0.25 ns per cycle
  This is why RCA is NOT used in real processors!

๐Ÿ”ข N4: Flip-Flop State Sequence

Q: A JK flip-flop has J=1, K=1 with initial Q=0. What is Q after 5 clock pulses?

Solution:

  J=K=1 โ†’ Toggle mode
  
  Initial: Q = 0
  After clock 1: Q = 1 (toggled)
  After clock 2: Q = 0 (toggled)
  After clock 3: Q = 1 (toggled)
  After clock 4: Q = 0 (toggled)
  After clock 5: Q = 1 (toggled)
  
  Answer: Q = 1 after 5 clock pulses.
  Pattern: Q toggles every clock โ†’ acts as frequency divider รท2

๐Ÿ”ข N5: Counter Modulus

Q: How many flip-flops are needed for a Mod-12 counter? What is the maximum count?

Solution:

  Need to count 12 states: 0 to 11
  
  Number of FFs = โŒˆlogโ‚‚(12)โŒ‰ = โŒˆ3.585โŒ‰ = 4 flip-flops
  
  4 FFs can count 0 to 15 (Mod-16 naturally)
  For Mod-12: Reset to 0 when count reaches 12 (1100โ‚‚)
  Maximum valid count = 11 (1011โ‚‚)
  
  Reset logic: When Q3=1, Q2=1, Q1=0, Q0=0 โ†’ CLEAR all FFs
  Reset = Q3 ยท Q2 (since 12 = 1100, we detect this and reset)

๐Ÿ”ข N6: Decoder Output Minterms

Q: A 3:8 decoder has inputs Aโ‚‚Aโ‚Aโ‚€ = 101. Which output line is active?

Solution:

  Input: Aโ‚‚=1, Aโ‚=0, Aโ‚€=1
  Binary 101 = Decimal 5
  
  Output D5 is active (HIGH), all others are LOW.
  
  D5 = Aโ‚‚ ยท Aโ‚' ยท Aโ‚€ = 1 ยท 1 ยท 1 = 1 โœ“
  
  A 3:8 decoder generates all 8 minterms of 3 variables.
  This is why decoders can implement ANY Boolean function
  by OR-ing the appropriate output lines.

Industry Application Problems (3)

๐Ÿญ I1: ISRO Flight Computer โ€” Stage Separation Logic

Scenario: PSLV has 4 stages. The flight computer must activate stage separation only when: (1) current stage fuel is depleted (F=1), (2) altitude is above minimum threshold (A=1), AND (3) separation command is received from ground or timer (C=1).

Task: Design the combinational logic circuit for the SEPARATE signal.

  SEPARATE = F ยท A ยท C  (3-input AND gate)
  
  Truth Table:
  F  A  C | SEPARATE
  0  0  0 |    0     (fuel remaining, don't separate)
  0  0  1 |    0
  0  1  0 |    0
  0  1  1 |    0
  1  0  0 |    0     (fuel done but too low altitude!)
  1  0  1 |    0
  1  1  0 |    0     (fuel done, altitude OK, no command)
  1  1  1 |    1     โœ… SEPARATE NOW!
  
  Safety: Only 1 out of 8 conditions triggers separation.
  This is intentional โ€” fail-safe design.

๐Ÿญ I2: Qualcomm Hyderabad โ€” Power Management MUX

Scenario: A Snapdragon SoC has 4 power modes: Active (00), Idle (01), Sleep (10), Deep Sleep (11). A 4:1 MUX selects the appropriate clock frequency based on the power mode.

Task: Design the MUX configuration.

  Power Mode Select Lines: S1, S0
  Clock frequencies (input to MUX):
    I0 = 2.4 GHz  (Active โ€” full speed)
    I1 = 800 MHz   (Idle โ€” reduced)
    I2 = 100 MHz   (Sleep โ€” minimal)
    I3 = 32 KHz    (Deep Sleep โ€” near zero)
  
  Output Y = selected clock frequency
  
  This is exactly how modern phone chipsets save battery.
  When you lock your phone, S1S0 transitions from 00โ†’01โ†’10โ†’11
  reducing power consumption by 99%.

๐Ÿญ I3: Indian Railways โ€” Signal Interlocking Logic

Scenario: At a junction, two train routes (R1, R2) must never be green simultaneously. Design a combinational circuit that ensures safety interlocking.

  Inputs: Request_R1, Request_R2
  Outputs: Green_R1, Green_R2

  Safety Rule: Green_R1 ยท Green_R2 = 0 (NEVER both green)

  Logic:
  Green_R1 = Request_R1 ยท Request_R2'  (R1 only if R2 not requested)
  Green_R2 = Request_R2 ยท Request_R1'  (R2 only if R1 not requested)
  
  If both requested simultaneously:
  Green_R1 = 0, Green_R2 = 0 (BOTH RED โ€” safe default)
  
  Additional priority logic can be added to handle conflicts.
  Indian Railways uses similar relay-based interlocking at 7,000+ stations.

GATE-Style Problems (5)

๐ŸŽฏ GATE Q1 [1 Mark]

Q: The number of 2-input AND and OR gates required to implement the Boolean function F(A,B,C) = AB + BC + CA in Sum-of-Products form is:

  1. 3 AND, 1 OR
  2. 3 AND, 3 OR
  3. 2 AND, 1 OR
  4. 3 AND, 2 OR

Answer: (A) โ€” F = AB + BC + CA has 3 product terms (3 AND gates) combined by 1 OR gate. But the OR gate needs 3 inputs. Using 2-input OR gates: need 2 OR gates (cascade). So strictly: 3 AND + 2 OR. Answer is (A) if 3-input OR is allowed, (D) if only 2-input. GATE usually allows multi-input gates.

๐ŸŽฏ GATE Q2 [2 Marks]

Q: A 4-bit ripple carry adder adds two 4-bit numbers. The gate delay is ฮ” per gate. What is the worst-case delay for the carry output of the MSB stage?

  1. 4ฮ”
  2. 8ฮ”
  3. 12ฮ”
  4. 16ฮ”

Answer: (B) 8ฮ” โ€” Each Full Adder has 2 gate levels for carry propagation (AND + OR). For 4 stages: 4 ร— 2ฮ” = 8ฮ”. Note: First FA carry takes 2ฮ”, and each subsequent FA adds 2ฮ” to the carry chain.

๐ŸŽฏ GATE Q3 [1 Mark]

Q: The characteristic equation of a JK flip-flop is:

  1. Q(t+1) = JQ + K'Q'
  2. Q(t+1) = JQ' + K'Q
  3. Q(t+1) = J'Q + KQ'
  4. Q(t+1) = J โŠ• Q

Answer: (B) โ€” Q(t+1) = JยทQ'(t) + K'ยทQ(t). Verify: J=0,K=0 โ†’ Q(hold) โœ“; J=0,K=1 โ†’ 0(reset) โœ“; J=1,K=0 โ†’ 1(set) โœ“; J=1,K=1 โ†’ Q'(toggle) โœ“.

๐ŸŽฏ GATE Q4 [2 Marks]

Q: An 8:1 MUX is used to implement a 3-variable Boolean function f(A,B,C). A, B, C are connected to S2, S1, S0 respectively. For f = ฮฃm(1,2,4,7), the values of I0 through I7 are:

  1. 0,1,1,0,1,0,0,1
  2. 1,1,0,1,0,0,1,0
  3. 0,1,1,0,0,1,0,1
  4. 1,0,0,1,1,0,1,0

Answer: (A) โ€” f = ฮฃm(1,2,4,7). Minterms present: m1, m2, m4, m7. So I1=1, I2=1, I4=1, I7=1; rest = 0. Sequence: I0=0, I1=1, I2=1, I3=0, I4=1, I5=0, I6=0, I7=1.

๐ŸŽฏ GATE Q5 [2 Marks]

Q: A 3-bit synchronous counter using JK flip-flops counts the sequence: 0โ†’1โ†’2โ†’3โ†’4โ†’5โ†’6โ†’7โ†’0. The flip-flop inputs for the MSB (Q2) are:

  1. J2 = Q1ยทQ0, K2 = Q1ยทQ0
  2. J2 = Q1+Q0, K2 = Q1+Q0
  3. J2 = Q1โŠ•Q0, K2 = 1
  4. J2 = 1, K2 = 1

Answer: (A) โ€” From the excitation table, Q2 transitions 0โ†’1 only when Q1=Q0=1 (count 3โ†’4), and 1โ†’0 only when Q1=Q0=1 (count 7โ†’0). So J2 = K2 = Q1ยทQ0.

Section F

MCQ Assessment Bank โ€” 30 Questions (Bloom's Mapped)

Remember / Identify (Q1โ€“Q5)

Q1

Which unit of a computer performs arithmetic and logical operations?

  1. Control Unit
  2. Memory Unit
  3. ALU
  4. Input Unit
Remember
โœ… Answer: (C) ALU โ€” The Arithmetic Logic Unit performs all arithmetic (+, โˆ’, ร—, รท) and logical (AND, OR, NOT) operations.
Q2

The output of a Half Adder for inputs A=1, B=1 is:

  1. Sum=1, Carry=0
  2. Sum=0, Carry=1
  3. Sum=1, Carry=1
  4. Sum=0, Carry=0
Remember
โœ… Answer: (B) โ€” Sum = 1โŠ•1 = 0, Carry = 1ยท1 = 1. In binary: 1+1 = 10 (sum=0, carry=1).
Q3

How many select lines does an 8:1 MUX have?

  1. 2
  2. 3
  3. 4
  4. 8
Remember
โœ… Answer: (B) 3 โ€” An 8:1 MUX needs logโ‚‚(8) = 3 select lines to choose one of 8 inputs.
Q4

The characteristic equation of a D flip-flop is:

  1. Q(t+1) = D
  2. Q(t+1) = D โŠ• Q
  3. Q(t+1) = DยทQ'
  4. Q(t+1) = D + Q
Remember
โœ… Answer: (A) Q(t+1) = D โ€” The D flip-flop simply copies the input D to output Q on each clock edge.
Q5

A 2:4 decoder has how many output lines?

  1. 2
  2. 4
  3. 8
  4. 16
Remember
โœ… Answer: (B) 4 โ€” A 2:4 decoder has 2 input lines and 2ยฒ = 4 output lines.

Understand / Explain (Q6โ€“Q10)

Q6

Why is the S=1, R=1 condition invalid in an SR flip-flop?

  1. It consumes too much power
  2. It forces Q and Q' to both be 0, violating the complement rule
  3. It damages the circuit physically
  4. It causes the clock to stop
Understand
โœ… Answer: (B) โ€” When S=R=1, both NOR gates output 0, so Q=Q'=0. This violates the fundamental rule that Q' must be the complement of Q. The state becomes unpredictable when inputs return to 0.
Q7

In a 4-bit Ripple Carry Adder, why does the MSB stage produce the result last?

  1. It has more gates
  2. It must wait for the carry to ripple through all previous stages
  3. The MSB is always the slowest bit
  4. It uses a different clock
Understand
โœ… Answer: (B) โ€” The carry out of each stage is the carry in for the next. FA3 cannot compute its result until it receives C3 from FA2, which waits for C2 from FA1, which waits for C1 from FA0. This "ripple" causes increasing delay.
Q8

What does it mean when we say a MUX is a "universal logic element"?

  1. It can replace any power supply
  2. It can implement any Boolean function without other gates
  3. It works at any frequency
  4. It can store data like a flip-flop
Understand
โœ… Answer: (B) โ€” A 2โฟ:1 MUX can implement any n-variable Boolean function by connecting the function's truth table output values to the MUX data inputs and the variables to the select lines.
Q9

How does a sequential circuit differ from a combinational circuit fundamentally?

  1. Sequential circuits are faster
  2. Sequential circuits have memory elements (feedback) while combinational don't
  3. Sequential circuits don't use logic gates
  4. Combinational circuits require a clock
Understand
โœ… Answer: (B) โ€” The key difference is memory. Sequential circuits have feedback paths and flip-flops that store state. Their output depends on current input AND past history. Combinational outputs depend only on current inputs.
Q10

Why is the D flip-flop preferred over SR flip-flop for data storage registers?

  1. It's cheaper
  2. It has no invalid state and directly stores whatever value is on its input
  3. It runs at higher frequency
  4. It uses fewer transistors
Understand
โœ… Answer: (B) โ€” The D flip-flop eliminates the invalid S=R=1 condition entirely (since there's only one data input). Q(t+1) = D โ€” clean, predictable, no race conditions. This is why it's universally used in registers and data storage.

Apply / Solve (Q11โ€“Q15)

Q11

A Full Adder has inputs A=1, B=0, Cin=1. The outputs Sum and Cout are:

  1. Sum=0, Cout=1
  2. Sum=1, Cout=1
  3. Sum=0, Cout=0
  4. Sum=1, Cout=0
Apply
โœ… Answer: (A) โ€” Sum = 1โŠ•0โŠ•1 = 0. Cout = (1ยท0) + (1ยท(1โŠ•0)) = 0 + 1ยท1 = 1. Verification: 1+0+1 = 10โ‚‚ (Sum=0, Carry=1) โœ“
Q12

In a 4:1 MUX with S1=1, S0=0, which input is selected?

  1. I0
  2. I1
  3. I2
  4. I3
Apply
โœ… Answer: (C) I2 โ€” S1S0 = 10โ‚‚ = 2โ‚โ‚€. So input I2 is selected and passed to the output.
Q13

A JK flip-flop with J=1, K=0 and current Q=0. After one clock pulse, Q becomes:

  1. 0
  2. 1
  3. Toggles
  4. Undefined
Apply
โœ… Answer: (B) 1 โ€” J=1, K=0 โ†’ Set operation. Q(t+1) = 1 regardless of current Q. Using characteristic equation: Q(t+1) = JยทQ' + K'ยทQ = 1ยท1 + 1ยท0 = 1.
Q14

How many Full Adders are needed to build a 16-bit adder?

  1. 8
  2. 15
  3. 16
  4. 32
Apply
โœ… Answer: (C) 16 โ€” Each bit position needs one Full Adder. For n-bit addition, we need n Full Adders in a Ripple Carry configuration (the LSB could use a Half Adder if Cin=0, but typically we use 16 FAs).
Q15

A 3:8 decoder with inputs Aโ‚‚Aโ‚Aโ‚€ = 011. Which output is HIGH?

  1. D0
  2. D3
  3. D5
  4. D7
Apply
โœ… Answer: (B) D3 โ€” 011โ‚‚ = 3โ‚โ‚€. So output line D3 is active (HIGH), all others LOW.

Analyze / Compare (Q16โ€“Q20)

Q16

A Carry Look-Ahead Adder is faster than a Ripple Carry Adder because:

  1. It uses fewer gates
  2. It computes all carry bits simultaneously using generate and propagate logic
  3. It doesn't need carry bits
  4. It uses sequential logic instead of combinational
Analyze
โœ… Answer: (B) โ€” CLA pre-computes carries using Generate (Gi = AiยทBi) and Propagate (Pi = AiโŠ•Bi) signals. All carries are computed in O(1) gate levels instead of O(n) for RCA, making it dramatically faster for wide adders.
Q17

Which flip-flop type can be used to implement all other flip-flop types?

  1. SR
  2. D
  3. JK
  4. T
Analyze
โœ… Answer: (C) JK โ€” The JK flip-flop is called the "universal" flip-flop. JKโ†’D: Connect J=D, K=D'. JKโ†’T: Connect J=K=T. JKโ†’SR: Connect J=S, K=R. No other flip-flop can convert to all others this easily.
Q18

In a ripple counter vs. a synchronous counter, the primary disadvantage of the ripple counter is:

  1. Uses more flip-flops
  2. Higher power consumption
  3. Cumulative propagation delay due to asynchronous clocking
  4. Cannot count beyond 8
Analyze
โœ… Answer: (C) โ€” In a ripple counter, each FF clocks the next, causing cumulative delay. For n bits: total delay = n ร— FF propagation delay. In synchronous counters, all FFs share the same clock, so delay is constant regardless of bit count.
Q19

A decoder can be used as a demultiplexer if:

  1. Output lines are grounded
  2. An enable input is used as the data line
  3. Extra flip-flops are added
  4. Clock is connected to inputs
Analyze
โœ… Answer: (B) โ€” A decoder with enable acts as a DEMUX. The address lines select which output receives the data (enable line). When Enable=1, the selected output is 1; when Enable=0, the selected output is 0. This routes the enable signal to one of 2โฟ outputs.
Q20

Which combination correctly identifies memory elements?

  1. MUX and Decoder โ€” both have memory
  2. Flip-flop and Register โ€” both have memory
  3. Adder and Encoder โ€” both have memory
  4. Counter and MUX โ€” both have memory
Analyze
โœ… Answer: (B) โ€” Flip-flops store 1 bit, Registers store n bits (group of flip-flops). MUX, Decoder, Adder, and Encoder are all combinational (no memory). Counter has memory (sequential).

Evaluate / Justify (Q21โ€“Q25)

Q21

For a frequency divider circuit, which flip-flop configuration is most appropriate?

  1. SR with S=R=0
  2. D with D connected to Q'
  3. JK with J=K=1
  4. Both (B) and (C)
Evaluate
โœ… Answer: (D) โ€” Both configurations create a toggle (divide-by-2). D FF with D=Q': Q toggles every clock. JK with J=K=1: Q toggles every clock. Both divide input frequency by 2. Either is valid for frequency dividers.
Q22

A 4-bit register can be built using which of the following?

  1. 4 AND gates
  2. 4 D flip-flops with common clock
  3. 4 MUX circuits
  4. 4 decoders
Evaluate
โœ… Answer: (B) โ€” A register stores data, requiring memory elements. D flip-flops with a common clock simultaneously capture 4 bits on each clock edge. AND gates, MUX, and decoders are combinational and cannot store data.
Q23

If a circuit has both combinational and sequential parts, it is classified as:

  1. Combinational
  2. Sequential
  3. Hybrid only
  4. Neither
Evaluate
โœ… Answer: (B) Sequential โ€” Any circuit with memory/feedback is sequential, even if it also contains combinational logic. A counter, for example, has combinational logic (excitation logic) feeding sequential elements (flip-flops).
Q24

For implementing Boolean function f(A,B,C) = ฮฃm(0,3,5,6), which is more gate-efficient?

  1. Using discrete AND-OR gates (SOP form)
  2. Using an 8:1 MUX
  3. Both use equal gates
  4. Cannot be determined
Evaluate
โœ… Answer: (B) โ€” The SOP form requires simplification via K-map and may need 3-4 AND gates + 1 OR gate + inverters. An 8:1 MUX needs just 1 IC (no additional gates) โ€” connect S2=A, S1=B, S0=C and tie I0,I3,I5,I6 to 1, rest to 0. The MUX approach is simpler and more systematic.
Q25

In PSLV's flight computer, why would sequential circuits be preferred over combinational circuits for tracking the rocket's flight phase?

  1. Sequential circuits are cheaper
  2. Flight phases depend on history/state, which only sequential circuits can track
  3. Combinational circuits cannot perform arithmetic
  4. Sequential circuits are always faster
Evaluate
โœ… Answer: (B) โ€” The rocket's current phase (Stage 1 burn, Stage 1 separation, Stage 2 ignition, etc.) depends on the sequence of events that have already occurred. Only sequential circuits can remember "what state we're in" and transition to the next state based on inputs + current state.

Create / GATE Advanced (Q26โ€“Q30)

Q26

[GATE Style] The minimum number of 2:1 MUXes required to implement a 4:1 MUX is:

  1. 2
  2. 3
  3. 4
  4. 5
GATECreate
โœ… Answer: (B) 3 โ€” Use 2 MUXes in the first level (each selects between 2 inputs using S0), then 1 MUX in the second level (selects between the two results using S1). Tree structure: 2 + 1 = 3 MUXes.
Q27

[GATE Style] A mod-10 counter requires a minimum of how many flip-flops?

  1. 3
  2. 4
  3. 5
  4. 10
GATECreate
โœ… Answer: (B) 4 โ€” Need to count 10 states (0โ€“9). โŒˆlogโ‚‚(10)โŒ‰ = โŒˆ3.32โŒ‰ = 4 flip-flops. 3 FFs can only count 8 states (0โ€“7). 4 FFs count up to 16 states; we reset at 10.
Q28

[GATE Style] To convert a JK flip-flop into a T flip-flop, the connections should be:

  1. J = T, K = T'
  2. J = T, K = T
  3. J = T', K = T
  4. J = 1, K = T
GATECreate
โœ… Answer: (B) โ€” Connect J = K = T. When T=0: J=K=0 โ†’ Hold (no change). When T=1: J=K=1 โ†’ Toggle. This matches T flip-flop behavior exactly.
Q29

[GATE Style] The output of a 3-bit ripple counter after 13 clock pulses (initial state = 000) is:

  1. 101
  2. 011
  3. 110
  4. 001
GATECreate
โœ… Answer: (A) 101 โ€” A 3-bit counter is Mod-8 (counts 0โ€“7, then resets). 13 mod 8 = 5. Binary of 5 = 101.
Q30

[GATE Style] A 4:16 decoder can be constructed using:

  1. Two 3:8 decoders and one 1:2 decoder
  2. Four 2:4 decoders and one 2:4 decoder
  3. Five 2:4 decoders
  4. Both (A) and (C)
GATECreate
โœ… Answer: (D) โ€” Method 1: Use 2 MSBs to create 1:2 decoder (enable), feeding two 3:8 decoders (one for upper 8, one for lower 8). Method 2: Use 2 MSBs through a 2:4 decoder to enable four 2:4 decoders (each handling 4 outputs from the 2 LSBs). Both approaches work. 5 total 2:4 decoders = 1 (pre-decode) + 4 (output stage).
Section G

Short Answer Questions (8 Questions)

SA1: List and briefly explain the five functional units of a computer. [5 marks]

Answer:

1. Input Unit: Accepts data and instructions from external devices (keyboard, mouse, scanner). Converts human-readable data into binary for processing.

2. Memory Unit: Stores data and programs. Primary memory (RAM) holds active data; secondary memory (HDD/SSD) provides persistent storage. ROM stores firmware.

3. ALU (Arithmetic Logic Unit): Performs arithmetic operations (addition, subtraction, multiplication, division) and logical operations (AND, OR, NOT, XOR, comparison).

4. Control Unit (CU): Directs the operation of all other units. Fetches instructions from memory, decodes them, and generates control signals to coordinate execution.

5. Output Unit: Presents processed results in human-readable form (monitor, printer, speaker). Converts binary data to visual/audio output.

These units communicate via three buses: Data Bus (data transfer), Address Bus (memory addressing), and Control Bus (control signals).

SA2: Differentiate between combinational and sequential circuits with two examples each. [5 marks]

Answer:

ParameterCombinationalSequential
MemoryNo memory elementsContains flip-flops (memory)
FeedbackNo feedback pathHas feedback from output to input
Output depends onCurrent inputs onlyCurrent inputs + present state
ClockNot requiredRequired (synchronous type)
ExamplesAdder, MUX, Decoder, EncoderFlip-flops, Counters, Registers

Indian analogy: Combinational = Vending machine (same input โ†’ same output, no history). Sequential = ATM (remembers card inserted, PIN entered โ€” has states).

SA3: Design a Half Adder. Write its truth table, Boolean expressions, and draw the logic circuit. [5 marks]

Answer:

A Half Adder adds two single-bit inputs A and B, producing Sum (S) and Carry (C).

Truth Table: A=0,B=0โ†’S=0,C=0 | A=0,B=1โ†’S=1,C=0 | A=1,B=0โ†’S=1,C=0 | A=1,B=1โ†’S=0,C=1

Equations: S = A โŠ• B (XOR gate), C = A ยท B (AND gate)

Circuit: One XOR gate for Sum, one AND gate for Carry. Both gates take A and B as inputs. Total: 2 gates.

Limitation: Cannot handle carry input from a previous stage โ€” hence "Half" adder. For multi-bit addition, we need Full Adders.

SA4: Explain the working of a JK flip-flop with its truth table and characteristic equation. [5 marks]

Answer:

The JK flip-flop is called the "universal" flip-flop because it eliminates the invalid state of the SR flip-flop.

Truth Table:

J=0, K=0 โ†’ Q(t+1) = Q(t) โ€” No change (Hold)

J=0, K=1 โ†’ Q(t+1) = 0 โ€” Reset

J=1, K=0 โ†’ Q(t+1) = 1 โ€” Set

J=1, K=1 โ†’ Q(t+1) = Q'(t) โ€” Toggle (key advantage over SR)

Characteristic Equation: Q(t+1) = JยทQ'(t) + K'ยทQ(t)

Key Advantage: When J=K=1, the output toggles instead of entering an invalid state. This makes it ideal for counters (toggle mode) and convertible to D or T flip-flop configurations.

SA5: What is a Multiplexer? Explain 4:1 MUX with its truth table. [5 marks]

Answer:

A Multiplexer (MUX) is a combinational circuit that selects one of multiple input lines and directs it to a single output line. It acts as a "data selector."

4:1 MUX: Has 4 data inputs (I0โ€“I3), 2 select lines (S1, S0), and 1 output (Y).

Truth Table: S1=0,S0=0โ†’Y=I0 | S1=0,S0=1โ†’Y=I1 | S1=1,S0=0โ†’Y=I2 | S1=1,S0=1โ†’Y=I3

Equation: Y = S1'ยทS0'ยทI0 + S1'ยทS0ยทI1 + S1ยทS0'ยทI2 + S1ยทS0ยทI3

Applications: Data routing, function implementation, communication systems. A 2โฟ:1 MUX can implement any n-variable Boolean function, making it a universal logic element.

SA6: Explain the concept of Ripple Carry Adder. Why is it slow for large bit-widths? [5 marks]

Answer:

A Ripple Carry Adder (RCA) is formed by cascading n Full Adders to add two n-bit numbers. The carry-out of each FA becomes the carry-in of the next FA.

Why it's slow: The carry must "ripple" through all stages sequentially. FA(n) cannot compute its output until it receives carry from FA(n-1). Worst-case delay = 2n ร— gate_delay (2 gate levels per FA for carry).

Example: 32-bit RCA with 10 ns gate delay: Worst case = 2 ร— 32 ร— 10 = 640 ns โ†’ max frequency = 1.56 MHz. Modern CPUs need GHz speeds!

Solution: Carry Look-Ahead Adder (CLA) computes all carries in parallel using Generate and Propagate signals, achieving O(log n) delay instead of O(n).

SA7: What is a Decoder? How can a decoder be used to implement Boolean functions? [5 marks]

Answer:

A Decoder takes an n-bit input and activates exactly one of 2โฟ output lines. Each output represents one minterm of the input variables.

2:4 Decoder Outputs: D0=A'B', D1=A'B, D2=AB', D3=AB โ€” these are all 4 minterms of 2 variables.

Implementing Boolean functions: Since each decoder output is a minterm, any SOP function can be implemented by OR-ing the appropriate outputs.

Example: f(A,B) = ฮฃm(1,3) = A'B + AB = D1 + D3. Connect D1 and D3 to an OR gate โ†’ output is f.

This makes decoders extremely versatile โ€” an n:2โฟ decoder + OR gates can implement ANY n-variable Boolean function.

SA8: Describe a 4-bit parallel register using D flip-flops. How does it load and store data? [5 marks]

Answer:

A 4-bit parallel register uses 4 D flip-flops with a common clock signal. Each FF stores one bit of the 4-bit data word.

Loading data: Place the 4-bit value on inputs D3, D2, D1, D0. On the rising edge of CLK, all four FFs simultaneously capture their respective D inputs: Q3โ†D3, Q2โ†D2, Q1โ†D1, Q0โ†D0.

Storing data: Between clock edges, the outputs Q3โ€“Q0 hold the stored value. The data persists until the next clock edge loads new values.

Applications: CPU general-purpose registers (store operands), instruction register (holds current instruction), buffer registers in data transfer, shift registers for serial-to-parallel conversion.

Example: Intel x86 has 32-bit registers (EAX, EBX, etc.) โ€” each is essentially 32 D flip-flops with a common clock.

Section H

Long Answer Questions (3 Questions)

LA1: Design a 4-bit Ripple Carry Adder. Explain its working with a complete example, draw the circuit diagram, and discuss its limitations. Suggest an improvement. [15 marks]

Model Answer:

Introduction: A 4-bit Ripple Carry Adder (RCA) adds two 4-bit binary numbers A = A3A2A1A0 and B = B3B2B1B0 with an optional carry-in C0, producing a 4-bit sum S = S3S2S1S0 and a carry-out C4.

Building Block โ€” Full Adder:

Each FA has inputs (Ai, Bi, Ci) and outputs (Si, Ci+1).

Sum: Si = Ai โŠ• Bi โŠ• Ci | Carry: Ci+1 = AiยทBi + Ciยท(Ai โŠ• Bi)

Circuit: Four FAs cascaded โ€” Cout of FA(i) connects to Cin of FA(i+1). C0 is typically 0 for addition.

Worked Example: Add A = 0111 (7) and B = 0101 (5):

  FA0: 1+1+0 = 10 โ†’ S0=0, C1=1
  FA1: 1+0+1 = 10 โ†’ S1=0, C2=1  
  FA2: 1+1+1 = 11 โ†’ S2=1, C3=1
  FA3: 0+0+1 = 01 โ†’ S3=1, C4=0
  Result: 1100โ‚‚ = 12โ‚โ‚€ โœ“ (7+5=12)

Limitations:

  1. Propagation Delay: Carry ripples through all n stages. Worst-case delay = 2n ร— t_gate. For 64-bit: 128 ร— t_gate โ€” unacceptable for GHz processors.
  2. Speed inversely proportional to bit-width: Longer adders are proportionally slower.
  3. Not suitable for high-speed applications: Modern CPUs require single-cycle addition.

Improvement โ€” Carry Look-Ahead Adder (CLA):

Define: Generate Gi = AiยทBi (carry generated regardless of Cin), Propagate Pi = Ai โŠ• Bi (carry propagated from Cin).

C1 = G0 + P0ยทC0, C2 = G1 + P1ยทG0 + P1ยทP0ยทC0, etc.

All carries computed in parallel โ†’ O(log n) delay instead of O(n). Used in all modern processors.

LA2: Compare all four types of flip-flops (SR, D, JK, T). For each, provide the truth table, characteristic equation, excitation table, and one practical application. Explain how to convert a JK flip-flop into D and T flip-flops. [15 marks]

Model Answer:

1. SR Flip-Flop: Truth Table: 00โ†’Hold, 01โ†’Reset(0), 10โ†’Set(1), 11โ†’Invalid. Char. Eq: Q(t+1) = S + R'Q, Constraint: SR=0. Excitation: 0โ†’0: S=0,R=X | 0โ†’1: S=1,R=0 | 1โ†’0: S=0,R=1 | 1โ†’1: S=X,R=0. Application: Simple latch circuits, debouncing switches.

2. D Flip-Flop: Truth Table: D=0โ†’Q=0, D=1โ†’Q=1. Char. Eq: Q(t+1) = D. Excitation: 0โ†’0: D=0 | 0โ†’1: D=1 | 1โ†’0: D=0 | 1โ†’1: D=1. Application: Data registers, pipeline stages in processors.

3. JK Flip-Flop: Truth Table: 00โ†’Hold, 01โ†’Reset, 10โ†’Set, 11โ†’Toggle. Char. Eq: Q(t+1) = JQ' + K'Q. Excitation: 0โ†’0: J=0,K=X | 0โ†’1: J=1,K=X | 1โ†’0: J=X,K=1 | 1โ†’1: J=X,K=0. Application: Counters, universal flip-flop, state machines.

4. T Flip-Flop: Truth Table: T=0โ†’Hold, T=1โ†’Toggle. Char. Eq: Q(t+1) = TโŠ•Q. Excitation: 0โ†’0: T=0 | 0โ†’1: T=1 | 1โ†’0: T=1 | 1โ†’1: T=0. Application: Binary counters, frequency dividers.

Conversions:

JK โ†’ D: We need Q(t+1) = D. Set J = D, K = D'. Proof: JQ' + K'Q = DQ' + D'ยท'Q = DQ' + DQ = D(Q'+Q) = D โœ“

JK โ†’ T: We need Q(t+1) = TโŠ•Q. Set J = K = T. Proof: TQ' + T'Q = TโŠ•Q โœ“ (by definition of XOR).

LA3: Design a 3-bit synchronous up-counter using JK flip-flops. Provide the state table, excitation table, K-map simplification for each flip-flop input, circuit diagram, and timing diagram. [15 marks]

Model Answer:

State Table:

  Present State โ†’ Next State
  Q2 Q1 Q0    โ†’ Q2+ Q1+ Q0+
   0  0  0    โ†’  0   0   1
   0  0  1    โ†’  0   1   0
   0  1  0    โ†’  0   1   1
   0  1  1    โ†’  1   0   0
   1  0  0    โ†’  1   0   1
   1  0  1    โ†’  1   1   0
   1  1  0    โ†’  1   1   1
   1  1  1    โ†’  0   0   0

Excitation Table (JK FF: 0โ†’0: J=0,K=X | 0โ†’1: J=1,K=X | 1โ†’0: J=X,K=1 | 1โ†’1: J=X,K=0):

  Q2 Q1 Q0 | J2 K2 | J1 K1 | J0 K0
   0  0  0 |  0  X |  0  X |  1  X
   0  0  1 |  0  X |  1  X |  X  1
   0  1  0 |  0  X |  X  0 |  1  X
   0  1  1 |  1  X |  X  1 |  X  1
   1  0  0 |  X  0 |  0  X |  1  X
   1  0  1 |  X  0 |  1  X |  X  1
   1  1  0 |  X  0 |  X  0 |  1  X
   1  1  1 |  X  1 |  X  1 |  X  1

K-Map Simplification:

J0 = K0 = 1 (always toggle โ€” all J0 entries are 1 or X, all K0 entries are 1 or X)

J1 = K1 = Q0 (J1 is 1 when Q0=1, K1 is 1 when Q0=1)

J2 = K2 = Q1ยทQ0 (J2 is 1 only when Q1=1 AND Q0=1)

Circuit: Three JK FFs with common clock. FF0: J0=K0=1. FF1: J1=K1=Q0. FF2: J2=K2=Q0ยทQ1 (AND gate). This is a synchronous counter โ€” all FFs triggered by the same clock edge simultaneously.

Timing Diagram: Q0 toggles every clock edge. Q1 toggles when Q0=1 at clock edge. Q2 toggles when Q0=Q1=1 at clock edge. Count sequence: 000โ†’001โ†’010โ†’011โ†’100โ†’101โ†’110โ†’111โ†’000.

Section I

Industry Spotlight โ€” A Day in the Life

๐Ÿ‘ฉโ€๐Ÿ’ป Priya Sharma, 28 โ€” VLSI Design Engineer at Intel India, Bangalore

Background: B.Tech ECE from NIT Trichy. Loved digital electronics in 2nd year. Did a summer internship at Texas Instruments. Got placed at Intel through campus recruitment at โ‚น12 LPA (2019). Now at โ‚น22 LPA after 5 years.

A Typical Day:

9:00 AM โ€” Standup call with the Xeon server chip team. Review RTL (Register Transfer Level) code changes from yesterday. Discuss a timing violation in the integer ALU path.

10:00 AM โ€” Write Verilog HDL code for a 64-bit Carry Look-Ahead Adder module. Every gate, every flip-flop she designs uses the exact concepts from this chapter โ€” at industrial scale.

12:00 PM โ€” Run synthesis and timing analysis using Synopsys Design Compiler. The tool reports that her adder meets the 4 GHz target clock โ€” carry delay is under 250 ps.

2:00 PM โ€” Review a colleague's counter design for the branch predictor unit. Check state transitions, verify excitation table against the specification.

4:00 PM โ€” Debug a simulation failure: a JK flip-flop in the instruction queue has an unexpected toggle. Root cause โ€” a race condition in asynchronous reset logic.

5:30 PM โ€” Knowledge-sharing session: presents "Adder Architectures โ€” From Ripple to Kogge-Stone" to junior engineers. The slides start with the same Half Adder truth table you learned today.

DetailInfo
Tools Used DailyVerilog/VHDL, Synopsys Design Compiler, Cadence Virtuoso, ModelSim, Python scripting
Entry Salary (2024)โ‚น10โ€“15 LPA (Intel, TI, Qualcomm, Samsung Semiconductor)
Mid-Level (3โ€“5 yrs)โ‚น18โ€“30 LPA
Senior (8+ yrs)โ‚น35โ€“60 LPA
Companies HiringIntel India (Bangalore), Qualcomm (Hyderabad), Texas Instruments (Bangalore), Samsung Semiconductor (Noida), AMD, Broadcom, MediaTek, Synopsys, Cadence
Key Exam PathsGATE ECE/CS (for M.Tech โ†’ VLSI specialization at IITs), ISRO Scientist, DRDO SET
The India Semiconductor Mission (ISM) has earmarked โ‚น76,000 crore for chip manufacturing. Companies like Tata Electronics (Dholera fab), CG Power (OSAT), and Micron (Gujarat) are hiring thousands of VLSI engineers. The skills you're learning in this chapter are directly applicable โ€” digital design is the foundation of every chip.
Section J

Earn With It โ€” Tutoring & Freelance Roadmap

๐Ÿ’ฐ Your Earning Path After This Unit

Primary Earning Avenue: Digital Electronics tutoring for engineering students and GATE aspirants.

Why this works: COA and Digital Electronics are compulsory subjects across all engineering branches (CSE, ECE, EEE, IT). Thousands of students struggle with flip-flops, K-maps, and counter design every semester.

Earning AvenueDescriptionRate
Peer TutoringHelp batchmates with Digital Electronics assignments, lab prep, and exam revisionโ‚น400โ€“600/hr
GATE CoachingTeach COA + Digital Logic to GATE aspirants. Focus on previous year questions.โ‚น600โ€“1000/hr
Online TutoringPlatforms: Chegg, Doubtnut, Vedantu (for competitive exams). Solve doubt questions.โ‚น300โ€“800/hr
YouTube / NotesCreate animated flip-flop tutorials, counter design walkthroughs. Monetize with ads.โ‚น5,000โ€“15,000/month (at 10K+ views)
Lab Assignment HelpHelp juniors with Verilog/VHDL lab programs (ethically โ€” teach, don't copy)โ‚น500โ€“1000/assignment
Internshala ProjectsDigital circuit simulation projects using Logisim or Proteusโ‚น2,000โ€“5,000/project

โฑ๏ธ Time to First Earning: 1โ€“2 weeks (start by tutoring your own classmates who are struggling with flip-flops)

The GATE coaching market in India is worth โ‚น4,000+ crore. Even micro-tutoring (solving 10 doubts/day on Chegg at โ‚น80/doubt) = โ‚น800/day = โ‚น24,000/month. Combined with peer tutoring, a student strong in digital electronics can easily earn โ‚น10,000โ€“25,000/month while still in college.
Portfolio builder: Create a "Digital Circuit Simulator" using Python (you started in Tier 3 lab). Upload to GitHub. This demonstrates both programming AND digital design skills โ€” impressive for VLSI internship applications at Intel, TI, or Qualcomm India.
Section K

Chapter Summary & Unit Map

๐Ÿ—บ๏ธ Unit 1 Summary โ€” Digital Systems at a Glance

Core Architecture: Every computer has 5 units โ€” Input, Output, Memory, ALU, and Control Unit โ€” connected by Data, Address, and Control buses.

Combinational Circuits (no memory, no clock):

  • Half Adder: S = AโŠ•B, C = AยทB (adds 2 bits)
  • Full Adder: S = AโŠ•BโŠ•Cin, Cout = AB + Cin(AโŠ•B) (adds 3 bits)
  • 4:1 MUX: Selects 1 of 4 inputs using 2 select lines. Universal logic element.
  • 2:4 Decoder: Activates 1 of 4 outputs. Each output = one minterm.
  • Encoder: Reverse of decoder. Priority encoder handles multiple active inputs.
  • Ripple Carry Adder: n Full Adders cascaded. Delay = O(n). Slow for large n.

Sequential Circuits (has memory, clock-driven):

  • SR FF: Set/Reset. Q(t+1) = S + R'Q. Invalid when S=R=1.
  • D FF: Data/Delay. Q(t+1) = D. Used in registers.
  • JK FF: Universal. Q(t+1) = JQ' + K'Q. Toggles when J=K=1.
  • T FF: Toggle. Q(t+1) = TโŠ•Q. Used in counters.
  • Register: Group of D FFs with common clock. Stores n-bit data.
  • Counter: Sequential counter using T/JK FFs. Mod-2โฟ for n-bit.

Key Formulas for GATE:

  • FFs needed for Mod-N counter: โŒˆlogโ‚‚NโŒ‰
  • RCA delay: 2n ร— gate_delay
  • 2โฟ:1 MUX select lines: n
  • n:2โฟ decoder outputs: 2โฟ minterms
  โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  โ•‘                  UNIT 1 โ€” CONCEPT MAP                       โ•‘
  โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
  โ•‘                                                              โ•‘
  โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ•‘
  โ•‘  โ”‚   DIGITAL        โ”‚      โ”‚   5-UNIT COMPUTER     โ”‚         โ•‘
  โ•‘  โ”‚   SYSTEMS        โ”‚โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   MODEL               โ”‚         โ•‘
  โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚   (Input, Output,     โ”‚         โ•‘
  โ•‘           โ”‚                โ”‚    Memory, ALU, CU)    โ”‚         โ•‘
  โ•‘           โ”‚                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ•‘
  โ•‘           โ”‚                                                  โ•‘
  โ•‘     โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  โ•‘     โ”‚            โ”‚                                          โ•‘
  โ•‘     โ–ผ            โ–ผ                                          โ•‘
  โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”                                       โ•‘
  โ•‘  โ”‚COMBI-โ”‚    โ”‚SEQU- โ”‚                                       โ•‘
  โ•‘  โ”‚NATIONโ”‚    โ”‚ENTIALโ”‚                                       โ•‘
  โ•‘  โ”‚AL    โ”‚    โ”‚      โ”‚                                       โ•‘
  โ•‘  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜                                       โ•‘
  โ•‘     โ”‚           โ”‚                                           โ•‘
  โ•‘  โ”Œโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”œโ”€โ”€ SR Flip-Flop                            โ•‘
  โ•‘  โ”œโ”€ Adders   โ”‚  โ”œโ”€โ”€ D Flip-Flop                             โ•‘
  โ•‘  โ”‚  (HA, FA) โ”‚  โ”œโ”€โ”€ JK Flip-Flop                            โ•‘
  โ•‘  โ”œโ”€ MUX      โ”‚  โ”œโ”€โ”€ T Flip-Flop                             โ•‘
  โ•‘  โ”œโ”€ Decoder  โ”‚  โ”œโ”€โ”€ Registers                               โ•‘
  โ•‘  โ”œโ”€ Encoder  โ”‚  โ””โ”€โ”€ Counters                                โ•‘
  โ•‘  โ””โ”€ RCA/CLA  โ”‚                                              โ•‘
  โ•‘              โ–ผ                                              โ•‘
  โ•‘     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ•‘
  โ•‘     โ”‚  APPLICATIONS               โ”‚                         โ•‘
  โ•‘     โ”‚  ISRO PSLV, Intel CPUs,     โ”‚                         โ•‘
  โ•‘     โ”‚  Qualcomm SoCs, ARM cores   โ”‚                         โ•‘
  โ•‘     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ•‘
  โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Section L

Earning Checkpoint โ€” Self-Assessment

Use this table to track your mastery and earning readiness for each skill learned in this unit:

Skill / TopicTool / MethodPortfolio PieceEarning Ready?
5-Unit Computer ModelConceptualโ€”โœ… Yes โ€” can explain in interviews/tutoring
Truth Tables & Gate DesignPen & Paper, PythonTruth Table Generator (Python)โœ… Yes โ€” tutor juniors โ‚น400โ€“600/hr
Combinational CircuitsAdders, MUX, DecoderFull Adder trace + 4-bit RCA designโœ… Yes โ€” GATE coaching โ‚น600โ€“1000/hr
Sequential CircuitsFlip-flops, Counters3-bit Counter Designโœ… Yes โ€” most-asked topic in exams
GATE Problem SolvingPrevious Year PapersSolved GATE problems with explanationsโœ… Yes โ€” online doubt-solving โ‚น80/doubt
Python Circuit SimulatorPython (itertools)GitHub project โ€” Truth Table Generatorโœ… Yes โ€” impressive for VLSI internships
Verilog/VHDL (Next Step)HDL codingโ€”โฌœ Not yet โ€” covered in Unit 3
Minimum Viable Earning Setup after this unit: Master flip-flop truth tables + counter design + GATE PYQs โ†’ start tutoring classmates and GATE aspirants โ†’ earn โ‚น10,000โ€“25,000/month while still in college. Add Python circuit simulator to GitHub โ†’ stand out in VLSI company interviews.

โœ… Unit 1 complete. Ready for Unit 2: Data Representation & Number Systems!

[QR: Link to EduArtha video tutorial โ€” Basics of Digital Systems]