Skip to content

Architecture#

Although CPU architecture is a very complex topic, it can be boiled down to what's known as an "Instruction Set".

Think of that as the language that software has to talk to be able to give the CPU instructions, such as "what's the difference between these two numbers?" or "multiply this number with that one". The Instruction Set is basically the language the CPU expects to see our instructions in.

There are many different types of Instruction Sets but the ones you're going to see mentioned the most are x86 and arm. The x86 standard is what's used by Intel and AMD CPUs whilst the arm standard is used by a whole spectrum of processors, especially those you'll find in your mobile phone.

The primary difference between x86 and arm is the use case: x86 represents high speed and high power consumption versus arm which offers "good enough" speed and but with lower power usage.

Each has its advantages but arm is quickly catching up to x86 (Intel and AMD) in terms of performance so you'll see it more and more as you explore the server types that services like Amazon Web Services have to offer.

The biggest concern when working with x86 versus arm is software compatibility. When a software engineer (programmer) writes code, that code has to be compiled to meet the architecture of the CPU. That's what x86 and arm represent: the instructions inside of a particular "brand" of CPU. Intel and AMD CPUs are x86 CPUs, where as ARM based processor, like the Snapdragon you find in mobile phones, uses the arm architecture. When programmers write their software, they're compiling for a "target platform", which simply means they're compiling to x86 or arm.

To put this another way, imagine I write a book in my own custom language. No one else can read that language. Only me. This isn't true of programming languages, of course, but let's pretend in this case. How do I make it so that other people can read the book? I translate it to English, or Spanish, or Chinese, or Italian. You could say I compile my language to the architecture of the people reading it so that they can read it.

Because most software is compiled (which essentially means converting human language into the Instruction Set of a particular CPU architecture) for x86, this means if you're faced with the task of using that same software on an arm based architecture the software vendor will have to support that architecture by re-compiling the software to the architecture. If the software is Open Source Software (OSS) then you may be able to compile it yourself, but that's outside the scope of this book.

Unless you're dealing with building PCs and servers directly, you only need to understand that a CPU has an architecture type such as x86 and arm (the two most common) and software has to be compiled to work with the architecture.

This excellent article from Android Authority goes into far more detail than you need, but should you desire the gritty details then give it a read.