1 / 22

Data Types

Data Types. Level 3 Extended Diploma Unit 19 Computer Systems Architecture. Previously …. We learnt how values can be represented in: Decimal Binary Hexadecimal Now we look at how other things can be represented in a computer. Text.

Download Presentation

Data Types

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Types Level 3 Extended Diploma Unit 19 Computer Systems Architecture

  2. Previously …. • We learnt how values can be represented in: • Decimal • Binary • Hexadecimal • Now we look at how other things can be represented in a computer

  3. Text • We need a method of coding the alphabet and other characters • This has to be recognised across all computers • ASCII (American Standard Code for Information Interchange) is a method of doing this • Standardises binary codes eg: • 01000001 is uppercase A

  4. ASCII code

  5. Text • One bit to switch between upper and lower case • A = 0100 0001 a = 0110 0001 • No information about font, size, colour (this is the job of scripting languages – HTML etc, or word processors) • Similar values for punctuation etc

  6. Exercise • Write out your surname in binary and hex • Decode this message (x20 is a space) 537475666620666F722073747564656E7473 • What are the ASCII codes for ? @ # £ $

  7. Graphics • 2 ways to represent graphics • Bitmaps • Vectors

  8. Bit maps • Resolution – horizontal x vertical pixels or bits • 640 x 480, 1280 x 1024 etc • This example is 5x7, a 0 is black and a 1 is white

  9. Colour bit maps • Images made up of coloured pixels

  10. Colour bit maps • Colour depth – number of colour bits per pixel • 1 bit – monochrome 0 = white 1 = black • 8 bit – grey scale – 256 shades 00000000 = black 00001111 = mid grey 11111111= white

  11. Colour • 24 bit = 8 bits per red/green/blue = 16 million colours • Exercise – how many colours in 30 bit Deep Colour

  12. Vector graphics • Lines are drawn • Can be scaled up or down without loss of quality • Allows much smaller file sizes than bitmaps

  13. Vector graphics • What is going to be drawn (eg line) • Start point (x1,y1) • End point (x2,y2) • Where x and y are co-ordinates on a grid Y – axis 0 1 2 3 4 5 0 1 2 3 4 5 X – axis

  14. Draw a square // set the starting point for the line graphics.moveTo(10,10); // move the line through a series of coordinates graphics.lineTo(10,100); graphics.lineTo(100,100); graphics.lineTo(100,10); graphics.lineTo(10,10);

  15. Exercise • What applications allow you to create and edit bitmaps or vector graphics? • What are the advantages of each method of drawing images? • Consider • File size • What happens when you scale the image • Colour reproduction

  16. Sound • Sound consists of a continuously varying waveform • It is an analogue signal

  17. A-D conversion • An A-D convertor (analogue to digital) is used to sample the waveform for amplitude at fixed intervals • The values are stored digitally Amplitude Sample period

  18. Sampling rates and bits • For CD the sampling rate is 44.1kHz • Higher sampling rates give better quality • HD-DVD uses 192 kHz • The bit depth determines the range of amplitude from loudest to softest • 16 bits are used for CD quality • 24 bits professionally

  19. Bit rate • Bit rate = (sampling rate) x (bit depth) x (number of channels) • For a recording with a 44.1 kHz sampling rate, a 16 bit depth, and 2 channels (stereo): 44100 x 16 x 2 = 1411200 bits per second, or 1.4112 Mbit/s

  20. Compression • Audio can be compressed to reduce file sizes • Uncompressed files contain as many bits for silence as for sound • Lossless compression replaces the silence with information about how long the silence lasts. Can reduce file size by half • Lossy compression eliminates the less audible sounds and can reduce files to one tenth of the original size

  21. File types • Uncompressed • WAV, AVI • Lossless • FLAC, Apple lossless • Lossy • Mp3, mp4, Vorbis, AAC, ATRAC

  22. D-A conversion • To convert a digital file back to sound • The bits are fed into a D-A converter • This produces a voltage with the amplitude proportional to the value of the 16 bits • This is played back at the sampling rate

More Related