2.4.3

Assembly & Machine Code

Test yourself

Assembly Language

Assembly language was the first type of programming language to come about after machine code programming.

Illustrative background for Assembly languageIllustrative background for Assembly language ?? "content

Assembly language

  • Assembly language was the first type of programming language to come about after machine code programming.
  • Assembly language uses 3 letter mnemonics for key actions (such as INP for input), this makes them easier to remember for a developer.
Illustrative background for Little man computerIllustrative background for Little man computer ?? "content

Little man computer

  • The Little Man Computer (LMC) is a virtual implementation of a Von Neumann processor that allows people to test out a basic assembly language compiler.
  • This allows users to see how the registers and memory locations are used in a processor.
  • The LMC has 11 assembly instructions.
Illustrative background for contentIllustrative background for undefined ?? "content
Illustrative background for Little man computer addressingIllustrative background for Little man computer addressing ?? "content

Little man computer addressing

  • Assembly language is low level and can use different types of address to access memory locations.
  • The LMC only supports direct addressing of memory locations.

Machine Code Instructions

Machine code is a low-level language that controls the CPU.

Illustrative background for Machine code instructionsIllustrative background for Machine code instructions ?? "content

Machine code instructions

  • When your program is run it is converted to machine code instructions.
  • Machine code instructions will have different sized instructions based on their architecture.
    • 64-bit processors will have instructions that are 64bit in size.
  • These machine code instructions are split into sections.
Illustrative background for Machine code instructions cont.Illustrative background for Machine code instructions cont. ?? "content

Machine code instructions cont.

  • The first section is basic machine operation. This is the instruction to perform, such as addition, represented in binary.
  • The second part is the addressing mode. The addressing mode is usually stored in two bits.
    • The addressing mode tells the processor which type of addressing to use on the operand code or opcode for short.
  • The final part of the instruction is the operand or opcode, which will be translated differently depending on the type of address mode used.

Jump to other topics

1Components of a Computer

2Software & Software Development

3Exchanging Data

4Data Types, Data Structures & Algorithms

5Legal, Moral, Cultural & Ethical Issues

6Elements of Computational Thinking

6.1Thinking Abstractly

6.2Thinking Procedurally

6.3Thinking Logically

7Problem Solving & Programming

8Algorithms

Go student ad image

Unlock your full potential with GoStudent tutoring

  • Affordable 1:1 tutoring from the comfort of your home

  • Tutors are matched to your specific learning needs

  • 30+ school subjects covered

Book a free trial lesson