20
Marwan Al-Namari 1 Digital Representations

Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Embed Size (px)

Citation preview

Page 1: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Marwan Al-Namari

1

Digital Representations

Page 2: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Bits and BytesDevices can only be in one of two states

0 or 1, yes or no, on or off, …Bit: a unit of data that can only have one of

two valuesByte: an ordered sequence of eight bitsWord: a short sequence of bytes, usually four

(32 bits)

2

Page 3: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Interpretation of BitsNumbers to base 2 (binary)

01100001 = 97 decimalCharacters – associate bit patterns (numbers)

with characters via a character set01100001 = a in ASCII

Brightness of an image at a point, instantaneous amplitude of a sound wave, etc

3

Page 4: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

AddressesEach byte can be identified by its position in

the sequence of all bytes in memory – its address

Collections of bytes can be combined into data structures using addresses

e.g. store an image as a sequence of brightness values, use address of the first to access the image data

store a video sequence as series of images, add address of next and previous to each frame

4

Page 5: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

InstructionsBit patterns that cause the processor to carry

out operations on values stored in memoryHardware is constructed so that the desired

effect is achievedPrograms stored in memory as a sequence of

instructions to be executed in orderA computer is a stored program machine

It can therefore be used for many different tasks, depending on the programs it runs

5

Page 6: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

DigitizationConverting a signal from analogue to digital

formAnalogue signal can vary continuously, digital

is restricted to discrete valuesTwo-stage process

Sampling – measure the value at discrete intervals

Quantization – restrict the value to a fixed set of quantization levels

6

Page 7: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Sampling and Quantization

7

Page 8: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital SignalsOnly certain signal values are valid

Relatively immune to corruption by noiseDo not degrade when copied or transmitted

over networkSome information lostUndersampling

Samples 'too far apart' so cannot accurately reconstruct original signal

8

Page 9: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Frequency DomainAny periodic waveform can be decomposed into a

collection of frequency componentsEach one is a pure sine wave

The collection of frequencies and their amplitudes represent the waveform in the frequency domainCompute the frequency domain representation

(frequency spectrum) using the Fourier Transform

Higher frequency components are associated with abrupt transitions

9

Page 10: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

CompressionDefinition : An operation performed on data to reduce the

amount of storage required to represent it, for reasons of economy or efficiency.

Decompression : An operation performed on

previously compressed data to restore it as far as possible to its original.

Software that performs compression and decompression is often called a codec (short for compressor / decompressor).

10

Page 11: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Compression- Compression algorithms can be divided into two

classes : Lossless. Lossy.

- Compression must be often applied to media data.

- Different compression algorithms are applicable to different types of media data. Their effictiveness depends on the characteristics of the data itself.

11

Page 12: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

12

Page 13: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

There are established ways of representing images, video, animation, sound and text in bits.

Images are displayed as arrays of pixels and represented using an internal model. Generating the pixels from the model is called rendering.

Images may be modeled as bitmaps or vector graphics.

13

Page 14: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

A bitmap is an array of logical pixels(stored colour values) that can be mapped directly to the physical pixels on the display.

14

Page 15: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

In vector graphics, the image is stored as a mathematical description of a collection of individual lines, curves and shapes making up the image, which requires computation to render it.

Vector graphics are often smaller than bitmaps, are resolution-independent and can be scaled without loss of quality, but they are suitable for certain sorts of synthetic image, not photographs.

15

Page 16: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

16

Page 17: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

Video and animation :

- Moving pictures can be created as live-action or animation.

- Live-action must be stored as video.

- Animation may be represented in other more flexible or efficient ways.

17

Page 18: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

Sound : - Can be represented as a sequence of

samples after digitization. - CD audio is sampled at 44.1 kHz, higher

sampling rates are sometimes used. - Audio delivered over the Internet is

compressed, often using the MP3 codec.

18

Page 19: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of Media

Text : - A character set is a mapping from

characters to character codes. - Unicode is a character set capable of

representing text in all known languages. - A font is a set of character shapes, called

glyphs. - Many aspects of layout must be controlled

when text is displayed.

19

Page 20: Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data

Digital Representation of MediaInteractivity is produced by executing a

program in response to user input.In multimedia, programs are often written

in a scripting language, such as JavaScript or ActionScript.

Metadata is structured data about data, which may be attached to media files to help with searching and classifying them.

20