Software components#
Now let’s discuss the different software components that we need to have a functioning computer. Remember: software comprises the set of programs, procedures, and routines associated needed to operate a computer.
Machine language#
A computer can only process binary: a stream of ones and zeros. Binary is the computer’s language. Instructions for the computer are also stored as ones and zeros that the computer must decode and execute.
Assembly language#
Assembly language is a human-readable instruction mode that translates binary opcode into assembly instruction. A CPU cannot process or execute assembly instructions, so an encoder is required that can convert assembly language to machine language.
Assembler#
An assembler translates an assembly language program into machine language. The code snippet below is an assembly program that prints “Hello, world!” on the screen for the X86 processor.
section .data
text db 'Hello, world!'
section .text
global _start
_start:
mov rax, 1
mov rdi, 1
mov rsi, text
mov rdx, 14
syscall
mov rax, 60
mov rdi, 0
syscall
High-level languages#
Assembly language is referred to as a low-level language because it’s a lot like machine language. To overcome these shortcomings, high-level languages were created.
These are called programming languages, and they allow us to create powerful, complex, human-readable programs without large numbers of low-level instructions. Some of the most famous high-level languages are: