0% found this document useful (0 votes)
8 views

8. Memory Elements

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

8. Memory Elements

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Memory Elements

RAM ............................................................................................................................................................. 2
Function of RAM ...................................................................................................................................... 3
How does RAM work? ............................................................................................................................. 3
How much RAM do we need? .................................................................................................................. 3
Types of RAM .......................................................................................................................................... 4
History of RAM: RAM vs. SDRAM ........................................................................................................ 5
GDDR SDRAM ................................................................................................................................... 5
RAM vs. virtual memory .................................................................................................................... 5
RAM vs. flash memory ...................................................................................................................... 6
RAM vs. ROM ..................................................................................................................................... 6
Trends and future directions ............................................................................................................. 6
ROM ............................................................................................................................................................. 7
Types of ROM .......................................................................................................................................... 7
How does ROM work? ............................................................................................................................. 8
ROM vs. RAM .......................................................................................................................................... 8
Advantages of ROM ................................................................................................................................. 8
EPROM ......................................................................................................................................................... 9
EEPROM explained ........................................................................................................................... 9
EEPROM transistors ................................................................................................................................. 9
Static and Dynamic Access Memories.......................................................................................................... 9
Magnetic Disk ............................................................................................................................................. 10
Digital Recording Techniques .................................................................................................................... 11
A Digital Recording/Processing System ................................................................................................. 12
Analog to Digital (A/D) Conversion ........................................................................................................... 16
References ................................................................................................................................................... 19

1
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Classification of Computer Memory

Computer
Memory

Internal/Ma External
in/Primary /Secondary

ROM (Non RAM


Cache HDD
Volatile) (Volatile)

DRAM SDRAM SRAM SSD

Compact
DDR1
Disc

USB Flash
DDR2
Drive

DDR3

DDR4

DDR5

RAM

RAM (Random Access Memory) is the hardware in a computing


device where the operating system (OS), application programs, and
data in current use are kept so they can be quickly reached by the
device's processor. RAM is the main memory in a computer. It is
much faster to read from and write to than other kinds of storage,
such as a hard disk drive (HDD), solid-state drive (SSD) or optical
drive.
Random Access Memory is volatile. That means data is retained in
RAM as long as the computer is on, but it is lost when the computer
is turned off. When the computer is rebooted, the OS and other files
are reloaded into RAM, usually from an HDD or SSD.

2
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Function of RAM
Because of its volatility, RAM can't store permanent data. RAM can be compared to a person's short-term
memory and a hard disk drive to a person's long-term memory. Short-term memory is focused on immediate
work, but it can only keep a limited number of facts in view at any one time. When a person's short-term
memory fills up, it can be refreshed with facts stored in the brain's long-term memory.
A computer also works this way. If RAM fills up, the computer's processor must repeatedly go to the hard
disk to overlay the old data in RAM with new data. This process slows the computer's operation.
A computer's hard disk can become completely full of data and unable to take anymore, but RAM won't
run out of memory. However, the combination of RAM and storage memory can be completely used up.

How does RAM work?


The term random access as applied to RAM comes from the fact that any storage location, also known as
any memory address, can be accessed directly. Originally, the term Random Access Memory was used to
distinguish regular core memory from offline memory.
Offline memory typically referred to magnetic tape from which a specific piece of data could only be
accessed by locating the address sequentially, starting at the beginning of the tape. RAM is organized and
controlled in a way that enables data to be stored and retrieved directly to and from specific locations.
Other types of storage -- such as the hard drive and CD-ROM-- are also accessed directly or randomly, but
the term random access isn't used to describe these other types of storage.
RAM is similar in concept to a set of boxes in which each box can hold a 0 or a 1. Each box has a unique
address that is found by counting across the columns and down the rows. A set of RAM boxes is called
an array, and each box is known as a cell.
To find a specific cell, the RAM controller sends the column and row address down a thin electrical line
etched into the chip. Each row and column in a RAM array has its own address line. Any data that's read
flows back on a separate data line.
RAM is physically small and stored in microchips. It's also small in terms of the amount of data it can hold.
A typical laptop computer may come with 8 gigabytes of RAM, while a hard disk can hold 10 terabytes.
A hard drive, on the other hand, stores data on the magnetized surface of what looks like a vinyl record.
Alternatively, an SSD stores data in memory chips that, unlike RAM, are nonvolatile. They don't depend
on having constant power and won't lose data once the power is turned off. RAM microchips are gathered
together into memory modules. These plug into slots in a computer's motherboard. A bus, or a set of
electrical paths, is used to connect the motherboard slots to the processor.
Most PCs enable users to add RAM modules up to a certain limit. Having more RAM in a computer cuts
down on the number of times the processor must read data from the hard disk, an operation that takes longer
than reading data from RAM. RAM access time is in nanoseconds, while storage memory access time is
in milliseconds.

