# 1.2 Text, Sound & Images

***

## ASCII

* 7 bit codes
* 32 control codes
* Stands for American Standard Code for Information Interchange
* Extended ASCII uses 8 bit codes
* Main disadvantage is that it doesn't represent the characters in non-Western languages

{% hint style="info" %}
Character set -> all the characters & symbols that a computer can represent where each character & symbol is assigned a specific value.
{% endhint %}

### Unicode

ASCII has now been updated to Unicode:

* More efficient (uses a <mark style="color:yellow;">variable-length encoding</mark> system)
* Universally accepted (as it works with all languages)
* Uniform encoding
* Main disadvantage is that file sizes are larger so it's slower when working with text based data

***

## Sound

Sound is analogue (i.e. it varies continuously). Due to this, sound waves need to be sampled for a computer. An <mark style="color:yellow;">ADC (analogue to digital converter)</mark> is used for this.

Sound is sampled at regular time intervals. Increasing the number of possible sound values used to represent sound amplitude (i.e. <mark style="color:yellow;">increasing the sampling rate will increase the accuracy of the sampled sound</mark>).

{% hint style="info" %}
Sampling resolution -> the number of bits per sample (bit depth)

Sampling rate -> the number of sound samples taken per second (measured in Hz)
{% endhint %}

| Benefits              | Drawbacks                                  |
| --------------------- | ------------------------------------------ |
| Larger dynamic range  | Needs greater processing power             |
| Better sound quality  | Larger file size                           |
| Less sound distortion | Takes longer to transmit or download files |

Two examples of sound files are MIDI and MP3:

MIDI doesn't actually store the sound. It stores when a note should be played, how long it plays for, etc. It stands for <mark style="color:yellow;">Musical Instrument Digital Interface</mark>.

MP3 records a recording of the sound. It is a format for digital audio.

{% hint style="success" %}
Sample answer (if asked about a MIDI file):

Musical Instrument Digital Interface\
Doesn't record actual sound\
Stores instructions for how the instruments should be played\
Specifies the duration, volume, and type of instrument to use\
Data in the file has been recorded using digital instruments
{% endhint %}

{% hint style="warning" %}
If asked about calculating the file size of a **mono** sound file:

Equation -> sampling rate (Hz) x sample resolution (bits) x length (sec) = file size

Then divide the total number of bits by 8 to get the file size in bytes. You may need to do further conversion if dealing with larger file sizes.
{% endhint %}

{% hint style="danger" %}
If the question asks about stereo sound, make sure to do the above equation and then multiply the answer by 2.
{% endhint %}

***

## Bitmap Images

An image is made up of pixels. Each pixel can be represented by a binary code. The image resolution is determined by how many pixels there are in an image. <mark style="color:yellow;">The more pixels the higher quality the image will be.</mark>

{% hint style="info" %}
Colour depth -> the number of bits used to represent each colour

Image resolution -> the dimensions of an image (pixels \[width x height]), number of pixels&#x20;
{% endhint %}

Think about it like this; if you have a low resolution image (e.g. 1080p) and you zoom in, the quality starts to deteriorate very quickly and looks really bad. However, if you have a high resolution image (e.g. 8k), and you zoom in, the quality may deteriorate a little bit, but zoomed in the same percentage as the 1080p image, this one will look significantly sharper.

<figure><img src="https://2433977784-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQoGZrDA3VQBZKWm3Nvbg%2Fuploads%2F7mz4ZRkWKVtniWW9hKyY%2Fimage.png?alt=media&#x26;token=2ac4f18a-3272-4d3a-bcc7-46ac5702b2a2" alt=""><figcaption><p>This image shows the difference between the number of pixels in each image resolution stop (8K being the one with the highest pixel density). Higher pixel density = better image quality &#x26; resolution.</p></figcaption></figure>

{% hint style="warning" %}
If asked about calculating the file size of an image:

Equation -> image resolution (pixels \[width x height]) x colour depth (bits) = file size

Then divide the total number of bits by 8 to get the file size in bytes. You may need to do further conversion if dealing with larger file sizes.
{% endhint %}

***

## Exam Questions

{% embed url="<https://cdn.savemyexams.com/pdfs/BacJek1NfzJKVtQ1.pdf>" %}
COPYRIGHT -> SAVEMYEXAMS
{% endembed %}

***
