0% found this document useful (0 votes)
8 views5 pages

1.4 Data Encoding: Common Positional Numbering Systems

The document discusses various data encoding techniques, focusing on how digital data is represented as bit strings across different formats including text, colors, sound, and pictures. It explains numeral systems such as decimal and binary, character encoding schemes like ASCII, the RGB color model for images, and the process of sampling sound waves for digital audio. Additionally, it provides examples of encoding requirements for images and audio, highlighting the importance of sampling rates and bit depth in digital representations.

Uploaded by

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

1.4 Data Encoding: Common Positional Numbering Systems

The document discusses various data encoding techniques, focusing on how digital data is represented as bit strings across different formats including text, colors, sound, and pictures. It explains numeral systems such as decimal and binary, character encoding schemes like ASCII, the RGB color model for images, and the process of sampling sound waves for digital audio. Additionally, it provides examples of encoding requirements for images and audio, highlighting the importance of sampling rates and bit depth in digital representations.

Uploaded by

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

1.

4 DATA ENCODING
All digital data is encoded as a sequence of bits and that information is associated with the
various patterns that these bits may exhibit. Many encoding techniques are available. A
numeral system is a way of representing numbers in written form.

Common positional numbering systems


In the decimal numeral system, for example, the base is 10 since it uses the 10 digits 0
through 9. The smallest digit of a positional numeral system is always zero while the largest
digit is always one less than the base. The binary numeral system, as the name implies, uses
only two digits. Digital electronics are well suited for binary systems since digital circuitry
can be readily designed around numbers composed of only two digits.

Example of using the decimal numeral system

Understanding binary bit strings


The position of each digit is numbered starting from zero on the right and increasing as the
digits move right to left. The right-most digit is therefore always at position 0, the next digit
moving left is at position 1 and so forth.
1.4.1 Text
All data that is stored in a computing system is encoded as bit strings. Even the words that
you are now reading are stored in binary form and this information is then presented to you as
text. The text you are reading even has different fonts using different sizes and weights.
Although the pictures that are used to represent the letter Q are each different, they
nonetheless each represent the same thing: the letter Q. Textual characters are usually
encoded as integer values using the encoding schemes. Each number is arbitrarily associated
with the image that should be used when the character is drawn on a page or shown on the
computer screen.

The letter Q is shown using five different font families


The associations between numbers and text are known collectively as a character encoding
scheme. In the ASCII table, the number 65 is associated with uppercase A, whereas the
number 97 is associated with lowercase a. The number 38 is associated with the ampersand
(&) and the number 126 is associated with the tilde (~). Since English has relatively few
characters, the ASCII table only has about 128 entries. Other languages, such as Japanese or
Chinese, use thousands of characters and hence the association tables are much larger. Some
text contained in the ASCII table is not really pictorial but rather a command that a text editor
or text processor must follow. These characters are known as non printable text characters
because they cannot be drawn. The backspace key, for example, is not printable since you do
not see anything when you strike that key, but you would expect that a text processor would
take some action whenever the user enters a backspace.

The ASCII table associations between numbers and textual characters


1.4.2 Colors
The human eye perceives color through three types of biological photo sensors known as
cones. Each cone is attuned to one of three wavelengths that correspond roughly to red,
green, and blue light. The individual responses of all cones combine to form the perception of
a single color at a single point within the field of view. The design of this biological system
suggests that color is a three-dimensional entity. The RGB color model is the most common
way of representing color in image-processing systems. The RGB model uses red (R), green
(G), and blue (B) as the primary colors such that any color can be created by combining
different amounts of these three primaries. By way of example, consider a flashlight that has
a slider allowing you to choose the strength of light emitted. In setting the slider to 0, the
flashlight is turned completely off and generates no light, whereas in setting the slider to 255
(the maximum setting) the flashlight generates as much light as it is capable of generating.
Now consider three such flashlights: the first emits purely red light, the second emits purely
green light, and the third emits purely blue light.
If all three flashlights are aimed at the same spot on a white wall any color can be projected
onto the wall by adjusting the slider values on the three lights in different ways. If all sliders
are set to 0, black is projected onto the wall. If all sliders are set to 255, white is projected
onto the wall, and if all sliders are set to 128 then gray is projected. In computing systems, a
color is usually encoded as three integer numbers where each number is in the interval 0 to
255. In addition, since each value can be one of only 256 different values, a bit string of
length eight is sufficient for encoding each value. This implies that a single color will be
encoded as a bit string of length 24 since there are three values and each value is encoded
with 8 bits.

How colors are typically encoded as binary bit strings

