Electronics and Communication Engineering‹›⌂ 0:00 studied

Module 3 · 12 min read · Free chapter

Data converters and semiconductor memories

In short

An n-bit converter has a step of full scale divided by 2ⁿ and an ideal SNR of about 6.02n + 1.76 dB. R-2R ladders make accurate DACs with only two resistor values. A flash ADC is fastest, a SAR ADC takes n clocks and a dual-slope ADC is slow but very accurate. SRAM uses six transistors per bit, while DRAM uses one transistor and a capacitor and needs refresh.

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: crossing between analog and digital

The world is analog. Sound pressure, temperature and light vary smoothly, and so do the voltages from microphones and sensors. Processors, however, work only with numbers.

An analog-to-digital converter (ADC) measures a voltage and turns it into a binary number. A digital-to-analog converter (DAC) turns a number back into a voltage. Every phone call, music file, digital camera and smart meter depends on this pair.

The numbers must be stored somewhere. Semiconductor memories hold them, either permanently in ROM and flash, or temporarily and very fast in SRAM and DRAM.

This chapter covers sampling and quantisation, the main DAC and ADC types, and how each kind of memory stores a bit.

Why it matters. GATE EC asks resolution, ADC conversion time or a DAC output almost every year, and memory organisation questions appear in both EC and CS papers.

Sampling, quantisation and resolution

Converting a signal to digital involves two steps. Sampling measures it at regular instants, and quantisation rounds each measurement to the nearest of a fixed set of levels.

The sampling rate must be high enough. The Nyquist criterion says a signal with highest frequency fmaxf_{max} must be sampled at:

fs>2fmaxf_s > 2 f_{max}

If it is sampled more slowly, high frequencies fold down and appear as false low frequencies, called aliasing. An analog low-pass anti-aliasing filter before the ADC removes frequencies above fs2\dfrac{f_s}{2}. CD audio samples at 44.1 kHz to capture sound up to about 20 kHz. Sampling is treated fully in the signals chapters.

While the ADC works, the input must not change. A sample-and-hold circuit, a switch, a capacitor and a buffer, tracks the input and then freezes it. Its main specs are the acquisition time to charge the capacitor, the droop as charge leaks during hold and the aperture time uncertainty when the switch opens.

An nn-bit converter divides its full-scale range VFSV_{FS} into 2n2^n levels. The step between levels is the resolution, or one LSB:

Δ=VFS2n\Delta = \frac{V_{FS}}{2^n}

Some texts use 2n−12^n - 1 in the denominator when the top code is defined to equal full scale; read the question's definition. Rounding to the nearest level gives a quantisation error of at most ±Δ2\pm\dfrac{\Delta}{2}. For a full-scale sine wave, the best possible signal-to-noise ratio is:

SNR≈6.02n+1.76 dB\mathit{SNR} \approx 6.02n + 1.76\ \text{dB}

Each extra bit adds about 6 dB.

Worked example. A 10-bit ADC with a 0 to 5 V range has a step of 51024≈4.9\dfrac{5}{1024} \approx 4.9 mV, a maximum quantisation error of about 2.4 mV, and an ideal SNR of about 62 dB.

Why it matters. Resolution, error and SNR per bit are among the most asked converter facts.

Digital-to-analog converters

A DAC adds up weighted contributions, one per bit. The most significant bit is worth half of full scale, the next a quarter, and so on.

The binary-weighted resistor DAC uses a summing op-amp with input resistors RR, 2R2R, 4R4R, …, 2n−1R2^{n-1}R, each switched to VrefV_{ref} or ground by one bit. It is easy to understand but hard to build. An 8-bit version needs resistors spanning 128 to 1, all matched to better than one part in 256. Such a spread is impractical on a chip.

The R-2R ladder DAC solves this. It uses only two values, R and 2R. At every node of the ladder the resistance looking to the right is 2R, so the current splits equally in two at each node. Each bit's switch therefore receives half the current of the bit before it. For the inverting op-amp form:

vo=−Vref RfR(b12+b24+⋯+bn2n)v_o = -V_{ref}\,\frac{R_f}{R}\left(\frac{b_1}{2} + \frac{b_2}{4} + \cdots + \frac{b_n}{2^n}\right)

Here b1b_1 is the MSB. Matching two values is easy, so R-2R ladders are standard in integrated DACs.

DAC quality is described by its resolution, its settling time to within ½ LSB of the final value, and its linearity. A monotonic DAC never gives a lower output for a higher code, which matters in control loops.

Worked example. A 4-bit R-2R DAC with Vref=10V_{ref} = 10 V and Rf=RR_f = R receives code 1010. The output is −10(12+18)=−6.25-10\left(\dfrac{1}{2} + \dfrac{1}{8}\right) = -6.25 V.

Why it matters. DAC output for a given code and the reason R-2R is preferred are standard questions.

