Computer Organization and Assembly Language Fundamentals

Course Objectives

  • Understand the organizational structure of computer systems, microprocessors, memory devices, interrupt controllers, and I/O devices.

  • Gain insight into the internal architecture and operations of microprocessors.

  • Learn Assembly Language to apply low-level logic toward computational problem solving.

Computer Architecture vs. Computer Organization

  • Computer Architecture:

    • Focuses on logical attributes visible to the programmer that directly affect program execution.

    • Encompasses the instruction set, bit representations of data types (numbers, characters), I/O mechanisms, and memory addressing techniques.

    • Key considerations include Reduced Instruction Set Computing (RISC), Complex Instruction Set Computing (CISC), and pipelining.

    • Example: Deciding whether a processor supports a multiply instruction.

  • Computer Organization:

    • Focuses on the physical operational units and interconnections that realize architectural specifications.

    • Encompasses hardware details transparent to the programmer, such as control signals, peripheral interfaces, and memory technology.

    • Example: Implementing multiplication via a dedicated hardware multiplier versus repeated addition.

  • Interrelationship:

    • Computer organization must implement a specific architectural specification.

    • Different organizations can share an identical architecture (e.g., all Intel Pentium processors share the same architecture but differ in organizational implementation).

Computer Level Hierarchy


Computer level hierarchy from Level 0 digital logic to Level 6 user level
  • Level 6 (User): Executable Programs.

  • Level 5 (High-Level Language): Compilers and languages such as C++, Java, and FORTRAN.

  • Level 4 (Assembly Language): Assembly Code.

  • Level 3 (System Software): Operating System and Library Code.

  • Level 2 (Machine): Instruction Set Architecture.

  • Level 1 (Control): Microcode or Hardwired control.

  • Level 0 (Digital Logic): Circuits, Gates, etc.

Programming Language Classifications

  • High-Level Language (HLL):

    • Formatted close to natural language (e.g., C++, Java, C#.NET).

    • Translated into machine code via a Compiler; each high-level statement typically translates into multiple machine instructions.

  • Machine Language (ML):

    • The native language of the computer, directly executed from memory.

    • Composed of numeric instructions consisting of an operation code (opcode) and zero or more operands (e.g., opcode 40 increments the AX register; opcode 05 with operand 0005 adds 0005 to AX).

  • Assembly Language:

    • Low-level symbolic representation maintaining a one-to-one correspondence with machine language instructions.

    • Instruction format components:

    • Label (always optional)

    • Mnemonic (always required)

    • Operand(s) (required depending on instruction)

    • Comment (always optional)

Program Execution and Toolchain


Assembly language instruction sequence showing AX register values and memory storage
  • Sample Execution Flow:

    • mov ax, 5: Sets ax to 05.

    • add ax, 10: Updates ax to 15.

    • add ax, 20: Updates ax to 35.

    • mov [0120], ax: Moves the value 35 into memory address 0120.

    • int 20: Program interrupt/termination.

  • Core Development Tools:

    • Assembler: Converts assembly source code into machine language (object file).

    • Linker: Combines two or more object files into a single executable file.

    • Debugger: Executes programs step-by-step to view source code and inspect/modify memory.

    • Emulator: Simulates execution environments to run code and inspect/modify register contents (e.g., EMU8086).

System Applications and Practical Value

  • Enables informed hardware purchasing decisions by clarifying performance tradeoffs between components (e.g., memory size vs. CPU clock speed).

  • Reveals internal hardware operations and low-level representations of data and instructions for optimal execution efficiency.

  • Essential for building low-level software components: Compilers, Operating Systems, Device Drivers, Embedded Systems, and Games.