National 5 Computing Science: Computer Systems

Binary and Data Representation

  • Binary Basics: Computer systems use the binary (base 22) system consisting of 11's and 00's to store and represent all information. High-level code is converted to binary (machine code) for computer comprehension.

  • Decimal vs. Binary: The decimal (denary) or base 1010 system uses digits 00-99. Binary uses only 00 and 11.

  • Place Values: Binary place values follow powers of 22: 128128, 6464, 3232, 1616, 88, 44, 22, 11.

  • Conversions:

    • Binary to Decimal: Add the place values for each column containing a 11. (e.g., 10010011→128+16+2+1=14710010011 \rightarrow 128+16+2+1 = 147).

    • Decimal to Binary: Subtract the largest possible power of 22 from the decimal number repeatedly, placing a 11 in the corresponding column or a 00 if it cannot be subtracted.

  • Units of Storage:

    • Bit: The smallest piece of data (11 or 00).

    • Byte: consists of 88 bits; can represent values up to 255255 (total of 256256 unique values).

    • Hierarchy: Each unit is 10241024 times larger than the previous: Byte →\rightarrow Kilobyte →\rightarrow Megabyte →\rightarrow Gigabyte →\rightarrow Terabyte →\rightarrow Petabyte.

Text Representation and Floating Point

  • ASCII: Stands for "American Standard Code for Information Interchange." Each character is represented by a unique binary value.

  • Extended ASCII: Uses 88 bits (11 Byte) per character, allowing for 256256 unique characters.

  • Control Characters: Non-printable ASCII codes that perform actions (e.g., Enter, Backspace, Arrow Keys).

  • Floating Point Representation: Used to store decimal points or very large/small numbers. It consists of two parts: the mantissa (the number part) and the exponent (the power value). (e.g., in 0.111×2110110.111 \times 211011, the mantissa is 111111 and the exponent is 1101111011).

Graphics: Bitmap and Vector

  • Bitmapped Graphics:

    • Stored as a grid of individual pixels.

    • Each pixel has a binary value representing its colour.

    • Resolution: The total amount of pixels; higher resolution increases detail and storage size.

    • Bit/Colour Depth: Number of bits per pixel. 88-bit depth allows 256256 colours; 2424-bit allows 16,777,21616,777,216 colours (True Colour).

    • Attributes: Can edit individual pixels; loses quality (pixelates) when enlarged.

  • Vector Graphics:

    • Stored as a set of textual instructions and objects (shapes).

    • Objects: Rectangle, Ellipse, Line, Polygon.

    • Attributes: Every object has attributes like XX Coordinate, YY Coordinate, Width, Height, Fill Colour, Line Colour, and Line Thickness.

    • Characteristics: Zooming or enlarging does not lose quality; only whole objects can be edited.

Computer Architecture

  • Processor (CPU): Known as the brain of the computer, following the Von Neumann Architecture.

    • Arithmetic and Logic Unit (ALU): Performs calculations and logical decisions (comparisons).

    • Control Unit: Manages execution order and timing of instructions.

    • Registers: Temporary internal stores used while the CPU processes data.

  • Busses:

    • Address Bus: Uni-directional; carries memory locations from the CPU to main memory.

    • Data Bus: Bi-directional; carries data between the CPU and memory.

  • Memory Organisation: Main memory consists of unique locations, each with its own address.

Software and Security

  • Translators: Convert High Level Languages (English-like code) to Low Level Language (binary).

    • Interpreters: Translate and execute code line-by-line; useful for identifying errors during runtime.

    • Compilers: Translate the entire program once into a permanent .exe.exe file; the original code cannot be easily viewed after compilation.

  • Security Precautions:

    • Encryption: Scrambling data so it is unreadable without a decryption key.

    • Firewalls: Monitor incoming and outgoing network traffic to block suspicious activity.

  • Environmental Impact: Methods to reduce energy use include standby modes, reducing monitor brightness, and minimizing background tasks.

Questions & Discussion

  • Question: What is the largest number we can represent with 88 columns?

  • Answer: 255255.

  • Question: Identify the bus used to move the result of a calculation between main memory and the CPU.

  • Answer: Data Bus.

  • Task: Identify the part of the processor that calculates cost and the part that transfers the next instruction from memory.

  • Answer: ALU calculates cost; Control Unit transfers instructions.

  • Question: State the object used to create the outline of a sink in a vector floor plan.

  • Answer: Ellipse.

  • Question: State the range of unique characters that can be represented by ASCII.

  • Answer: 256256 (using values 00-255255).