GoConqr has a new look! Let us know what you think.

Notes

Representation of data in computer systems

Amrit Gosal Computing GCSE English 1 page

Content of the notes (1)

Page 1

Bit = 1

Nibble = 4 bites

Byte = 8 bits

Megabyte = 1024 kilobytes

Gigabyte = 1024 megabytes

Terabyte = 1024 gigabytes

2 to the

power of 10 = 1024

Bit = binary

digit, and is the basic unit, which takes the value of 1 or 0.

By turning

electricity on (1) and off (0) along a cable messages can be sent between

computers. Byte is the basic practical data volume unit – it is a unit of

information that computers can send at any one time.

Bytes are

split into nibbles to make it easier to read. Each nibble can then be converted

into a hexadecimal letter. Hexadecimal numbers normally have a # sign before

them.

·

When key is pressed on computer keyboard, code

is generated that computer can convert into a symbol for display or printing.

It is

important that systems agree on the codes being used for the data to be

correctly presented. In 1960 American Standards Association agreed on a set of

codes to represent the main character set used in telegraph systems, ASCII.

Agreed to deal with basic textual messages.

·

Character set = the characters available to a

computer.

·

ASCII has 127 codes (95 printable and 32

non-printable), plus ‘null’ code (00000000), which is used as a control

character in certain applications. In binary, 127 = 1111111, so this system

uses 7 bits to code the character set of a computer.

·

Character values in ASCII increase from ‘A’ to

‘Z’, however lower case letters are larger than both, so when words are sorted

‘Zebra’ comes before ‘apple’.

·

ASCII fails to deal with range of other

characters such as non-English ones and mathematical symbols. ASCII was

extended to use 8 bits rather than 7, meant another 128 character could be

included, with one character taking up only one byte to store.

·

The Unicode system for encoding characters uses

up to 32 bits (4 bytes), providing more than 4 billion possibilities. In this,

the original 128 ASCII characters still have the same values, so ASCII is

technically a subset of the Unicode system for coding characters. A lot of the

32-bit system is unused and the 16-bit version (65,000 possibilities) is

sufficient for most needs.

·

There are various versions of Unicode, with

different amounts of bits to code the character set, but each of them has

subsets of agreed values so it is still compatible.

·

Pixel = the smallest element of an image. The

dots that make the image on screen.

·

When enlarged, the image becomes less defined

and dots/pixels can be clearly seen.

·

If a pixel is to be able to represent more than

one colour then more bits have to be used to make a range of colours available:

Ø

With one bit, can only have two colours: e.g.

black or white

Ø

With 2 bits we can have 4 colours (2 to the power of 2)

Ø

3 bits – 8 colours (2 to the power of 3)

Ø

8 bits – 256 colours (2 to the power of 8)

Ø

16 bits – 65,536 colours (2 to the power of 16)

·

Colour depth (or bit depth) = the no. of bits

per pixel (bpp). The more bits, the more colours that can be represented.

·

Resolution = the no. of pixels per unit (e.g.

ppi – pixels per inch, often called dpi for dots per inch). The larger this is,

the larger the file storing the image data is.

·

Metadata = information about the image data that

allows the computer to recreate the image from the binary data in the file.

Must contain height and width in pixels and the colour depth in bpp. This is

because the computer processes data in binary and does not say these details.

·

The size of an image file is determined by its

size in pixels, colour depth and resolution of image.

·

Sound is also stored in binary on the computer.

The metadata tells the computer what type of file it is so that it doesn’t try

to display it as a picture.

·

Sound is analogue – so it has continuously

changing values – but the computer needs to have this in a digital form as a

set of binary numbers.

·

To convert sound from analogue to digital form,

it is sampled at different intervals and the values are recorded. This set of

values is saved and replayed by the computer. This effectively means that it

converts the data from a line graph to a bar chart, meaning it is not as smooth

so the sound produced will not be the same quality as the original.

·

If it is sampled more frequently – e.g. every

0.5 units on the x axis rather than 1 – the bar chart would look much more like

the original curve and the sound would be closer to the original.

·

Sample rate = no. of times sound is sampled per

second. Measured in Hz, so 100Hz is 100 samples per second. The higher the

sample rate, the better quality sound and the larger the file.

·

Bit rate = the space available to store the

sampled data per second. Measured in kilobits per second (kbits/s), so

128kbits/s is 128 kilobits per second of sampled sound. CD has 12X the bit rate

of a typical MP3 player, so is twelve times as fast. The higher the bit rate,

the better the quality and the more space needed to store it.

·

Each instruction in computer memory is

represented by different bit pattern that CPU recognises.

·

Program instructions and data are stored by the

computer in binary in the same place. When a computer is instructed to run a

program it is directed to the start address – a location in the main memory

used to store data or instructions – for these data and instructions.

·

The CPU fetches the first instruction from this

start location and decodes it to find out what to do next. It is decoded into

two parts – the operator and the operand. While it does this, it updates the

register, which is a special fast access part of the CPU that stores data in

use by it. The type of register here is the Program Counter, which specifically

keeps address of the next instruction, and it is updated to point at the next

memory location so that it is ready to fetch the next instruction if necessary.

·

As data and instructions both look the same, the

computer doesn’t know whether what the binary is fetching is an instruction or

data. However, if it is told to run a program at a certain location, it expects

the first item fetched to be an instruction, so it knows what to do next.

·

When the program instruction is decoded into two

parts, one is the instruction (operator) and the other is the data which tells

the CPU what data or memory location is the subject of the operation (operand).

A typical instruction may be to add the data in a memory location to data in

another register, the accumulator (register in CPU that holds data in use);

e.g. operator = add to accumulator, and operand = contents of memory location

1101 (details of what to add).

·

If program has any mistakes then CPU could

mistake data for an instruction. The CPU has no way of knowing if a binary

number it has fetched is meant to be an instruction or data, and it will just

do what it is told.

Information

Description
GCSE Computing (Theory) Note on Representation of data in computer systems, created by Amrit Gosal on 22/07/2016.
Created by
Amrit Gosal
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?