Analog-to-digital converters

ADCs trade speed against size and accuracy. Four types cover most of the range.

The flash ADC compares the input with every level at once. A resistor string makes 2n−12^n - 1 reference voltages, and 2n−12^n - 1 comparators each say whether the input is above their level. An encoder turns this thermometer code into binary.

Conversion takes one step, so flash ADCs are the fastest, used in oscilloscopes and radar. But an 8-bit flash needs 255 comparators, and the count doubles with every bit.

The successive-approximation ADC (SAR) plays a guessing game. It sets the MSB of a register, converts the register with an internal DAC and compares with the input. If the DAC output is too high, the bit is cleared; otherwise it stays. Then it moves to the next bit.

This is a binary search, and it finishes in nn clock cycles whatever the input. SAR ADCs give a good balance of speed, power and size, and they are the most common type in microcontrollers.

The dual-slope ADC integrates the input for a fixed time T1T_1, then integrates a known reference of opposite sign until the integrator returns to zero, counting the time T2T_2. Then:

Vin=Vref T2T1V_{in} = V_{ref}\,\frac{T_2}{T_1}

The result depends only on the ratio of times, not on the exact R and C, so it is very accurate. If T1T_1 is a whole number of mains cycles, 50 Hz hum averages out. It is slow, but ideal for digital multimeters.

The counter-ramp ADC counts up, converting the count with a DAC, until the DAC output passes the input. It can take up to 2n2^n clocks, so it is slow. A tracking variant counts up or down to follow the input.

High-resolution audio converters use the sigma-delta type, which samples very fast with a 1-bit quantiser and filters digitally.

Type Conversion time Comparators Typical use
Flash 1 cycle 2n−12^n - 1 Very fast, low resolution
SAR n cycles 1 General purpose, microcontrollers
Dual-slope Many ms 1 Meters, high accuracy
Counter-ramp Up to 2n2^n cycles 1 Simple, slow

Worked example. A 12-bit SAR ADC clocked at 1 MHz needs 12 µs per conversion. A counter-ramp ADC of the same resolution may need up to 4096 µs.

Why it matters. Comparator counts, SAR conversion time and dual-slope behaviour are favourite GATE and ESE questions.

Memory organisation and read-only memories

A memory is an array of cells, each holding one bit, arranged in words. A memory with 2m2^m words of nn bits is written 2m×n2^m \times n. It has mm address lines, which a decoder turns into one selected row, and nn data lines. Its capacity is 2m×n2^m \times n bits.

Larger memories are built from smaller chips in two ways. To widen the word, chips are connected in parallel, sharing address lines and supplying different data bits. To add more words, chips share the data lines, and the extra high-order address bits go to a decoder that enables one chip at a time.

Read-only memories keep their contents without power, so they are non-volatile. A mask ROM is programmed when the chip is made, and is the cheapest for large volumes. A PROM has fuses that the user blows once.

An EPROM stores charge on a floating gate, an isolated polysilicon layer inside a MOSFET's gate oxide. Trapped electrons raise the threshold voltage, which reads as a stored bit. Ultraviolet light through a quartz window erases the whole chip.

An EEPROM erases electrically, byte by byte, by tunnelling electrons off the floating gate. Flash memory uses the same principle but erases in large blocks, which makes the cells smaller and cheaper. NAND flash chains cells in series for the highest density and is used in phones, pen drives and SSDs. NOR flash allows fast random reads and is used to store program code.

Worked example. A memory with 16 address lines and 8 data lines holds 216×8=524,2882^{16} \times 8 = 524{,}288 bits, or 64 KB. Building it from 16K × 8 chips needs four chips and a 2-to-4 decoder on the top two address lines.

Why it matters. Address-line counts, chip counts and ROM types are quick GATE and JE questions.

SRAM and DRAM

Read-write memories that lose their data when power is removed are volatile. Two kinds dominate.

A static RAM (SRAM) cell is a tiny latch: two cross-coupled CMOS inverters holding a bit, plus two access transistors that connect it to a pair of bit lines when the word line is raised. That is six transistors per bit, the 6T cell. It holds its data as long as power is on, with no refresh, and it reads and writes in a nanosecond or less. Its size makes it expensive, so SRAM is used for processor caches and registers.

A dynamic RAM (DRAM) cell is one transistor and one capacitor, the 1T1C cell. A charged capacitor is a 1 and an empty one is a 0. The cell is four to six times smaller than SRAM, so DRAM gives gigabytes cheaply and is used for main memory.

The price is that the capacitor leaks. Every row must be read and rewritten, or refreshed, typically every 64 ms. Reading is also destructive: the tiny charge is shared with the much larger bit line, a sense amplifier detects the small voltage change, and the value is then written back. DRAM is therefore slower than SRAM and needs a memory controller.

