Eli5: how does assembly code work?

470 views

Eli5: how does assembly code work?

In: 24

11 Answers

Anonymous 0 Comments

The CPU of a computer speaks a particular language (machine language) that is hard-wired onto the chip, and is therefore extremely fast, but only a few dozen instructions are available.

Assembly language is a human-friendly (relatively speaking) version of machine language that is easily and directly translatable to it.

The upside of assembly is that you have the full power of the chip at your fingertips, and can accomplish certain tasks at a blazingly fast speed.

The downside is that it can take thousands of lines of code to actually accomplish anything but the very simplest of tasks.

Higher-level languages abstract away from the assembly level, then rely on translation programs to convert programs to machine language, so the chip knows what to do.

Those translation programs may or may not optimize your code in a way that meets your needs, so some higher-level programming languages allow you to write some of your code in assembly, for those times when you want to do things YOUR way.

You are viewing 1 out of 11 answers, click here to view all answers.