How much RAM do we need?


The amount of RAM needed all depends on what the user is doing. When video editing, for example, it's
recommended that a system have at least 16 GB RAM, though more is desirable. For photo editing using
Photoshop, Adobe recommends a system have at least 3GB of RAM to run Photoshop CC on a Mac.

3
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
However, if the user is working with other applications at the same time, even 8GB of RAM can slow things
down.

Types of RAM
RAM comes in two primary forms:
1. Dynamic Random Access Memory (DRAM) makes up the typical computing device's RAM, and
as was previously noted, it needs that power to be on to retain stored data.
Each DRAM cell has a charge or lack of charge held in an electrical capacitor. This data must be
constantly refreshed with an electronic charge every few milliseconds to compensate for leaks from
the capacitator. A transistor serves as a gate, determining whether a capacitor's value can be read
or written.

2. Static Random Access Memory (SRAM) also needs constant power to hold onto data, but it
doesn't need to be continually refreshed the way DRAM does.
In SRAM, instead of a capacitor holding the charge, the transistor acts as a switch, with one position
serving as 1 and the other position as 0. Static RAM requires several transistors to retain one bit of
data compared to dynamic RAM which needs only one transistor per bit. As a result, SRAM chips
are much larger and more expensive than an equivalent amount of DRAM.
However, SRAM is significantly faster and uses less power than DRAM. The price and speed differences
mean static RAM is mainly used in small amounts as cache memory inside a computer's processor.

4
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
History of RAM: RAM vs. SDRAM
RAM was originally asynchronous because the RAM
microchips had a different clock speed than the
computer's processor. This was a problem as processors
became more powerful and RAM couldn't keep up with
the processor's requests for data.
In the early 1990s, clock speeds were synchronized with
the introduction of synchronous dynamic RAM,
or SDRAM. By synchronizing a computer's memory
with the inputs from the processor, computers were able
to execute tasks faster.
However, the original single data rate SDRAM (SDR
SDRAM) reached its limit quickly. Around the year
2000, double data rate synchronous Random Access
Memory (DDR SRAM) was developed. This moved
data twice in a single clock cycle, at the start and the
end.
DDR SDRAM has evolved into DDR2, DDR3, DDR4,
and DDR5. Each iteration has brought improved data
throughput speeds and reduced power use. However,
each DDR version has been incompatible with earlier
ones because, with each iteration, data is handled in
larger batches.

GDDR SDRAM
Graphics double data rate (GDDR) SDRAM is used in graphics and video cards. Like DDR SDRAM, the
technology enables data to be moved at various points in a CPU clock cycle. However, it runs at higher
voltages and has less strict timing than DDR SDRAM.
With parallel tasks, such as 2D and 3D video rendering, tight access times aren't as necessary, and GDDR
can enable the higher speeds and memory bandwidth needed for GPU performance.
Similar to DDR, GDDR has gone through several generations of development, with each providing more
performance and lower power consumption. GDDR6 is the latest generation of graphics memory.

RAM vs. virtual memory


A computer can run short on memory, especially when running multiple programs simultaneously.
Operating systems can compensate for physical memory shortfalls by creating virtual memory.
With virtual memory, data is temporarily transferred from RAM to disk storage, and virtual address space
is increased using active memory in RAM and inactive memory in an HDD to form contiguous addresses
that hold an application and its data. Using virtual memory, a system can load larger programs or multiple
programs running at the same time, letting each operate as if it has infinite memory without having to add
more RAM.

5
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Virtual memory is able to handle twice as many addresses as RAM. A program's instructions and data are
initially stored at virtual addresses, and once the program is executed, those addresses are turned into actual
memory addresses.
One downside to virtual memory is that it can slow a computer because data must be mapped between the
virtual and physical memory. With physical memory alone, programs work directly from RAM.

RAM vs. flash memory


Flash memory and RAM are both comprised of solid-state chips. However, they play different roles in
computer systems because of differences in the way they're made, their performance specifications and
cost. Flash memory is used for storage memory. RAM is used as active memory that performs calculations
on the data retrieved from storage.
One significant difference between RAM and flash memory is that data must be erased from NAND flash
memory in entire blocks. This makes it slower than RAM, where data can be erased in individual bits.
However, NAND flash memory is less expensive than RAM, and it's also nonvolatile. Unlike RAM, it can
hold data even when the power is off. Because of its slower speed, nonvolatility and lower cost, flash is
often used for storage memory in SSDs.

