Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 5.13 KB

File metadata and controls

40 lines (35 loc) · 5.13 KB

<- .instruction-sets ->

Interface Between Software And Hardware

  • The idea of a general purpose computer was conceived in 1837 by Charles Babbage, but a working general purpose computer (ENIAC) was not built until 1945. Earlier computers such as Atanasoff–Berry (used to solve linear equations) and Bombe (used for deciphering Enigma encrypted messages) are special-purpose computers that are hard-wired to perform a specific task, which means that you are unable to utilize their underlying hardware to do anything else. An instruction set is the gateway to utilizing a general purpose computer's flexibility, allowing one to instruct a re-programmable (general-purpose) computer on how to interact with its underlying hardware to perform tasks ranging from weather prediction to space shuttle guidance while abstracting away the implementation details of those hardware components. It presents that gateway in human-readable mnemonics (English words), where each mnemonic has an unique set of zeros and ones that corresponds to an operation a CPU with the same instruction set implementation would know how to perform. An instruction set is said to be Turing Complete if it can perform any computational task. The followings instruction sets I will talk about are all Turing Complete. On a funny note, it turns out that one instruction from x86 is enough to be Turing Complete.

CISC vs RISC

  • Early computer was moving toward a CISC (Complex Instruction Set Computer) architecture. CISC was characterized by large (e.g. numbers of instructions) and complex (e.g. multiple operations performed by one instruction) instruction sets. The upsides of this design are flexibility and smaller overall codebase in the expense of a more complex processor implementation. Sometimes in the 70s, Professor David Patterson from University of California, Berkeley observed that compilers for high-level languages such as C only use a subset of CISC instruction set. His team realized that a simpler instruction set is sufficient enough to perform most tasks. Simpler instruction set also means simpler processor implementation, allowing more chip space to be used for memory. The work by Patterson led to two popular RISC processor designs: MIPS and ARM. As it stands today, CISC architectures, x86 and x86-64, still dominate the desktops, laptops, and servers industry while RISC architectures, MIPS and ARM, dominate the embedded space — although ARM is way more popular than MIPS. To be honest, you really don't see MIPS outside of routers and academic textbooks.

section overview



further readings


  • Azeria Labs: from ARM assembly to ARM exploitation. If you want to learn about ARM, this is it

.tools <- RERM -> .languages