#2 tran(OS)lations

      ||                                          || 
      ||          ||              ||    ||               ||      
||   ||          ||                         ||    ||    ||      ||    ||    ||    ||
||   ||    ||          ||          ||          ||    ||      ||    ||          ||
||   ||    ||    ||    ||    ||    ||    ||                  ||    ||    ||    ||
||   ||                                                                              ||
||                                                                                   ||
||   ||                                                                              ||
||   ||          ||                         
||   ||    ||    ||    ||          ||    ||    ||    ||      ||    ||    ||    ||
||   ||    ||    ||    ||    ||    ||    ||          ||    ||      ||    ||    ||    ||
||   ||    ||    || a  || series   || of || zines    ||    ||    ||      ||    ||    ||
||   ||    ||    ||    ||    ||    ||    ||    ||    ||    ||      ||    ||          ||
|| inputs  ||     <--      ||      <--   ||       <--    ||      <--     ||  inputs  ||
||         ||   hardwares  ||       OS   ||  softwares ||    users ||      ||
|| outputs ||      -->     ||       -->  ||    -->     ||       -->  ||  outputs ||  ||
||   ||    ||    ||    ||    ||    ||    ||    ||    ||    ||      ||
||   ||    ||  the graphic designer practice deconstructed to its rawer shape    ||  ||
        
programming languages' role explained by Wacky Science, in the "Computer Science" youtube video

Welcome !

In this quest of tracing back the mechanical process of a graphic design practice, we leave the hardwares behind to focus on the OS (Operating System). The core of the computer.
It is quite fascinating to realise that the OS holds the transition between software and hardware by its capacities to translate multiple computer languages. In fact, to be able to speak as humans to the machine, our command has to go through various layers of translations back and forth in seconds.
This second zine is an introduction to understand the back-end of the OS and the languages involved.

#1 the Operating System

The Operating System (OS) serves as software that oversees a computer’s resources. It bridges the gap between hardwares and softwares / users in a computer. The most common ones are Linux, Windows and Mac. The OS works like the brain of the computer. It takes inputs from the users, and then coordinates the hardwares to achieve the actions. The OS code is stored on the hard-disk, in a binary form. Only Linux code is open-source.

Virtual Terminal : A text-based interface which holds a space to welcome commands and pass them on to the shell. It takes input and display outputs. Unlike a graphical interface, the terminal provides direct access to the command line where users can perform tasks such as installing software, navigating directories, and editing files. It’s a powerful tool for executing commands, managing files, and controlling system processes.

Shell : It is the outer-layer of the OS. It is the mediator between the end-user and the kernel. There are various shell the user can choose from like zsh, bash, Seashell and many more. It parses the command written in the terminal (interface), and check if they are correct or not. If not it sends an error message back. If correct, it interprets the command and translate it to actions that the OS can execute. The shell itself does not convert source code to machine code. Instead, it often invokes interpreters or compilers that perform this task.

Interpreter : Invoked by the shell, the computer program directly executes the instructions written in a programming or scripting language. The Interpreter transforms high level language code into assembly language or machine language. An interpreter translates into machine code the lines and executes them one by one directly.

A compiler, does the same, as converting a high-level language input into a low-level language action. But the difference is that the compiler will first translate all the lines and then execute them.

System calls : The interaction between the interpreter and the kernel occurs through system call (or API, Application Programming Interface). These calls allow the interpreter to request services from the kernel. For example, when a script needs to read a file or create a new process, it makes API calls that the kernel understands. These calls are typically written in C or another low-level language that interfaces directly with the kernel. System calls are the only entry points into the kernel system.

Kernel : The inner-layer of the OS, or its core part. The kernel manages the system’s resources and facilitates communication between hardware and software components. t It is responsible to execute the command, by invoking the right OS libraries or devices drivers.

how is a command executed ?

  1. User input : the user types in the command in the terminal interface. Press enter.
  2. Shell parsing : The shell parses the command, check if it is correct and if it can be directly executed or passed to an interpreter
  3. Interpreter Invocation
  4. System calls : The interpreter executes the code, which may involve making system calls to the kernel to perform tasks.
  5. Kernel execution : The kernel processes these system calls, interacts with hardware, and manages system resources accordingly.
  6. Return values : The kernel sends results back to the interpreter, which may then output results to the shell or take further actions.

SHELL

KERNEL

system
calls

interpreter

#2 types of languages

A programming language is a way for users and developers to give instructions to the computer. It is based on a set of rules, syntax and words. The instructions, written in the programming language can make the computer perform tasks like changing an image size, scrapping content from a webpage, etc.

High-level language (HLL) : are human-readable languages based on English syntaxes. They simplify coding by hiding complex hardwares details. Developers can focus on logic and functionnality. It becomes easier to develop and debug complex code. HLL languages examples : Javascript, C++, Python, etc.

Assembly language is a low-level programming language that helps to communicate directly with computer hardware. It uses mnemonics✶ to represent the operations that a processor has to do. Which is an intermediate language between high-level languages like C++ and the binary language. It uses hexadecimal and binary values, and it is readable by humans. The computer requires an assembler to translate the Assembly language to machine level language.