Property SRAM DRAM
Cell 6 transistors 1 transistor + 1 capacitor
Refresh Not needed Needed, about every 64 ms
Speed Faster Slower
Density and cost Low density, high cost per bit High density, low cost per bit
Use Caches, registers Main memory

Why it matters. The SRAM and DRAM comparison, refresh and cell structure are standard GATE and ESE questions.

Descriptive lens: how this topic is asked in written papers

Written papers ask this topic in four ways:

  1. Explain the working of an R-2R DAC, a SAR ADC or a dual-slope ADC, with diagrams.
  2. Compare ADC types for speed, accuracy and hardware, or SRAM with DRAM.
  3. Compute resolution, quantisation error, SNR, DAC output or conversion time.
  4. Design a memory of a given size from smaller chips, showing the address decoding.

Practice questions (our own, not previous-year questions).

  1. Explain the working of a successive-approximation ADC with a block diagram, and show the steps for converting 6.3 V on a 4-bit, 0 to 16 V converter. (15 marks)
  2. Why is a dual-slope ADC insensitive to the exact values of R and C, and how does it reject mains interference? (10 marks)
  3. Design a 64K × 16 memory from 16K × 8 chips. How many chips are needed and how is the decoding arranged? (10 marks)

Answer plan for question 3.

  • Note that two 16K × 8 chips in parallel make one 16K × 16 bank.
  • Note that four banks are needed for 64K words, so eight chips in all.
  • Assign 16 address lines: the lower 14 go to every chip and the upper 2 go to a 2-to-4 decoder.
  • Connect each decoder output to the chip-select of both chips in one bank.
  • Draw the data bus: one chip of each pair drives D15-D8 and the other D7-D0.

Quick revision

  • An n-bit step is VFS2n\dfrac{V_{FS}}{2^n}, the error is at most ±12\pm\dfrac{1}{2} LSB, and SNR is about 6.02n+1.766.02n + 1.76 dB.
  • Sampling needs fs>2fmaxf_s > 2f_{max}, and a sample-and-hold freezes the input during conversion.
  • A weighted DAC needs a wide resistor spread, while R-2R uses two values and halves the current at each node.
  • A flash ADC uses 2n−12^n - 1 comparators and one step, and a SAR ADC takes n clocks by binary search.
  • A dual-slope ADC gives Vin=VrefT2T1V_{in} = V_{ref}\dfrac{T_2}{T_1} and is accurate and rejects hum, while a counter-ramp takes up to 2n2^n clocks.
  • A 2m×n2^m \times n memory has m address lines and n data lines.
  • In ROM types, EPROM erases by UV, EEPROM by byte and flash by block.
  • SRAM is a 6T latch with no refresh, while DRAM is 1T1C, needs refresh and reads destructively.

Check yourself

Exam-style questions on this chapter. Pick an answer to see the explanation. 0 of 12 answered

  1. An 8-bit ADC has a full-scale range of 0 to 2.56 V. Its resolution (one LSB, taking the step as full scale over 2n2^n) is:

  2. The ideal signal-to-quantisation-noise ratio of a 12-bit converter for a full-scale sine is about:

  3. A signal band-limited to 4 kHz must be sampled at a rate of more than:

  4. Why is the R-2R ladder preferred over the binary-weighted resistor DAC in integrated circuits?

  5. A 4-bit R-2R DAC (inverting, Rf=RR_f = R, Vref=8V_{ref} = 8 V) receives code 0110. The output is:

  6. How many comparators does a 6-bit flash ADC need?

  7. A 10-bit successive-approximation ADC runs on a 2 MHz clock (one bit per clock). Its conversion time is:

  8. Which ADC type is most suited to a digital multimeter that must reject 50 Hz mains pickup?

  9. A memory chip is organised as 4K × 8. The numbers of address and data lines are:

  10. How many 1K × 4 chips are needed to build a 4K × 8 memory?

  11. Which memory is erased electrically in large blocks and used in pen drives and SSDs?

  12. Why must DRAM be refreshed periodically?

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

Frequently asked questions

How many comparators does an n-bit flash ADC need?

2ⁿ − 1, so an 8-bit flash needs 255, which is why flash converters are used only at low resolution.

Why is a dual-slope ADC accurate?

Its result depends only on the ratio of two times measured with the same clock and integrator, so the exact R, C and clock values cancel out.

Why does DRAM need refresh?

Each bit is charge on a tiny capacitor that leaks within milliseconds, so every row is read and rewritten about every 64 ms.

How many address lines does a 64K × 8 memory need?

Sixteen, because 64K is 2¹⁶ words; it also has 8 data lines.

More in this module: Digital circuits

Official sources

Facts in this chapter were checked against these official sources.

  1. GATE 2026 Electronics and Communication Engineering (EC) syllabus, IIT Guwahati
  2. NPTEL Digital Electronic Circuits (IIT Kharagpur, 108105132): ADC, DAC and memory lectures