0% found this document useful (0 votes)
25 views21 pages

Video 10

This document discusses different techniques for representing text, sound, and music digitally. It covers text encoding schemes like ASCII, Extended ASCII, and Unicode. It also describes two main methods for representing sound: sampling and MIDI. Sampling directly records the audio waveform, while MIDI encodes musical notes, instruments, and timing.
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)
25 views21 pages

Video 10

This document discusses different techniques for representing text, sound, and music digitally. It covers text encoding schemes like ASCII, Extended ASCII, and Unicode. It also describes two main methods for representing sound: sampling and MIDI. Sampling directly records the audio waveform, while MIDI encodes musical notes, instruments, and timing.
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/ 21

Data

Representation I
Sabah Sayed
Topics
1. Text Data
2. ASCII
3. Extended ASCII
4. UNICODE
5. Representing Sound
6.Sampling Technique
7.MIDI Technique
Text Data
• Text (Character data) is composed of letters, symbols, and
numerals that are not used in arithmetic operations.
‘b’ , ‘c’.
‘+’, ‘-’ , ‘(‘, ‘)’, ‘%’ , ‘$’ .
‘1’ , ‘2’ , ‘3’ , ‘4’ .

• Each character is assigned a unique bit pattern.

• Character data is represented using several types of codes


including EBCDIC, ASCII, Extended ASCII, and Unicode.
EBCDIC
• EBCDIC (Extended Binary-Coded Decimal
Interchange Code)
• is an 8-bit code used only by older
mainframe computers.
ASCII Code
• ASCII (American Standard Code for Information Interchange)
requires only seven bits for each character.

• ASCII is developed by the American National Standards Institute


(ANSI) in 1963, and finalized in 1968 as ANSI Standard X3.4.

• The purpose of ASCII was to provide a standard to code various


symbols.
How many characters can ASCII
represent?
• ASCII provides codes for 128(27) characters,
including English letters (uppercase &
lowercase), punctuation symbols, and
numerals.
• From (0000000)2 (00)16
• To (1111111)2 (7F)16
• For example, the ASCII code for an uppercase A is
1000001.

• If 8-bits are used, the first bit is always set to 0.


ASCII Table
It only represents the English Alphabet
Extended ASCII
• Extended ASCII is a superset of ASCII that
uses eight bits to represent each character.
• For example, Extended ASCII represents the
uppercase letter A as 01000001.
• Using eight bits instead of seven bits allows
Extended ASCII to provide codes for 256
characters.
• Uses the undefined space from 128-255 in
ASCII, mapping it to various characters .
Extended ASCII Table
“Hello.” in ASCII

• Use the ASCII table to write the ASCII code for


the following:
• Computer
• 5=10/2
Why Numerals?
• Why does ASCII and Extended ASCII represent
numerals?
– Numerals that will not be used for calculations
are better represented as text.
– For example phone numbers are numerals but
will not be used for any mathematical
operations.
– Such numerals are usually in the middle of text,
such as an address (“5 Ahmed Zewail St.”).
Unicode
• Unicode is designed to represent the world commonly
used languages.
• uses sixteen bits and provides codes for 65,000
characters.
• For compatibility, the first 128 Unicode are the same as
the ASCII.
• It is a real bonus for representing the alphabets of
multiple languages.
• Example: Unicode represents the letter ‫ د‬as 0000 0110
0010 1111 or (062F)16 in hexadecimal.
• Unicode is a family of encoding methods ( UTF-8, UTF-
16, etc.)
Exercise
• Create a text file in notepad
• Write the word “hello”
• Save the file once as ANSI (ASCII) and another as
Unicode.
• Using any hexa editor ( https://hexed.it/ ) open the
file and check the content of both.
What happens when I type?
• When you type the letter A, the hardware
logic built into the keyboard automatically
translates that character into the ASCII code
65.
• Which is then sent to the computer.
• Similarly, when the computer sends the
ASCII code 65 to output devices, the output
hardware instead draw letter “A” on your
screen or your computer.
What happens when I type?

Screen WE B

Memory RAM
Keyboard
W E B 42
45
45
57

Central Processing
Unit
Representing Sound
• Sampling techniques
– Used for high quality recordings
– Records actual audio
• MIDI
– Used in music synthesizers
– Records “musical score”
Sampling Technique
• The most generic method of encoding audio
information is to sample the amplitude of
the sound wave at regular intervals.
Sampling Technique
• Digitize and then assign a binary representation
Sampling Technique
• This technique is used for voice calls with
sampling rate of 8000 samples per second.
• This is not sufficient for high-fidelity music
recordings.
• To obtain the quality sound reproduction
obtained by today’s musical CDs, a sample rate
of 44,100 samples per second is used.
• The data obtained from each sample are
represented in 16 bits (32 bits for stereo
recordings).
MIDI Technique
• An alternative encoding system known as Musical Instrument
Digital Interface is widely used in:
– the music synthesizers
– for video game sound
– for sound effects accompanying websites.
• MIDI encodes what instrument is to play which note for what
duration of time.
• MIDI files avoid the large storage requirements of the sampling
technique.
• You can encode that a clarinet is playing the note D for two
seconds in three bytes rather than more than two million bits
when sampled at a rate of 44,100 samples per second.
• Disadvantages of MIDI files that it might sound different when
performed on different synthesizers.

You might also like