1.4.3 Sound
Digital audio is used almost exclusively today when recording, processing, and distributing
sound. Online music stores contain hundreds of thousands of hours of digital sound; the
soundtracks and audio of DVD movies are encoded digitally; and your voice is digitally
encoded by your cell phone prior to being delivered to the person at the other end of the call
Sound is a physical phenomenon caused by waveforms that propagate through the air. A
microphone is used to transform the waveform into an analog electric signal after which the
analog signal is sampled to produce a digital encoding. Sampling is a process where the
strength of a changing signal is measured at regular time intervals and those measurements
are then recorded. In this way, the sound wave is converted into a sequence of numeric
values. Frequency is the rate at which sound waves change and is measured in terms of the
hertz. The hertz is denoted as Hz and is defined as the number of cycles (or changes) per
second. Sound waves that change at a slow rate are perceived as a low pitch while sound
waves that change at a high rate are perceived as higher in pitch. The average person can hear
sound waves 20 Hz up through about 20,000 Hz or 20 kHz
A sound wave is sampled ten times per second to obtain the sequence plotted on the
right
In this example, the sound wave has a frequency of approximately 4 Hz (although this is not
obvious) and must therefore be sampled at least eight times per second to adequately record
the signal. The actual sampling rate is 10 Hz, or ten times per second. Every tenth of a second
the strength of the sound wave is measured and recorded. It should be apparent that higher
sampling rates will yield more accurate encodings of the analog signal. The Nyquist–
Shannon sampling theorem, named after Harry Nyquist and Claude Shannon, states that the
rate at which samples are taken must be at least twice that of the highest frequency signal that
is to be measured. This theorem implies that a sampling rate of at least 40 kHz is required
when capturing sound waves that span the entire 20 to 20,000 Hz range of human hearing.
This fact explains why compact discs (CDs) are sampled at a rate of 44.1 kHz, digital audio
tapes (DATs) are sampled at 48 kHz, and a 96 kHz sampling rate is used for digital video
discs (DVDs). Consider a song that is five minutes long and is sampled at a rate of 48 kHz for
recoding on a digital audio tape. To determine the number of samples required to encode the
song we must note that there are 48,000 samples taken every second and that the song lasts
for 300 seconds. Thus, the song will be encoded as a sequence of 48000 × 5 × 60 or
14,400,000 samples. For this example, we will assume that a single sample is encoded as an
8-bit string, which means that the song can then be encoded in 14,400,000 bytes or about 14
MB. Of course if the number of bits required to encode a single sample is greater than 8, the
number of bytes required to encode the song also changes. Compact discs, for example, use
16 bits for each sample and DVD mastering usually requires 24 bits per sample.
1.4.4 Pictures
The most common encoding of a digital image is that of a two-dimensional grid of colors.
Each element of the grid is known as a pixel and represents a very small rectangular region of
the image that is comprised of a single color. When the grid of pixels is viewed at an
appropriate distance, the individual pixels recede from view while collectively appearing as a
naturally colored and smooth image. Images are typically encoded as a sequence of pixels
where each pixel corresponds to a single color. Since a color is normally encoded as a 24-bit
string, the total bits required to encode a digital image is on the order of 24 bits times the
number of pixels in the image. A small number of extra bits are also required to store useful
information such as the width and the height of the image. This extra information is referred
to as a header, and because the header can be encoded using an extremely small number of
bits relative to the pixel data, not consider it further. High-definition video uses individual
images that have up to 1920 columns and 1080 rows of pixels for a total of 1920 × 1080 or
2,073,000 pixels. Since each of these pixels is encoded as a bit string of length 24, the image
can be encoded as a bit string of length 1920 × 1080 × 24 or 49,766,400 bits. Alternatively,
using a byte as a measure of data capacity, the image can be encoded using 1920 × 1080 × 3
or 6,220,800 bytes or approximately 6 megabytes. Digital cameras take images that use on
the order of 10 megapixels and images of this resolution can be encoded as a string of 30
megabytes. Sometimes a picture does not contain many colors. Black-and-white images, for
example, use only two colors, whereas grayscale images use at most 256 colors; each color
being a unique achromatic gray.
While a color image generally uses 24 bits per color, other image types may use fewer than
24 bits per color since there are many fewer possible color values. Since grayscale images
may use no more than 256 colors, we can encode a grayscale color using 8 bits and since
there are only two colors in a black and-white image, we can encode the colors using a single
bit. More specifically, the image pixels could be encoded as the bit string
00111100010000101010010 11000000110100101100110010100001000111100.

A black-and-white image could be encoded using the bits shown on the right

DISCUSSION QUESTIONS:

1. Categorize the following as continuous data, discrete data and Information. (a)
Weight of newborn babies (b) Average score of IT third year students (c) Number of
students in IT department (d) Daily wind speed € Deviation in product price for last 3
months.
2. Identity the representation of sound while converting them into binary values.
3. Find the code which helps in converting text to binary.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy