0Pricing
Assembly Language & x86 Low-Level Systems Programming · Lesson

Arithmetic and Logic Operations

Learn to perform basic arithmetic (ADD, SUB, MUL, DIV) and logical operations (AND, OR, XOR, NOT) on data in registers and memory.

Intro to Assembly Ops

Welcome to the world of x86 Assembly's core operations! Today, we'll learn how CPUs perform basic math and logic.

These instructions are fundamental. They allow your programs to calculate values, make decisions, and manipulate data at the lowest level.

Addition: The ADD Instruction

The ADD instruction is used to add two numbers. It takes two operands: a destination and a source.

  • Syntax: ADD destination, source
  • The source value is added to the destination value.
  • The result is stored back in the destination operand.
  • Operands can be registers, memory locations, or immediate values (constants).

For example, ADD EAX, EBX adds the value in EBX to EAX, storing the sum in EAX.

All lessons in this course

  1. Data Movement Instructions (MOV, PUSH, POP)
  2. Arithmetic and Logic Operations
  3. Conditional Jumps and Loops
  4. Bitwise and Shift Instructions
← Back to Assembly Language & x86 Low-Level Systems Programming