RAM vs. ROM


Read-only memory, or ROM, is computer memory containing data that can only be read, not written to.
ROM contains boot-up programming that is used each time a computer is turned on. It generally can't be
altered or reprogrammed.
The data in ROM is nonvolatile and isn't lost when the computer power is turned off. As a result, read-only
memory is used for permanent data storage. Random Access Memory, on the other hand, can only hold
data temporarily. ROM is generally several megabytes of storage, while RAM is several gigabytes.

Trends and future directions


Resistive Random Access Memory (RRAM or ReRAM) is nonvolatile storage that can alter the resistance
of the solid dielectric material it's composed of. ReRAM devices contain a memristor in which the
resistance varies when different voltages are applied.
ReRAM creates oxygen vacancies, which are physical defects in a layer of oxide material. These vacancies
represent two values in a binary system, similar to a semiconductor's electrons and holes.
ReRAM has a higher switching speed compared to other nonvolatile storage technologies, such as NAND
flash. It also holds the promise of high storage density and less power consumption than NAND flash. This
makes ReRAM a good option for memory in sensors used for industrial, automotive and internet of things
applications.
Vendors have struggled for years to develop ReRAM technology and get chips into production. A few
vendors are currently shipping them.
3D XPoint technology, such as Intel's Optane, could eventually fill the gap between dynamic RAM and
NAND flash memory. 3D XPoint has a transistor-less, cross-point architecture in which selectors and
memory cells are at the intersection of perpendicular wires. 3D XPoint isn't as fast as DRAM, but it is
nonvolatile memory.

6
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Intel's 3D XPoint-based Optane SSD
In terms of performance and price, 3D XPoint technology is between fast, but costly DRAM and slower,
less expensive NAND flash. As the technology develops, it may blur the distinction between RAM and
storage.

ROM

Read-only memory, or ROM, is a type of computer storage containing non-volatile, permanent data that,
normally, can only be read, not written to. ROM contains the programming that allows a computer to start
up or regenerate each time it is turned on. ROM also performs large input/output (I/O) tasks and protects
programs or software instructions. Once data is written on a ROM chip, it cannot be removed.

Almost every computer incorporates a small amount of ROM that contains the start-up firmware. This boot
firmware is called the basic input/output system (BIOS). This software consists of code that instructs the
boot-up processes for the computer -- such as loading the operating system (OS) into the random access
memory (RAM) or running hardware diagnostics. Consequently, ROM is most often used for firmware
updates.
However, ROM is also utilized in video game consoles, allowing one system to run various games.
Additionally, ROM is used in optical storage, including different kinds of compact discs (CD) -- such
as CD-ROM and CD-RW. ROM is also used frequently in calculators and peripheral devices like laser
printers, whose fonts are commonly stored in ROM.

Types of ROM
ROM may sometimes be called maskROM (MROM). MROM is a form of read-only memory that is static
and programmed into an included circuit by the manufacturer. Solid-state ROM, the oldest type of ROM,
is an example of maskROM. With the original ROM, since it was truly read-only, it had to be removed and
physically replaced in order to change any of its contents.
However, new types of ROM have emerged that are still non-volatile, but can be reprogrammed; these
types are categorized as programmable read-only memory (PROM). PROM can be used to update firmware,
such as BIOS, through the utilization of installation software.

7
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Types of PROM include:

• Ultraviolet-erasable ROM (UV-ROM) - ROM whose contents can be erased using ultraviolet light,
and then reprogrammed.
• Erasable programmable ROM (EPROM) - A type of ROM that is programmed using high voltages
and exposure to ultraviolet light for about 20 minutes.
• Electrically-erasable programmable ROM (EEPROM) - Often used in older computer chips and to
control BIOS, EEPROM can be erased and reprogrammed several times while enabling the erase
and writing of only one location at a time. Flash memory is an updated version of EEPROM that
allows numerous memory locations to be changed at the same time.

How does ROM work?


ROM is sustained by a small, long-life battery in the computer. It contains two basic components: the
decoder and the OR logic gates. In ROM, the decoder receives input in binary form; the output will be
the decimal equivalent. The OR gates in ROM use the decoder's decimal output as their input.
ROM performs like a disk array. It contains a grid of rows and columns that are used to turn the system on
and off. Every element of the array correlates with a specific memory element on the ROM chip. A diode is
used to connect the corresponding elements.
When a request is received, the address input is used to find the specific memory location. The value that
is read from the ROM chip should match the contents of the chosen array element.

