Every processor runs machine code, this is a bunch of 1s and 0s. Machine code is directly created from assembly. So at some level a computer or phone is running assembly. However assembly has two problems:;
1. It’s really difficult to write and takes a long time to write.
2. Assembly written for one processor will not work on a different type of processor.
This means that if you spend loads of extra effort writing a program in assembly, you have to write it all again as soon as you need it to work on another device.
We have languages that are one level above assembly, like C. This language is still pretty hard to write, but a lot easier than assembly. We have something called a compiler that takes our C code, and we tell it what kind of processor we want it to run on, and it automatically creates the machine code that works for that CPU.
Above C we have other languages, like Python, Java, Go etc. These are even easier to write code with, but as we aren’t quite as close to programming the hardware directly it isn’t always possible to write code that runs as quickly.
The processor itself generally doesn’t run firmware. However the processor on a phone is actually a collection of several different components together, like the CPU and the GPU. A GPU is a more specialized piece of hardware, and so might have a tiny processor inside it that runs firmware to translate signals from the CPU into actions for the GPU to run.
Latest Answers