How Code Becomes Binary

November 10, 2019 by thepigeonfighter Programming

Humans have been inventing programming languages since the 1940s. But what exactly is a “programming language” and how do computers understand different programming languages? Well read on to find out.

The Basics

Before we dive into things we have to break down what code is. Code is a series of instructions given to some sort of CPU. It doesn’t matter if you are using Java, C-based language or something silly like PHP. At the end of the day it all becomes just an instruction (or more likely a series of instructions) that is passed to the CPU to be executed. Let’s take a look at a line of code that is written in JACK which is a high level Java-like language.

Jack Code

This is a great example of high level code doing what high level code does best. That is, making complicated things easy and saving the end user a lot of work. The above line of code simply prints to a window the words “The average is “. The high level code makes it almost human readable. You could walk up to your futuristic voice controlled computer (that neeeevvvverr misunderstands you) and say: “Hey computer do output print string the average is “. This is all well and good, but if you say that to a CPU you won’t get very far.

Gilmore Girls

A computer can only understand binary. A CPU doesn’t understand the above line of code anymore than Rory understands Tristan’s stupid hair. It turns out that most modern high level languages deal with the problem in similar ways. In fact they all, generally speaking, follow this architecture:

Code Compilation

This was probably a little more complicated than you were expecting. Especially since the problem seems so simple, right? You need to translate an instruction into binary, so why not do something like this:

Simple Code Compiliation

The answer is: you totally could! But it may not be the best choice. The following diagram might help.

Code Jump

The jump between high level code to binary is a titanic leap, as we will see as we continue. To translate from high level code directly to binary would be a major task. The other design has broken that task down into more manageable chunks like this:

Small Code Jump

Having a design like this not only makes the job of building the translators easier, it also opens up all sorts of possibilities to swap any of the above components without compromising the whole system. Now if you want to implement a new high level coding language, you only have to jump 34 meters instead of the entire 100. The same could be said about swapping up different styles of assembly code or virtual machine code. This comes in really handy, because on every single level of this design there are thousands of different implementations in use today. It doesn’t matter if you are writing code for a toaster or a space station, if the compiler is set up correctly it will translate the code down to hardware specific needs. This design gives us much more flexibility than the simpler version. So now lets follow this line of code through the translation layers. It starts in jack like this:

Jack Code Line

It gets translated into the much less readable virtual machine language layer:

VM Code

As a note, the multiple calls to ‘String.appendChar’ are creating the requested string “The average is “. Each of those constants represent a character code that is linked to a particular letter.

This is then translated into the much less easy to read Assembly code:

``` //(----VMCOMMAND--------) //----label WHILE_END0----// (WHILE_END0) //(----VMCOMMAND--------) //----push constant 15----// @15 D=A @SP //SP = 15 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.new 1----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.40 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @6 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.new 0;JMP (Main$ret.40) //(----VMCOMMAND--------) //----push constant 84----// @84 D=A @SP //SP = 84 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.41 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.41) //(----VMCOMMAND--------) //----push constant 104----// @104 D=A @SP //SP = 104 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.42 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.42) //(----VMCOMMAND--------) //----push constant 101----// @101 D=A @SP //SP = 101 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.43 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.43) //(----VMCOMMAND--------) //----push constant 32----// @32 D=A @SP //SP = 32 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.44 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.44) //(----VMCOMMAND--------) //----push constant 97----// @97 D=A @SP //SP = 97 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.45 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.45) //(----VMCOMMAND--------) //----push constant 118----// @118 D=A @SP //SP = 118 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.46 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.46) //(----VMCOMMAND--------) //----push constant 101----// @101 D=A @SP //SP = 101 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.47 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.47) //(----VMCOMMAND--------) //----push constant 114----// @114 D=A @SP //SP = 114 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.48 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.48) //(----VMCOMMAND--------) //----push constant 97----// @97 D=A @SP //SP = 97 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.49 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.49) //(----VMCOMMAND--------) //----push constant 103----// @103 D=A @SP //SP = 103 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.50 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.50) //(----VMCOMMAND--------) //----push constant 101----// @101 D=A @SP //SP = 101 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.51 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.51) //(----VMCOMMAND--------) //----push constant 32----// @32 D=A @SP //SP = 32 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.52 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.52) //(----VMCOMMAND--------) //----push constant 105----// @105 D=A @SP //SP = 105 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.53 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.53) //(----VMCOMMAND--------) //----push constant 115----// @115 D=A @SP //SP = 115 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.54 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.54) //(----VMCOMMAND--------) //----push constant 32----// @32 D=A @SP //SP = 32 A=M M=D @SP //SP++ M=M+1 //(----VMCOMMAND--------) //----call String.appendChar 2----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.55 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @7 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @String.appendChar 0;JMP (Main$ret.55) //(----VMCOMMAND--------) //----call Output.printString 1----// //--------CALLING Main----- //Pushing Stack Snapshot to Stack @Main$ret.56 D=A @SP A=M M=D @SP M=M+1 @LCL D=M @SP A=M M=D @SP M=M+1 @ARG D=M @SP A=M M=D @SP M=M+1 @THIS D=M @SP A=M M=D @SP M=M+1 @THAT D=M @SP A=M M=D @SP M=M+1 //---------Stack Snapshot Complete ------ @6 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @Output.printString 0;JMP (Main$ret.56) //(----VMCOMMAND--------) //----pop temp 0----// //Popping from stack @SP M=M-1 A=M D=M @5 M=D ```
That is a lot of code! Lastly, it gets translated into glorious binary.
``` 0000000000001111 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000110110 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000110 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010000 1110101010000111 0000000001010100 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000001101100 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001101000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000010100010 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100101 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000011011000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000000100000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000100001110 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100001 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000101000100 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001110110 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000101111010 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100101 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000110110000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001110010 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000111100110 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100001 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001000011100 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100111 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001001010010 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001100101 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001010001000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000000100000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001010111110 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001101001 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001011110100 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000001110011 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001100101010 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000000000100000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000001101100000 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000111 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010001 1110101010000111 0000001110001111 1110110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000001 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000010 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000011 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000100 1111110000010000 0000000000000000 1111110000100000 1110001100001000 0000000000000000 1111110111001000 0000000000000110 1110110000010000 0000000000000000 1111000111010000 0000000000000010 1110001100001000 0000000000000000 1111110000010000 0000000000000001 1110001100001000 0000000000010010 1110101010000111 0000000000000000 1111110010001000 1111110000100000 1111110000010000 0000000000000101 1110001100001000 ```
So in this case, a single line of code when translated into binary resulted in 917 separate instructions to the CPU. Although, even that number is low, because the instructions that write the characters to the screen were omitted; instead they were merely pointed to in the instructions. These instructions assume that the “Output.printString” function has been created elsewhere in code. So the instructions merely point to that function and say that it needs to be executed. Isn’t it nice to have high level languages?