ROM vs. RAM


Unlike a computer's RAM, the data in ROM is not lost when the computer power is turned off. While the
ROM chip is commonly used in the startup operations for the computer, the RAM chip is often used in the
recurrent tasks of the computer once the OS has been configured.
Another difference between ROM and RAM is the amount of space they contain. ROM chips can only store
several megabytes (MB) of data, usually amounting to between 4 and 8 MB per ROM chip. RAM chips
can store multiple gigabytes (GB); this storage often ranges from 1 to 265 GB per RAM chip. 1 GB is
considered to be the equivalent of 1000 MBs. Therefore, RAM displays more extensive memory
capabilities.
It is almost impossible to operate a computer using only ROM. RAM is necessary to run useful and
changeable programs. Therefore, computers must incorporate both forms of memory.

Advantages of ROM
ROM provides the necessary instructions for communication between various hardware components. As
mentioned before, it is essential for the storage and operation of the BIOS, but it can also be used for
basic data management, to hold software for basic processes of utilities and to read and write to peripheral
devices.
Other advantages of ROM include:
• Its static nature means it does not require refreshing.
• It is easy to test.
• ROM is more reliable than RAM since it is non-volatile in nature and cannot be altered or
accidentally changed.
• The contents of the ROM can always be known and verified.

8
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
• Less expensive than RAM.

EPROM

EEPROM (electrically erasable programmable read-only memory) is a user-modifiable ROM. It can be


erased and reprogrammed (written to) repeatedly by applying an electrical voltage that is higher than
normal.

EEPROM explained
EEPROM is a type of non-volatile ROM that enables individual bytes of data to be erased and
reprogrammed. That is why EEPROM chips are known as byte erasable chips. EEPROM is usually used
to store small amounts of data in computing and other electronic devices.
Developed in the late 1970s and early 1980s by researchers at Hughes Aircraft and Intel, EEPROM was
used as a replacement for EPROM (erasable programmable read-only memory) and PROM (programmable
read-only memory) memory. Prior to the use of EEPROM, EPROM technology was widely used. EPROM
memory chips could be programmed and then erased if exposed to ultraviolet light. However, the chips
could not be erased electrically. And the erasure process for EPROM took upward of an hour, which was
acceptable for the development environments of the time but left little flexibility for potentially higher-
speed environments of the future.
EEPROM technology evolved to address these challenges. Based on the existing EPROM structure,
EEPROM can be erased and programmed electrically. Most EEPROM chips have a life span of 10,000 to
100,000 write cycles, which is considerably greater than the write cycles of EPROM chips.

EEPROM transistors
In EEPROM, floating gate or storage transistors hold a charge while a metal-oxide-silicon (MOS) transistor
is used to erase the charge. The floating gate transistors (FGTs) are complementary MOS-based bit cells.
When there is no charge on the floating gate, a pulse on the control gate causes current to flow. At this
point, the transistor acts normally.
When the gate is charged, it blocks or impedes the action of the control gate, and current ceases to flow. In
order to charge, the source and drain terminals must be grounded, and sufficient voltage must be placed on
the control gate tunnel through the oxide to the floating gate.
The charged/uncharged state is determined by the electrons that get trapped in the gate, which then
determines whether the gate's content will be a 0 bit or a 1 bit. A reverse voltage channeled from another
transistor causes the charge to dissipate into the substrate, consequently clearing it.

Static and Dynamic Access Memories

our computer probably uses both static RAM (SRAM) and dynamic RAM (DRAM) at the same time, but
it uses them for different reasons because of the cost difference between the two types. Once you understand
how dynamic and static RAM chips work inside your computer, it's easy to see why there's a cost difference
between the two and how the two types of RAM got their names.

