## What is Assembly?
- One of the lowest-level programming languages.
- Can interactive more closely with a machine's hardware and can more directly interact with a machines CPU and memory.
- As it offers more direct control over the hardware such as CPU and memory it is often used to optimise performance.
- It contains instructions for specific operations (move data, arithmetic, jump).
## What is x86 Assembly?
- Low-level programming language for x86 architecture (Intel, 1978, 8086).
- Follows CISC (Complex Instruction Set Computing) → large, feature-rich instruction set.
- Dominant in PCs, laptops, servers (Intel & AMD).
- Useful for high-performance computing, operating systems, low-level programming tasks.
- Directly interacts with CPU registers & memory.
- Related video: Assembly basics.
---
## What is ARM Assembly?
- Low-level programming language for ARM architecture (Advanced RISC Machine).
- Follows RISC (Reduced Instruction Set Computing) → simpler, more efficient instructions needing fewer cycles.
- Power-efficient → dominates smartphones, tablets, embedded systems, Apple M-series laptops.
- Features: consistent instruction format + more general-purpose registers (vs x86).
---
## Instruction Set Differences
- ISA = Instruction Set Architecture.
- x86 (CISC):
- Many specialised instructions.
- Multiple operations in one command.
- Example: multiply two registers in one instruction.
- ARM (RISC):
- Simpler.
- Uniform instructions.
- Same operation requires multiple steps.
- Memory access:
- x86 → can manipulate memory directly.
- ARM → requires separate load & store.
- Impacts:
- Performance
- Power use
- Coding style
---
## Performance & Power Efficiency
- x86: high performance, desktops/laptops/servers.
- Higher clock speeds, complex instructions.
- Handles demanding tasks (games, resource-heavy apps).
- ARM: power efficiency, mobile/embedded.
- Simpler instruction set, low energy use.
- Balanced performance + long battery life.
- Summary: x86 = raw performance, ARM = efficiency.
---
## Compatibility
- x86:
- long-time general-purpose standard
- OS, apps, drivers designed for it
- Legacy + modern software run seamlessly.
- ARM:
- different ISA
- x86 software won’t run natively
- Needs modifications, recompilation, or emulation.
- OS (Windows, Linux) support ARM, but many apps still need adaptation.
- Hardware drivers:
- x86 = broader support.
- ARM = specialised drivers.
- ARM ecosystem growing, but x86 remains most universally compatible.
---
## Practical Example
- Task: Add numbers 1 to 5, and then store the result in register.
- x86:
- Has INC instruction (increment).
- Conditional branch = JL (Jump if Less).
- ARM:
- No INC, must use ADD.
- Conditional branch = BLT (Branch if Less Than), relies on CMP flags.
- Difference:
- x86 = specialised instructions.
- ARM = simpler, general-purpose.
- Both → same logical flow, different structure.
---
## Real-World Applications
- x86:
- Performance-intensive: high-end gaming, video editing, data processing.
- Game engines, 3D rendering optimised for x86.
- ARM:
- Low-power: embedded systems, IoT, portable devices.
- Used in smart home systems, wearables, battery-powered devices.
- Expanding into servers + personal computing.
---
## Conclusions
- x86 strengths: high performance, rich instruction set, broad compatibility.
- ARM strengths: power efficiency, scalability, mobile/embedded focus.
- Developers must understand differences for low-level programming, optimisation, architecture design.
- Trend: ARM expanding into x86 domains; x86 improving efficiency → boundaries blurring.
- Knowing differences = informed choices in evolving landscape.