Low-level operations and computer architecture

  • Units of storage: bit, byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte
  • Translation of high-level program code to binary (machine code): interpreters and compilers
  • Use of binary to represent and store:
    • Integers
    • Real numbers (mantissa & exponent)
    • Characters
    • Instructions (machine code)
    • Graphics (bit-mapped and vector)
  • Basic computer architecture:
    • Processor( registers, ALU, control unit)
    • Memory
    • Buses (data and address)
    • Interfaces

Units of storage

Binary / Decimal

128 64 32 16 8 4 2 1 
 1  1  1  1  1 1 1 1 = 255 
 0  1  1  0  1 0 0 1 = 105
  • 1 bit  = Binary Digit
  • 8 bits = 1 Byte
  • 1024 Bytes = 1 Kilobyte
  • 1024 Kilobytes = 1 Megabyte
  • 1024 Megabytes = 1 Gigabyte
  • 1024 Gigabytes = 1 Terabyte
  • 1024 Terabytes = 1 Petabyte

Translation of high-level program code to binary (machine code)

  • Interpreters – translates program code line by line, spots errors more easily but takes longer.
  • Compilers – translates program code and saves the machine code, less likely to spot errors but more efficient. Creates a run time version that can’t be edited.

Use of binary to represent and store

  • Real numbers uses mantissa & exponent – 2.56 X 105
    • Mantissa = 2.56 Exponent = 5
  • Characters – ASCII allocates a different binary code to each letter (8 bits-256 characters), Unicode (16 bits – 65,535 characters)
    • A = 00100001
  • Instructions, machine code – the only characters the processor can understand 10101011101
  • Graphics bit-mapped and vector Bit-mapped, graphics are made up of pixels

Bit-mapped Graphics

Formula

Number of pixels = image width x resolution x image height x resolution

Example 1

pixels

This is enlarged but is 1 inch by 1 inch at 22 Dots Per Inch. In that case there are 22 x 1 x 22 x 1 = 484 pixels

Example 2

Bitmap with a resolution of 600×600 pixels in 8 bit colour.

Storage requirements

600 x 600 x 1 bytes = 360000 
It is 1 byte as it is 8 bits per pixel 
360000/1024 = 351.6 kilobytes

Example 3

Calculate the number of pixels in 4 inch by 5 inch photograph scanned which has a resolution of 600 dots per inch.

Pixels = 4 x 600 x 5 x 600 = 7,200,000 pixels
1pixel = 1 bit 
7,200,000 / 8 = 90000 bytes 
90000 bytes / 1024 = 878.9 Kb

Vector Graphics

It is possible to edit each object separately, for example, change the shape, colour, size and position.

Even if an object in a vector graphic is quite large, it doesn’t need a lot of computer memory. Therefore the file size of a vector graphic is often very small.

Vector graphics are scalable when you resize them, they do not lose quality.

Basic computer architecture

  • Processor
    • Registers – temporary storage locations holding data being processed
    • Arithmetic and Logic Unit – deals with comparisons and arithmetic calculations
    • Control Unit – controls all other parts of the processor, ensures instructions are carried out in the correct order
  • Memory
    • Random Access Memory (RAM) – temporary data storage only held as long as the computer is switched on.
    • Read only memory (ROM) – Permanent memory not lost when the computer is switched off. Data stored on a hard disk or a memory stick.
  • Buses
    • data bus – carries data to and from the processor, memory and other devices. Bi-directional
    • address bus – carries address locations from processor to the memory.
    • control bus – made up of a number of separate wires.
  • Interfaces
    • allows a processor to send and receive data to and from peripherals like printers, scanners, keyboards and projectors.

 

Leave a Reply

Your email address will not be published. Required fields are marked *