9
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Dynamic RAM is the most common type of memory in use today. Inside a DRAM chip, each memory cell
holds one bit of information and is made up of two parts: a transistor and a capacitor. These are, of course,
extremely small transistors and capacitors so that millions of them can fit on a single memory chip. The
capacitor holds the bit of information — a 0 or a 1 (see How Bits and Bytes Work for information on bits).
The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change
its state.
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell, the bucket
is filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a
leak. In a matter of a few milliseconds, a full bucket becomes empty. Therefore, for dynamic memory to
work, either the CPU or the memory controller has to come along and recharge all of the capacitors holding
a 1 before they discharge. To do this, the memory controller reads the memory and then writes it right back.
This refresh operation happens automatically thousands of times per second.
This refresh operation is where DRAM gets its name. Dynamic RAM has to be dynamically refreshed all
of the time, or it forgets what it is holding. The downside of all of this refreshing is that it takes time and
slows down the memory.
The current standard for dynamic RAM is known as DDR4, and allows for up to 64 gigabytes of memory
on a single chip, as well as faster data speeds and better energy efficiency compared to previous RAM
standards.
Static RAM uses a completely different technology. In SRAM, a form of flip-flop holds each bit of memory
(see How Boolean Gates Work for detail on flip-flops). A flip-flop for a memory cell takes four or six
transistors along with some wiring, but never has to be refreshed. This makes SRAM significantly faster
than DRAM. However, because it has more parts, a static memory cell takes a lot more space on a chip
than a dynamic memory cell. Therefore you get less memory per chip, and that makes SRAM a lot more
expensive. Static chips typically only hold 1 megabyte of memory or less, while many modern DRAM
sticks can hold several gigabytes of memory. Static RAM also uses less power than dynamic RAM.
To sum it up: Static RAM is fast and expensive, and dynamic RAM is less expensive and slower. Therefore,
static RAM is used to create the CPU's speed-sensitive cache, while dynamic RAM forms the larger system
RAM space.
Additionally, there exists a state between the two, called pseudo-static RAM. This type is built similarly to
dynamic RAM, but with an integrated memory controller soldered onto its circuit board. This distinction
gives a speed advantage over the dynamic chip, while still keeping production cost relatively low. Pseudo-
static RAM often takes the place of the expensive static type in mass-produced mobile phones, various
smart devices and automotive computer modules.

Magnetic Disk

A magnetic disk is a storage device that uses a magnetization process to write, rewrite and access data. It is
covered with a magnetic coating and stores data in the form of tracks, spots and sectors. Hard disks, zip
disks and floppy disks are common examples of magnetic disks.
A magnetic disk primarily consists of a rotating magnetic surface (called platter) and a mechanical arm that
moves over it. Together, they form a “comb”. The mechanical arm is used to read from and write to the
disk. The data on a magnetic disk is read and written using a magnetization process.

10
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
The platter keeps spinning at high speed while the
head of the arm moves across its surface. Since the
whole device is hermetically sealed, the head floats
on a thin film of air. When a small current is applied
to the head, tiny spots on the disk surface are
magnetized and data is stored. Vice-versa, a small
current could be applied to those tiny spots on the
platter when the head needs to read the data.
Data is organized on the disk in the form of tracks
and sectors, where tracks are the circular divisions
of the disk. Tracks are further divided into sectors
that contain blocks of data. All read and write
operations on the magnetic disk are performed on
the sectors. The floating heads require very precise
control to read/write data due to the proximity of the
tracks.
Early devices lacked the precision of modern ones and
allowed for just a certain number of tracks to be placed in
each disk. Greater precision of the heads allowed for a
much greater number of tracks to be closely packed
together in subsequent devices. Together with the
invention of RAID (redundant array of inexpensive disks),
a technology that combines multiple disk drives, the
storage capacity of later devices increased year after year.
Magnetic disks have traditionally been used as secondary
storage devices in computers, and represented the
mainstream technology for decades. With the advent of
solid-state drives (SSDs), magnetic disks are no longer
considered the only option, but are still commonly used.
The first magnetic hard drive built by IBM in 1956 was a large machine consisting
of 50 21-inch (53-cm) disks. Despite its size, it could store just 5 megabytes of
data. Since then, magnetic disks have increased their storage capacities many
times-folds, while their size has decreased comparably.
The size of modern hard disks is just about 3.5 inches (approx. 9 cm) with their
capacity easily reaching one or more terabytes. A similar fate happened to floppy
disks, which shrunk from the original 8 inches of the late 60s, to the much smaller
3.5 inches of the early 90s. However, floppy disks have eventually became
obsolete after the introduction of CD-ROMs in the late 1990s and now have all but completely disappeared.

Digital Recording Techniques

11
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
In the simplest case, the word digital refers to the representation of a quantity in numerical form and analog
refers to a continuous physical quantity. To digitize means to convert an analog physical quantity into a
numerical value. For example, if we represent the intensity of a sound by numbers proportionally related to
the intensity, the analog value of the intensity has been represented digitally. The accuracy of the digital
conversion depends upon the number of discrete numerical values that can be assigned and the rate at which
these numerical measurements are made. For example, 4 numerical levels will represent changes in the
amplitude of sound less accurately than 256 numerical levels and a rate of 8 conversion/sec will be less
accurate than a rate of 10,000 conversions/sec.
During digital recording of the analog signal, analog to digital (A/D) conversion takes place from
continuous time-amplitude coordinates to discrete time-amplitude coordinates. The difference between the
instantaneous analog signal and de digital representation is digital error.

