Comparing C to machine language

In this video, I compare a simple C program with the compiled machine code of that program.

Support me on Patreon:


Abderraouf Adjal says:

There is a GCC option to output assembly code, not ready linked binary.

Bercik87 says:

great clip sir!

Creative & Random says:

x=y and y=z look stupid, real person coding in assembly would probably do it without esi.

Atreyuguy590 says:

Gnu C Compiler. Except it’s not. It’s Gnu Collection Compiler. 😉

Noah König says:

virgin spotted

Radoi Mereut says:

Is assembly the same think as machine code?

D None says:

Why oh why AT&T? 😀

Ramchandra Thapa says:

Wow great teaching.. thank you so much..

mexykanu says:

Awesome video.

Heating up Duke says:

Awesome video, thank you !

A Okuyucu says:

A bad teacher.

Nick Harelton says:

Hey Ben! Thanks for all the great videos so far! As far as using paper, please continue to do so! My C++ course in college was done on paper as well as on the computer and the paper really helps drive home a lot of stuff and makes it more accessible in a better way for learning and teaching.

Konstantin Khitrin says:

Understanding prologue of the function, calling conventions, and how all of this relates to the stack is the most important part of being able to read disassembled code. When you brush it all off with, “just some stuff,” or “I don’t know what it does,” you might as well not bother with the video.

Benjamin Melikant says:

Don’t know if anyone else addressed it but I’m nearly 100% positive that movb $0x0, %al is storing a function code for the system call to printf()

Dumb dumb ass says:

great explained!

Paul Frazier says:

This might be an understatement, but; well, shit this sure is cool as hell.

Rickson Geometry Dash says:

imagine a person making a full-fledged modern game using the machine language

randomvids779 says:

I dont understand why you need to move Y to the esi register before moving it into the x. Is there some reason it cant just go directly from x to y

I/O Activity says:

“movl” is “move L”, “move long”, not “move one”, but otherwise cool tutorial and please keep using paper!

Daniel Zhang says:

Great Video

Dominik Büchler says:

Can someone explain me, why “-0xc(%rbp), %esi” => “%esi, “-0x8(%rbp)” wasn’t just compiled to “-0xc(%rbp), -0x8(%rbp)” ?
Means, why does it move the value to a temporary memory slot first instead of jsut moving it directly to the target location?

Peter D Morrison says:

10 minutes to explain? just display the C code along with the machine code and all will become clear in 60 seconds

Benjamin Melikant says:

Honestly until I watched this video I never really realized what local variables being allocated on the stack actually ‘meant’ (I kinda got it but couldn’t visualize it!) This really opened my eyes to how that works!

Onur Akay says:

Trump’s voice?

varun gupta says:

free c language classes or computer classes , please reply

Smin Rana says:

nobody does better than you

Sponge . says:

Amazing video! I like the pen and paper. It makes things much easier to follow and leaves room for the side notes. I, like most programmers (just a hobby, not professional), develop in a high level language so seeing how it transfers over into assembly was extremely interesting especially with how you explained it. I’ve been looking at a lot of assembly tutorials because I’m planning on trying to make a small scale programming language just to learn more about programming and how that software is “interpreted” by the CPU. This is by far the best thing I’ve found on the internet. Earned a like and sub from me! My new favorite computer science channel.

deepaudiobooks says:

great stuff

vnmsenior says:

The otool program can run on MAC unix and or Linux

flobo23 says:

if only my it teacher would have been half as gifted as you are^^

Dan Kelly says:

Um yeah… On the left is not machine language it’s assembly language.

DotCD says:

the real matrix bts

Jim Allen says:

Never once did I hear that x represents hexadecimal numbering. He kept referring to x8 and xc. It would be a lot more understandable if he just said that there’s a numbering system for computers that goes from 0-15 called hex and it’s identified by a 0x preceding the value. Dec 10 = Hex A and so on. In the flat address space, every integer is represented in 4 bytes (2^32). So it’s 4 bytes 8,9,10,11 (or 8,9,a,b) and the next 4 bytes starts at 0xc.

Ryan Mitchell says:

I’d love to see more videos like this, that go through each instruction, but perhaps even more thoroughly.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!