Surprise Me!

x86-64 Assembly: Signed Integer Multiplication and Addition with IMUL & ADD (YASM on Ubuntu Linux)

2025-11-30 1 Dailymotion

Want to actually understand how signed integer multiplication works at the CPU level? In this straight-to-the-point x86-64 assembly tutorial we dive into the IMUL instruction - the proper way to multiply signed integers in YASM/NASM on Linux.

We cover:
* The difference between unsigned (MUL) and signed (IMUL) multiplication
* Two-operand vs three-operand IMUL forms
* Multiplying immediate values vs global variables
* Loading values into registers (mov) and performing fast multiplication
* Basic addition with ADD and INC
* Full working example that prints results so you can see it in action
* Why you should respect the ABI and save callee-saved registers (R12-R15)

Everything is built with YASM on Ubuntu, linked with a tiny C driver, and run instantly. No fluff, just real assembly code you can copy and run right now.

Code on screen, calculator verification, and clear explanation of every line. Perfect if you're learning low-level programming, reverse engineering, or just want to know what really happens when you write a = b * c; in C.

Introduction to Integer Arithmetic 00:00:00
Recommended Book and Resources 00:00:39
Instruction Set Overview 00:01:17
Addition Instruction (ADD) 00:01:43
Unsigned vs Signed Multiplication 00:02:20
Signed Multiplication with IMUL 00:03:05
IMUL Three-Operand Form 00:03:40
IMUL Two-Operand Form 00:04:12
Squaring with IMUL 00:04:50
Setting Up the Sample Program 00:05:08
Data Section and Strings 00:06:13
Text Section and External Functions 00:06:58
Math Function Entry Point 00:08:01
Multiply Test Function Setup 00:08:42
Multiplying Immediate Values 00:09:48
Printing the Immediate Result 00:10:21
Running and Verifying Immediates 00:12:53
Multiplying Global Variables 00:13:49
Loading Globals into Registers 00:14:07
IMUL with Globals Demo 00:14:37
Addition with INC and ADD 00:15:36
Final Results and Verification 00:17:09
Wrap-Up and Closing 00:17:22
Outro and Subscribe Request 00:17:44

Thanks for watching!

Find us on other social media here:
- https://www.NeuralLantern.com/social

Please help support us!

- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras