Advanced Data Representation, Architecture, and Security.
1. Data Representation
Integers (Two's Complement)
Used to represent Negative Integers.
To Binary (e.g. -5)
- Positive binary:
00000101(5) - Invert bits:
11111010 - Add 1:
11111011(-5)
To Denary (Reversing)
Example: 11111011
- Check MSB: 1 = Negative.
- Invert bits:
00000100 - Add 1:
00000101(5) - Result: -5
Range of n-bits
Formula: -2n-1 to 2n-1 - 1
- 8-bit: -128 to 127
- 16-bit: -32,768 to 32,767
Real Numbers (Floating Point)
Stores very large/small numbers using Mantissa & Exponent.
Mantissa
Determines Precision (Accuracy).
Exponent
Determines Range (Size).
Large Number Example
Storing 20.5 (Binary: 10100.1)
1. Normalise: 0.101001 x 25
2. Exponent (5) in Binary: 00000101
0
1010
0100
0000
000
0000
0101
Sign
Mantissa (15 bits)
Exp (5)
Small Number Example (Negative Exp)
Storing 0.09375 (Binary: 0.00011)
1. Normalise: 0.11 x 2-3 (Moved point 3 right)
2. Exponent (-3) in 2's Comp (8-bit):
3 = 00000011 → Invert (11111100) → +1 = 11111101
3. Storage (1-bit Sign, 15-bit Mantissa, 8-bit Exp):
0
1100
0000
0000
000
1111
1101
Sign
Mantissa (15 bits)
Exp (-3)
The Trade-off
More Mantissa bits = Higher Precision.
More Exponent bits = Larger Range.
Text & Graphics
Unicode vs ASCII
- ASCII: 8-bit (256 chars). English only.
- Unicode: 16-bit (65,536+ chars). Supports all world languages/emojis. Requires more storage per char.
Bitmapped vs Vector
| Feature | Bitmapped | Vector |
|---|---|---|
| Storage | Pixel Grid | Math Attributes |
| Resizing | Pixelates | Scales Perfectly |
| File Size | Large | Small |
| Editing | Pixels | Attributes |
2. Architecture
Registers
Temporary storage locations within the CPU.
- Registers (General): ALU, Control Unit, General Purpose Regs.
- PC (Program Counter): Holds address of next instruction.
- MAR (Memory Address Reg): Holds address of location being accessed.
- MDR (Memory Data Reg): Holds data read from or written to memory.
- IR (Instruction Reg): Holds the instruction currently being decoded/executed.
- Accumulator: Stores results of calculations from the ALU.
Buses & Cycle
Address Bus
Uni-directional
Points to location
Data Bus
Bi-directional
Carries data
Control Bus
Lines: Read, Write, Clock, Reset, Interrupt
Fetch-Execute Cycle
- Setup address on Address Bus.
- Activate Read line on Control Bus.
- Data transfers from Memory to CPU on Data Bus.
- Decode & Execute Instruction.
Performance Factors
How different factors affect system speed.
| Factor | Impact on Performance |
|---|---|
| Multi-Core | Executes multiple instructions simultaneously (Parallel Processing). *Only if software is written for it. |
| Cache Size | Stores frequently used data closer to CPU. Reduces slow fetches from RAM. |
| Clock Speed | More cycles per second (Hz) = More instructions executed per second. |
| Data Bus Width | Transfers more data in a single fetch (e.g. 64-bit vs 32-bit). Reduces number of fetches needed. |
3. Environment & Security
Environment
Energy Use
Data centres consume massive power for cooling and operation (Carbon Footprint).
Smart Technology Benefits
- Smart Buildings: Sensors control heating/lighting based on occupancy, reducing waste.
- Smart Traffic Management: Optimizes traffic light timing to reduce congestion and idling emissions.
- Smart Cars: Efficient route planning and start-stop technology save fuel.
Disposal (WEEE)
E-waste contains toxins (Lead, Mercury). Must be recycled specialistly to recover gold/copper.
Security & Encryption
Public Key Encryption (PKE)
- Public Key: Known to everyone. Used to ENCRYPT.
- Private Key: Kept secret by owner. Used to DECRYPT.
- Data encrypted with Public Key can ONLY be decrypted with Private Key.
Certificates & Signatures
- Digital Certificate: Attaches public key to identity. Proves website is genuine (Padlock).
- Digital Signature: Ensures message authenticity. Generated with sender's private key; verified with public key.