A Digital Recording/Processing System (Basics of Digital Recording)

Converting Sound Into Numbers


In a digital recording system, sound is stored and manipulated as a stream of discrete numbers, each number
representing the air pressure at a particular time. The numbers are generated by a microphone connected to
a circuit called an ANALOG TO DIGITAL CONVERTER, or ADC. Each number is called a SAMPLE,
and the number of samples taken per second is the SAMPLE RATE. Ultimately, the numbers will be
converted back into sound by a DIGITAL TO ANALOG CONVERTER or DAC, connected to a
loudspeaker.

Fig. 1 The digital signal chain


Figure 1 shows the components of a digital system. Notice that the output of the ADC and the input of the
DAC consists of a bundle of wires. These wires carry the numbers that are the result of the analog to digital
conversion. The numbers are in the binary number system in which only two characters are used, 1 and 0.
(The circuitry is actually built around switches which are either on or off.) The value of a character depends
on its place in the number, just as in the familiar decimal system. Here are a few equivalents:
BINARY DECIMAL
0=0
1=1
10=2
11=3
100=4
1111=15
1111111111111111=65535
Each digit in a number is called a BIT, so that last number is sixteen bits long in its binary form. If we wrote
the second number as 0000000000000001, it would be sixteen bits long and have a value of 1.

12
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Word Size
The number of bits in the number has a direct bearing on the fidelity of the signal. Figure 2 illustrates how
this works. The number of possible voltage levels at the output is simply the number of values that may be
represented by the largest possible number (no "in between" values are allowed). If there were only one bit
in the number, the ultimate output would be a pulse wave with a fixed amplitude and more or less the
frequency of the input signal. If there are more bits in the number the waveform is more accurately traced,
because each added bit doubles the number of possible values. The distortion is roughly the percentage that
the least significant bit represents out of the average value. Distortion in digital systems increases as signal
levels decrease, which is the opposite of the behavior of analog systems.

Fig. 2 Effect of word size


The number of bits in the number also determines the dynamic range. Moving a binary number one space
to the left multiplies the value by two (just as moving a decimal number one space to the left multiplies the
value by ten), so each bit doubles the voltage that may be represented. Doubling the voltage increases the
power available by 6 dB, so we can see the dynamic range available is about the number of bits times 6 dB.
Sample Rate
The rate at which the numbers are generated is even more important than the number of bits used. Figure
3. illustrates this. If the sampling rate is lower than the frequency we are trying to capture, entire cycles will
be missed, and the decoded result would be too low in frequency and might not resemble the proper
waveform at all. This kind of mistake is called aliasing. If the sampling rate were exactly the frequency of
the input, the result would be a straight line, because the same spot on the waveform would be measured
each time. This can happen even if the sampling rate is twice the frequency of the input if the input is a sine
or similar waveform. The sampling rate must be greater than twice the frequency measured for accurate
results. (The mathematical statement of this is the Nyquist Theorem.) This implies that if we are dealing
with sound, we should sample at least 40,000 times per second.

13
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Fig. 3 Effects of low sample rates
The Nyquist rate (twice the frequency of interest) is the lowest allowable sampling rate. For best results,
sampling rates twice or four times this should be used. Figure 4 shows how the waveform improves as the
sampling rate is increased.

Fig. 4 Effect of increasing sample rate


Even at high sample rates, the output of the system is a series of steps. A Fourier analysis of this would
show that everything belonging in the signal would be there along with a healthy dose of the sampling rate
and its harmonics. The extra junk must be removed with a low pass filter that cuts off a little higher than
the highest desired frequency. (An identical filter should be placed before the ADC to prevent aliasing of
any unsuspected ultrasonic content, such as radio frequency interference.)
If the sampling rate is only twice the frequency of interest, the filters must have a very steep characteristic
to allow proper frequency response and satisfactorily reject the sampling clock. Such filters are difficult
and expensive to build. Many systems now use a very high sample rate at the output in order to simplify
the filters. The extra samples needed to produce a super high rate are interpolated from the recorded
samples.
By the way, the circuits that generate the sample rate must be exceedingly accurate. Any difference between
the sample rate used for recording and the rate used at playback will change the pitch of the music, just like
an off speed analog tape. Also, any unsteadiness or jitter in the sample clock will distort the signal as it is
being converted from or to analog form.

