Skip to main content

Revisiting Abstracting


Earlier in this course, we talked about how programs are instructions that are given to a CPU. We can send binary code or bits to our CPU, then they'll use an instruction set to run those commands. But these CPUS might be from different manufacturers and may have different instructions. There might even be all kinds of different hardware components like video cards and hard drives that also have their own special interfaces. So how do we write a program that the hardware can understand? Well, one way would be to write a program for each possible combination of CPU and hardware using the native languages and interfaces of these components, but there are potentially millions of possible configurations of hardware. So how do we get anything to work with all this complex and diverse hardware? Well, thanks to the efforts of computer scientists and the principle of abstraction, we can now use programming languages to write instructions that can be run on any hardware.