All 10 questions UPSC has asked on memories and programmable logic in the Electrical Engineering Optional (Paper I, Digital Electronics) from 1996 to 2026, solved step by step – latest first.
Try them yourself first: the same questions, without solutions, are on our Digital Electronics topic-wise PYQs page. Circuit diagrams have been redrawn from the question papers.
How we check these solutions
These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:
- ✓ Checked by computer the numbers were worked out again independently in code (SymPy and NumPy: circuit equations, power balance, matrices, integrals).
- ✓ Answer checked step by step for theory and descriptive questions, every point was checked against the standard theory.
Where a printed question is wrong, unclear or incomplete, we say so and solve the intended version.
Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.
Jump to a question (year · question number):
2026 · 7a 2020 · 1e 2016 · 7a 2012 · 7a 2011 · 6c 2005 · 7a(iii) 2003 · 8a(ii) 2000 · 5b(i) 1997 · 6b 1996 · 12c
Design a Programmable Logic Array (PLA) for a combinational logic circuit that computes the square of 3-bit binary numbers. Determine the minimum number of product terms required and construct the corresponding PLA programming table for the implementation.
Solution
Truth table. Let the input be ( the MSB) and the output . The largest square is , so 6 output bits are needed.
| N | A | B | C | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 | 4 | 0 | 0 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 9 | 0 | 0 | 1 | 0 | 0 | 1 |
| 4 | 1 | 0 | 0 | 16 | 0 | 1 | 0 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 25 | 0 | 1 | 1 | 0 | 0 | 1 |
| 6 | 1 | 1 | 0 | 36 | 1 | 0 | 0 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 49 | 1 | 1 | 0 | 0 | 0 | 1 |
Simplified outputs. Reading each column (with small K-maps): Two facts make this easy: a square is odd only when N is odd, so ; and every square is 0 or 1 modulo 4, so is always 0.
Minimum number of product terms.
- , and need one term each: , , .
- is 1 only for N = 3 (011) and N = 5 (101). These differ in two bits, so they cannot be merged: two terms, and .
- is 1 for N = 4, 5, 7. That is not a single cube, so it needs two terms: (4, 5) and (5, 7).
- No term of one output can be reused by another without adding terms elsewhere.
So the PLA needs 7 product terms. A search over all term sets in code confirms that no 6-term set exists. The PLA is 3 inputs × 7 product terms × 6 outputs, with tied to 0.
PLA programming table. In the input columns, 1 means the true input is connected, 0 the complemented input, and – no connection. In the output columns, 1 means the term is connected to that OR gate.
| Term | Product | A | B | C | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | – | – | 1 | – | – | – | – | – | 1 | |
| 2 | – | 1 | 0 | – | – | – | 1 | – | – | |
| 3 | 0 | 1 | 1 | – | – | 1 | – | – | – | |
| 4 | 1 | 0 | 1 | – | – | 1 | – | – | – | |
| 5 | 1 | 0 | – | – | 1 | – | – | – | – | |
| 6 | 1 | – | 1 | – | 1 | – | – | – | – | |
| 7 | 1 | 1 | – | 1 | – | – | – | – | – |
Note: some PLA devices have a programmable inverter (XOR) on each output. With that option, outputs can be made from their complements, for example , and the count drops to 5 terms. For a plain AND–OR PLA, 7 is the answer.
✓ Checked by computer We built the truth table in code and searched every set of product terms to confirm that 7 is the minimum.
Implement the following Boolean functions with a 4 × 3 Programmable Logic Array (PLA): ; ;
Solution
Reading the question. We read “4 × 3 PLA” as a PLA with 4 inputs (A, B, C, D) and 3 outputs (, , ). The number of product terms is for us to keep small.
Minterms. Writing each function in minterms (A the MSB):
Sharing terms. Taken as printed, the functions need six different terms. But in covers minterms 8–11. Minterms 10 and 11 are exactly the terms (in ) and (in ), and 8, 9 are already inside . So which uses two terms the PLA must make anyway. Only 5 product terms are then needed:
| Term | Product | A | B | C | D | |||
|---|---|---|---|---|---|---|---|---|
| 1 | – | 0 | 0 | – | 1 | – | – | |
| 2 | 1 | 1 | 0 | – | – | 1 | – | |
| 3 | 1 | 0 | 1 | 0 | 1 | 1 | – | |
| 4 | 0 | 0 | 0 | 1 | – | – | 1 | |
| 5 | 1 | 0 | 1 | 1 | 1 | – | 1 |
Fewer is not possible. ’s minterms 1 and 11 have no neighbours in , so it needs two 4-literal terms. needs and (minterm 10 is isolated in ). still needs a term for minterms 0 and 8. So the PLA is 4 inputs × 5 product terms × 3 outputs.
✓ Checked by computer We checked in code that the five product terms give exactly the three functions, and that no 4-term PLA can.
What is a PLA? Realize the following functions using an appropriate PLA:
Solution
What is a PLA? A programmable logic array is a combinational device with:
- an AND array, in which each product term can be connected to any input or its complement, and
- an OR array, in which each output can be connected to any product term.
Both arrays are programmable, so any set of sum-of-products functions can be made, and a product term can be shared by several outputs. A PLA is described by its size: n inputs × k product terms × m outputs. In a PROM the AND array is fixed (a full decoder, all minterms). In a PAL the OR array is fixed. The PLA is the most flexible of the three.
Product terms. Each expression is already minimal. In , all three terms are needed: minterm 13 (1101) is covered only by , minterm 6 (0110) only by , and minterm 1 (0001) only by . No term appears in two functions, so we need 7 product terms. The PLA is 4 × 7 × 3.
| Term | Product | A | B | C | D | |||
|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | – | – | 1 | – | – | |
| 2 | – | – | 1 | 1 | 1 | – | – | |
| 3 | 0 | 1 | – | – | – | 1 | – | |
| 4 | 1 | 0 | – | – | – | 1 | – | |
| 5 | 1 | – | – | 1 | – | – | 1 | |
| 6 | – | 1 | 1 | – | – | – | 1 | |
| 7 | – | 0 | – | 1 | – | – | 1 |
✓ Checked by computer We checked in code that the seven terms realise the three functions and that no 6-term PLA can.
What would be the binary address for a memory system having a capacity of bits. For the above memory system, what is the decimal address for the binary address 1011001101? What is the address in hexadecimal?
Solution
Reading the question. The printed “ bits” is a misprint for 1024 bits, a standard memory size.
Address length. Each bit needs its own address. , so the address is 10 bits long. The addresses run from
Decimal value of 1011001101.
Hexadecimal. Group the bits in fours from the right: , that is 2, C, D. So the address is 2CD H. Check: .
Note: if the 1024 bits were arranged as 128 bytes (128 × 8), only address bits would be needed. The question asks for bit addresses, so 10 bits is the answer.
✓ Checked by computer We checked the conversions in code.
Write the full form of FPGA and explain why it is useful for prototyping of digital circuits.
Solution
Full form. FPGA stands for Field-Programmable Gate Array. “Field-programmable” means the user configures it after manufacture, at their own bench, not at the chip factory.
What it contains.
- Configurable logic blocks (CLBs): each has small look-up tables (LUTs, typically 4–6 inputs) that can make any function of their inputs, plus flip-flops for sequential logic.
- Programmable interconnect: routing channels and switch boxes that join the blocks in any pattern.
- I/O blocks around the edge, configurable for different voltage standards.
- In modern devices, also block RAM, multipliers (DSP blocks), clock managers and even processor cores.
The configuration is held in SRAM cells (in most FPGAs) and is loaded from a flash memory at power-up.
Why it is useful for prototyping.
- No fabrication step. A design written in VHDL or Verilog is synthesised, placed and routed, and loaded as a bit-stream in minutes. An ASIC needs masks and weeks or months in a foundry.
- Reprogrammable. If a bug is found, we change the code and reload the same chip. Many design iterations cost nothing extra.
- Real hardware at real speed. The circuit runs at tens to hundreds of MHz with real inputs and outputs. This finds timing and interface problems that simulation misses, and is far faster than simulating a large design.
- Low cost for small numbers. There are no mask (NRE) costs, so one or a few boards are cheap.
- Debugging aids. Internal signals can be watched with embedded logic analysers, and test logic can be added and removed freely.
- Path to production. The same HDL code can later be moved to an ASIC for volume production, or the FPGA itself can be shipped in low-volume products.
So FPGAs let a designer try out, test and correct a digital system in real hardware quickly and cheaply before committing it to silicon.
✓ Answer checked step by step We checked each point against standard descriptions of FPGA architecture and the design flow.
Using a bipolar PROM, implement the following equations simultaneously: ; ;
Solution
Size of the PROM. A 32 × 8 PROM has words, so it has 5 address inputs , and 8 data outputs –. Each function of 5 variables is one output column. We use , , , and leave – unused (programmed 0).
Inside, the 5-to-32 decoder makes all 32 minterms (fixed AND array). The programmable OR array connects each minterm to the outputs that need it.
Programming table. Only the 17 addresses where at least one function is 1 are shown. All other words, and – everywhere, hold 0.
| Address (decimal) | () | () | () | |
|---|---|---|---|---|
| 0 | 00000 | 1 | 0 | 0 |
| 1 | 00001 | 1 | 0 | 0 |
| 2 | 00010 | 0 | 1 | 0 |
| 3 | 00011 | 1 | 1 | 0 |
| 4 | 00100 | 0 | 1 | 0 |
| 5 | 00101 | 1 | 0 | 0 |
| 7 | 00111 | 1 | 1 | 0 |
| 8 | 01000 | 0 | 0 | 1 |
| 9 | 01001 | 0 | 0 | 1 |
| 11 | 01011 | 0 | 1 | 1 |
| 12 | 01100 | 0 | 1 | 0 |
| 13 | 01101 | 0 | 0 | 1 |
| 15 | 01111 | 0 | 1 | 0 |
| 20 | 10100 | 0 | 0 | 1 |
| 21 | 10101 | 1 | 0 | 0 |
| 23 | 10111 | 0 | 0 | 1 |
| 26 | 11010 | 0 | 1 | 0 |
Programming a bipolar PROM. A bipolar PROM stores each bit as a small fuse link (nichrome or titanium–tungsten) in series with a transistor. As supplied, every fuse is intact. During programming, a current pulse blows the fuses at the bit positions that must change (for example, every position where the table shows 0, if an intact fuse reads as 1). It can be programmed only once. No minimisation is needed, because the PROM makes every minterm anyway.
✓ Checked by computer We listed the minterms of all three functions in code and built the PROM table from them.
It is desired to generate the following three Boolean functions ; ; By using an OR gate array as shown in Figure, where to are the product terms in one or more of the variables, and . Write down the terms , , , and .
Solution
Minterms of the three functions (a the MSB):
What the OR array needs. From the figure, , and . So each function must be written as a sum of just two product terms, and and must share one of them.
and . On a K-map, splits only into and . splits into and . The common term is :
. splits into and :
Answer. ( and can be swapped; , , are the only choice.)
✓ Checked by computer We checked in code that the five terms give all three functions, and that the choice of P1, P2 and P3 is unique.
This question has the following parts.
(i) Design a combinational circuit having 3 inputs and 6 outputs with the condition that the output number is square of the input number.
(ii) A computer uses RAM chips of capacity 1024 × 1. How many chips are required and how their address and data bus be connected to provide a memory capacity of 1024 bytes? How chips would be connected to provide memory of 16 K bytes?
Solution
(i) Squaring circuit. With input ( the MSB) and output , the truth table is:
| N | A B C | ||
|---|---|---|---|
| 0 | 000 | 0 | 000000 |
| 1 | 001 | 1 | 000001 |
| 2 | 010 | 4 | 000100 |
| 3 | 011 | 9 | 001001 |
| 4 | 100 | 16 | 010000 |
| 5 | 101 | 25 | 011001 |
| 6 | 110 | 36 | 100100 |
| 7 | 111 | 49 | 110001 |
Simplifying each output column: is always 0 because every square is 0 or 1 modulo 4. The circuit needs two inverters, four AND gates, one XOR and one OR gate:
The same table can also be stored in an 8 × 4 ROM (for , , , ), with and wired directly.
(ii) Memory from 1024 × 1 RAM chips.
1024 bytes (1 KB). We need bits, but each chip gives . So we need connected side by side. All 8 chips share the 10 address lines – (), the chip select and the read/write line. Each chip supplies one bit of the byte, so chip k is connected to data line .
16 KB. We need bits, so They are arranged as 16 banks of 8 chips; each bank is a 1 KB block like the one above.
- The address now needs lines.
- – go to every chip and select the location inside a chip.
- – go to a 4-to-16 decoder. Each decoder output drives the chip-select of all 8 chips in one bank, so only one bank is active at a time.
- Chip k of every bank is connected to data line . The inactive banks keep their outputs in the high-impedance state.
✓ Checked by computer We checked the squaring equations against all eight inputs and the chip counts in code.
Name the different types of Read- Only-Memories and briefly discuss their attributes in terms of programmability volatility, erasability, technology used and utility.
Solution
A read-only memory (ROM) keeps its data when the power is off. The types differ in how and how often the data can be written.
| Type | Programmed by | Erasable? | Technology | Typical use |
|---|---|---|---|---|
| Mask ROM | Manufacturer, with a custom metal mask | No | MOS or bipolar; a transistor is present or absent at each bit | Large volumes of fixed code: character generators, firmware in mass products |
| PROM | User, once, with a PROM programmer | No (one-time) | Bipolar fuse links (or antifuses); a fuse is blown to change a bit | Small runs, prototypes, look-up tables, logic functions |
| EPROM | User, electrically | Yes, whole chip, by UV light through a quartz window (about 15–20 min) | MOS floating-gate transistor (FAMOS); trapped charge stores a bit | Development and low-volume firmware |
| EEPROM (E²PROM) | User, electrically, in circuit | Yes, electrically, byte by byte (about 10⁵–10⁶ cycles) | Floating gate with thin tunnel oxide (FLOTOX) | Settings, calibration data, small non-volatile stores |
| Flash | User, electrically, in circuit | Yes, electrically, in blocks | One-transistor floating-gate cell (NOR or NAND) | Firmware, memory cards, solid-state drives |
Attributes in brief.
- Volatility: all are non-volatile; data stay for years without power.
- Programmability: fixed at the factory (mask ROM), once by the user (PROM), or many times by the user (EPROM, EEPROM, flash).
- Erasability: none for mask ROM and PROM; UV erasure of the whole chip for EPROM; electrical erasure for EEPROM (byte) and flash (block). Writing is much slower than reading for all of them.
- Technology and density: mask ROM and flash are the densest and cheapest per bit; EEPROM needs two transistors per cell, so it is less dense and dearer.
- Utility: mask ROM for proven code made in volume; PROM and EPROM where code changes occasionally; EEPROM and flash where data must be updated in the field.
✓ Answer checked step by step We checked each entry against the standard descriptions of these memory types.
Explain what you understand by: (i) MMIC (ii) MOSFET (iii) NMOS Growth (iv) CMOS Development (v) RAM Device (vi) SRAM Cell (vii) DRAM Cell.
Solution
(i) MMIC – Monolithic Microwave Integrated Circuit. An IC that works at microwave frequencies (about 300 MHz to 300 GHz). All the active devices (GaAs MESFETs or HEMTs, HBTs) and passive parts (thin-film resistors, MIM capacitors, spiral inductors, microstrip lines) are made on one semi-insulating substrate, usually GaAs. MMICs are small, light, reproducible and need no tuning. They are used as low-noise amplifiers, power amplifiers, mixers, oscillators and switches in radar, satellite links and mobile phones.
(ii) MOSFET – Metal-Oxide-Semiconductor Field-Effect Transistor. A gate electrode sits on a thin SiO₂ layer over the channel between source and drain. The gate voltage controls the channel charge, and so the drain current, through the electric field; almost no gate current flows (input resistance about Ω or more). In an enhancement n-MOSFET, a channel forms only when ; a depletion MOSFET has a channel at . In saturation, . MOSFETs are small and simple to make, so they are the basic device of digital ICs.
(iii) NMOS growth. Early MOS ICs used p-channel (PMOS) devices. In the 1970s n-channel (NMOS) technology replaced PMOS, because electrons have about 2–3 times the mobility of holes: NMOS gates were faster and smaller. With silicon-gate processes and depletion-mode load transistors, NMOS made the first large LSI chips possible: microprocessors such as the 8080, 8085 and Z80, and the early DRAMs. Its weakness is static power: a gate with its output low draws current all the time, which limits how many gates fit on one chip.
(iv) CMOS development. Complementary MOS (CMOS), invented in 1963, pairs a p-MOSFET and an n-MOSFET so that in either logic state one of them is off. Static current is therefore almost zero; power is drawn mainly while switching (). CMOS also has rail-to-rail outputs and good noise margins. It was first used in watches and calculators. As chips grew to millions of gates in the 1980s, NMOS power became a problem, and CMOS took over almost all digital ICs: processors, memories and ASICs. Device scaling has kept CMOS the dominant technology since.
(v) RAM device. Random-access memory is read/write memory in which any location can be reached in the same time, by its address. A RAM has address lines, data lines and control lines (chip select, read/write). It is volatile: data are lost when the power is removed. The two kinds are static RAM (SRAM) and dynamic RAM (DRAM).
(vi) SRAM cell. Each bit is held in a latch of two cross-coupled CMOS inverters (four transistors). Two access transistors, switched on by the word line, connect the latch to the bit lines BL and . This makes the six-transistor (6T) cell. The data stay as long as power is on, with no refresh. SRAM is fast but takes more area per bit, so it is used for cache memory and registers.
(vii) DRAM cell. Each bit is stored as charge on a small capacitor, reached through one access transistor (the 1T-1C cell). The word line turns on the transistor and the bit line reads or writes the charge. Reading destroys the stored charge, so the sense amplifier rewrites it. The charge also leaks away, so every cell must be refreshed every few milliseconds. The cell is very small, so DRAM gives the highest density and lowest cost per bit; it is used for main memory.
✓ Answer checked step by step We checked each note against the standard device and memory-cell descriptions.
More on Digital Electronics
- All Electrical Engineering PYQ solutions, topic by topic
- Digital Electronics topic-wise PYQs (questions only, for practice)
- Electrical Engineering PYQ analysis: which units carry the marks year by year
- Year-wise question papers
- Electrical Engineering booklist
Questions: UPSC Civil Services (Main) Examination, Electrical Engineering Paper I, 1996–2026. Solutions: Optional Province. Found an error? Tell us.