Machine language is a low-level programming language that is understood by computers. Machine language is made up of binary bits 0 and 1. Machine language is also known as machine codes or object code. As machine language consists of only 0 and 1, it is difficult to understand its raw form. Machine language cannot be understood by humans. The CPU processes this machine code as input. It is the only language the computer hardware can understand.✶✶

✶The last paragraph has been translated into binary code, on the right.

01001101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01101001 01110011 00100000 01100001 00100000 01101100 01101111 01110111 00101101 01101100 01100101 01110110 01100101 01101100 00100000 01110000 01110010 01101111 01100111 01110010 01100001 01101101 01101101 01101001 01101110 01100111 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01110100 01101000 01100001 01110100 00100000 01101001 01110011 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01101111 01101111 01100100 00100000 01100010 01111001 00100000 01100011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 01110011 00101110 Machine 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01101001 01110011 00100000 01101101 01100001 01100100 01100101 00100000 01110101 01110000 00100000 01101111 01100110 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01100010 01101001 01110100 01110011 00100000 00110000 00100000 01100001 01101110 01100100 00100000 00110001 00101110 00100000 01001101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01101001 01110011 00100000 01100001 01101100 01110011 01101111 00100000 01101011 01101110 01101111 01110111 01101110 00100000 01100001 01110011 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01100011 01101111 01100100 01100101 01110011 00100000 01101111 01110010 00100000 01101111 01100010 01101010 01100101 01100011 01110100 00100000 01100011 01101111 01100100 01100101 00101110 00100000 01000001 01110011 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01100011 01101111 01101110 01110011 01101001 01110011 01110100 01110011 00100000 01101111 01100110 00100000 01101111 01101110 01101100 01111001 00100000 00110000 00100000 01100001 01101110 01100100 00100000 00110001 00101100 00100000 01101001 01110100 00100000 01101001 01110011 00100000 01100100 01101001 01100110 01100110 01101001 01100011 01110101 01101100 01110100 00100000 01110100 01101111 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01100001 01101110 01100100 00100000 01101001 01110100 01110011 00100000 01110010 01100001 01110111 00100000 01100110 01101111 01110010 01101101 00101110 00100000 01001101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01100011 01100001 01101110 01101110 01101111 01110100 00100000 01100010 01100101 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01101111 01101111 01100100 00100000 01100010 01111001 00100000 01101000 01110101 01101101 01100001 01101110 01110011 00101110 00100000 01010100 01101000 01100101 00100000 01000011 01010000 01010101 00100000 01110000 01110010 01101111 01100011 01100101 01110011 01110011 01100101 01110011 00100000 01110100 01101000 01101001 01110011 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01100011 01101111 01100100 01100101 00100000 01100001 01110011 00100000 01101001 01101110 01110000 01110101 01110100 00101110 00100000 01001001 01110100 00100000 01101001 01110011 00100000 01110100 01101000 01100101 00100000 01101111 01101110 01101100 01111001 language 00100000 01110100 01101000 01100101 00100000 01100011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 00100000 01101000 01100001 01110010 01100100 01110111 01100001 01110010 01100101 00100000 01100011 01100001 01101110 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01100001 01101110 01100100 00101110

From Python : print("This a converter test.
From python to assembly language.")

To Assembly Language :

  section .data
  message db "This a converter test. 
From python to assembly language.", 0 section .text global _start _start: ; write the message to stdout mov rax, 1 ; syscall: write mov rdi, 1 ; file descriptor: stdout mov rsi, message ; pointer to message mov rdx, 73 ; message length syscall ; exit the program mov rax, 60 ; syscall: exit xor rdi, rdi ; exit code 0 syscall

✶ mnemonics

Mnemonics are memory aids that help individuals remember information more easily. In computer language, it often involves associating complex information with simpler, more memorable constructs, such as phrases, acronyms, rhymes, or visual imagery. For example :

add = addition

j = jump

loads = lui

sources

  • Basic Computer Hardware - Learn the Essentials, by Robert Lanni, on the Lincoln Tech Blog, 2024
  • How the shell works internally when entering a command, by Samuel A. Florez, on the Medium website, 2019
  • How Code Works: A Beginner’s Guide to the Journey from High-Level Languages to Machine Code by Rishi, on the Medium website, 2024
  • What is machine language ? on the Geeksforgeeks website, 2023
  • What is assembly language ? on the Geeksforgeeks website, 2023
  • Introduction to compilers, on the Geeksforgeeks website, 2025
  • Operating systems, on the wikipedia website
  • Computer hardware, on the wikipedia website
  • Code converter Python to Assembly Language, on the Code Convert.ai website
  • Text to Binary Converter, on the Rapidtables.com website
  • Organization of Computer Systems:§ 2: ISA, Machine Language, and Number Systems , by M.S Schmalz, on the Cise.ufl website
  • Question on the relation between the shell and the kernel,, answered by the bot assistant, on Quora website, 2024
  • Computer science explained in 17 minutes, by Wacky Science, on its youtube channel, 2024