14
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Recording Digital Data
Once the waveform is faithfully transformed into bits, it is not easy to record. The major problem is finding
a scheme that will record the bits fast enough. If we sample at 44,100 hz, with a sixteen bit word size, in
stereo, we have to accommodate 1,411,200 bits per second. This seems like a lot, but it is within the
capabilities of techniques developed for video recording. (In fact, the first digital audio systems were built
around VCRs. 44.1 khz was chosen as a sample rate because it worked well with them.)
To record on tape, a very high speed is required to keep the wavelength of a bit at manageable dimensions.
This is accomplished by moving the head as well as the tape, resulting in a series of short tracks across the
tape at a diagonal.
On a Compact Disc, the bits are microscopic pits burned into the plastic by a laser.The stream of pits spirals
just like the groove on a record, but is played from the inside out.To read the data, light from a gentler laser
is reflected off the surface of the plastic (from the back: the plastic is clear.) into a light detector. The pits
disrupt this reflection and yield up the data.
In either case, the process is helped by avoiding numbers that are hard to detect, like 00001000. That
example is difficult because it will give just a single very short electrical spike. If some numbers are
unusable, a larger maximum (more bits) must be available to allow recording the entire set. On tape, twenty
bits are used to record each sixteen bit sample, on CDs, twenty-eight bits are used.
Error Correction
Even with these techniques, the bits are going to be physically very small, and it must be assumed that some
will be lost in the process. A single bit can be very important (suppose it represents the sign of a large
number!), so there has to be a way of recovering lost data. Error correction is really two problems; how to
detect an error, and what to do about it.

Fig. 5 Effects of data errors


The most common error detection method is parity computation. An extra bit is added to each number
which indicates whether the number is even or odd. When the data is read off the tape, if the parity bit is
inappropriate, something has gone wrong. This works well enough for telephone conversations and the like,
but does not detect serious errors very well.
In digital recording, large chunks of data are often wiped out by a tape dropout or a scratch on the disk.
Catching these problems with parity would be a matter of luck. To help deal with large scale data loss, some
mathematical computation is run on the numbers, and the result is merged with the data from time to time.
This is known as a Cyclical Redundancy Check Code or CRCC. If a mistake turns up in this number, an
error has occurred since the last correct CRCC was received.

15
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
Once an error is detected, the system must deal gracefully with the problem. To make this possible, the data
is recorded in a complex order. Instead of word two following word one, as you might expect, the data is
interleaved, following a pattern like:
words 1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,30,3,7,15,19,27 etc.
With this scheme, you could lose eight words, but they would represent several isolated parts of the data
stream, rather than a large continuous chunk of waveform. When a CRC indicates a problem, the signal can
be fixed. For minor errors, the CRCC can be used to replace the missing numbers exactly. If the problem
is more extensive, the system can use the previous and following words to reconstruct a passable imitation
of the missing one. One of the factors that makes up the price difference in various digital systems is the
sophistication available to reconstruct missing data.
The Benefits of Being Digital
You may be wondering about the point of all of this, if it turns out that a digital system is more complex
than the equivalent analog circuit. Digital circuits are complex, but very few of the components must be
precise; most of the circuitry merely responds to the presence or absence of current. Improving performance
is usually only a matter of increasing the word size or the sample rate, which is achieved by duplicating
elements of the circuit. It is possible to build analog circuits that match digital performance levels, but they
are very expensive and require constant maintenance. The bottom line is that good digital systems are
cheaper than good analog systems.
Digital devices usually require less maintenance than analog equipment. The electrical characteristics of
most circuit elements change with time and temperature, and minor changes slowly degrade the
performance of analog circuits. Digital components either work or don't, and it is much easier to find a chip
that has failed entirely than one that is merely 10% off spec. Many analog systems are mechanical in nature,
and simple wear can soon cause problems. Digital systems have few moving parts, and such parts are
usually designed so that a little vibration or speed variation is not important.
In addition, digitally encoded information is more durable than analog information, again because circuits
are responding only to the presence or absence of something rather than to the precise characteristics of
anything. As you have seen, it is possible to design digital systems so that they can actually reconstruct
missing or incorrect data. You can hear every little imperfection on an LP, but minor damage is not audible
with a CD.
The aspect of digital sound that is most exciting to the electronic musician is that any numbers can be
converted into sound, whether they originated at a microphone or not. This opens up the possibility of
creating sounds that have never existed before, and of controlling those sounds with a precision that is
simply not possible with any other technique.

Analog to Digital (A/D) Conversion

