Computer Systems

Data representation

Binary and Denary

A computer can only understand binary numbers, therefore integers (whole numbers) can be represented by binary values.

To convert from denary (whole numbers) to binary, there are eight values:

128, 62, 32, 16, 8, 4, 2, 1

You start from the left and subtract the number from each value. If the number is too small then you place and 0 and if the number is subtracted you place a 1 under the number.

-An odd number will always end in a 1 and an even number will always end in a 0.

Floating point representation

A real number (float) is stored as a mantissa and exponent where they are both integers and can be stored as binary values.

Example:

186.57 will be stored as

0.18657 × 103

Mantissa- 18657

Exponent- 3

ASCII
ASCII is the internationally agreed code to represent characters.

ASCII uses 7 bits per character and can represent 128 characters whereas extended ASCII uses 8 bits per character and can represent 256 bits.

Vectors graphics

A vector graphic is used to represent images using shape objects. Each object has attributes which describes how it should be drawn.

Objects:

-Rectangle

-Ellipse

-Line

-Polygon (pentagon, hexagon, octagon)

Attributes:

-X coordinate

-Y coordinate

-Line colour

-Line thickness

-Fill colour

Bit map graphic

A bit map graphic is stored a an array of pixels where each pixel is given a binary value (0 or 1).

Computer Structure

Processor parts

Part

Description

Arithmetic and logic unit (ALU)

Performs any calculations and logical comparisons using AND, OR, NOT.

Reigsters

Temporarily stores data, instructions or addresses

Control unit

Manages flow of events around the computer and tells when data is being written or read. Can also transfer instructions from memory.

Memory storage

Each memory location is given a unique address and stored so it can be retrieved later via the data bus.

RAM is volatile meaning it will be cleared once the computer is shut off whereas ROM is not but you cannot make further edits to the data.

Buses

The data bus is bi-directional because it carries data from the processor to the memory and data from memory to the processor.

The address bus is uni directional because it always goes from the processor to the memory. It tells the memory what memory location is being written or read from.

Translators