Most signals of practical interest, such as speech, biological signals, radar signals, sonar signals, and various
communications signals such as audio and video signals are analog. To process analog signals by digital
means, it is first necessary to convert them into digital form, that is, to convert them to a sequence of
numbers having finite precision. This procedure is called analog-to-digital (A/D) conversion, and the
corresponding device is known as an analog-to-digital converter (ADC).

16
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
The goal of the ADC process is to accurately represent analog signals as digital signals. Toward this end,
three signal processing procedures: sampling, quantization, and encoding described below are combined
together. The three-step A/D conversion process is illustrated in Fig below.

Sampling:
The first step of the ADC process is the sampling of the analog signal. This is the conversion of a
continuous-time signal into a discrete-time signal obtained by taking 'samples' of the continuous-time signal
at discrete time instants. That means, Sampling is the process of taking "snapshots" of a signal over time.
Thus, if 𝑚𝑎 (𝑡) is the input to the sampler, the output is 𝑚𝑎 (𝑛𝑇), where T is called the sampling interval.
Harry Nyquist from Bell Laboratory studied the sampling process and derived a criterion that determines
the minimum sampling rate for any continuous analog signals. His, now famous, minimum sampling rate
is known as the Nyquist sampling rate, which states that one must sample a signal at least twice the
highest frequency (in Hertz) in the signal spectrum. Therefore, to transmit the information in a
continuous-time signal, we need only transmit its sample.

Quantization:
The sample values are not digital because they lie in a continuous range and can take on any one of the
infinite values in the range. This difficulty can nearly be resolved by quantizing the sampled signals where
each sample is approximated or rounded off to the nearest quantized level. For example, the amplitudes
m(t) of the signal lie in the range (−𝑚𝑝 , 𝑚𝑝 ). which is partitioned into L, quantized levels, each of
2𝑚𝑝
magnitude ∆𝑉 = 𝐿
. Each amplitude of the sample is approximated to the midpoint of the interval in
which the sample value falls. Each sample is now approximated to one of the nearest L numbers. The
information is thus digitized.
The quantized signal is thus an approximation of the original one. The accuracy of the quantized signal can
be improved to any desired degree by increasing the number of levels 𝐿. For intelligibility of voice signal.
𝐿 = 8 or 16 is sufficient. For commercial use, 𝐿 = 32 is minimum and for telephone communication, 𝐿 =
128 or 256 is commonly used. Here,

Level = 2𝑏𝑖𝑡
log(𝐿𝑒𝑣𝑒𝑙)
𝑏𝑖𝑡 =
log 2
log(128)
For example, for 128 level, 𝑏𝑖𝑡 = =7
log 2

17
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
𝑚𝑎 (𝑡) 𝑚𝑎 (𝑛𝑇) 𝑚𝑞 (𝑡) 010101
Sampler Quantizer Coder

Analog Discrete-time Quantized Digital


signal signal signal signal

𝑚𝑝

2𝑚𝑝 0

2𝑚𝑝
𝐿
−𝑚𝑝
Digital form of this wave is
1 0 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1

Coding
Once a sampled signal is quantized, the encoding process involves representing the quantization level with
the available bits. Each digital system has a number of bits, which it uses as the basic units to represent
data. As a result of the encoding process, sampled analog signals are now represented as a set of binary
numbers.
A bit is the most basic unit where single binary information, 1 or 0, is represented. Suppose you have a
single bit to represent an incoming signal. You only have two different numbers, 0 and 1. You may say that
you can distinguish only low from high. Suppose you have 2 bits. You can represent four different levels,
00, 01, 10. and 11. In the case of 3 bits, you can represent eight different levels: 000, 001, 010. 011, 100,
101, 110, and 1 1 1. A similar discussion can lead us to conclude that given n bits, we have 2𝑛 different
numbers or levels one can represent.

18
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021
References

1. Pulse, Digital and Switchin Waveforms – Millman, J and Taub, H


2. Digital System Principles & Applications – Tocci, RJ
3. Electronic Devices and Circuits: An indtroduction – Mottershead, A
4. Introduction to Pulse Shaping Circuits – Blitzer, R
5. https://www.techopedia.com/definition/8210/magnetic-disk
6. http://artsites.ucsc.edu/EMS/music/tech_background/TE-
16/teces_16.html#:~:text=In%20a%20digital%20recording%20system,TO%20DIGITAL%20CO
NVERTER%2C%20or%20ADC.
7. https://computer.howstuffworks.com/question452.htm

19
Md. Saifur Rahman, Assistant Professor, Department of Physics, University of Rajshahi / 4H / Chapter-8 / 2021

You might also like