View Single Post
Old 08-18-2024, 06:45 PM   #49 (permalink)
freebeard
Master EcoModder
 
freebeard's Avatar
 
Join Date: Aug 2012
Location: northwest of normal
Posts: 28,328
Thanks: 8,003
Thanked 8,818 Times in 7,275 Posts
Quote:
That is incorrect.
Keep in mind that my knowledge base is two decades old. That said....

High level languages are generic, compilers (and interpreters) produce machine readable code.

builtin.com/software-engineering-perspectives/compiler
Quote:
Compilers are an essential part of software development. Compilers allow developers to write programs in high-level languages that humans can understand, but then convert that high-level language into a form that only a machine can read.

How Does a Compiler Work?
A compiler analyzes the source code and breaks it down into individual instructions that the computer can understand. In other words, a compiler turns human-readable program code into zeroes and ones.
  1. Lexical Analysis -- ]First, the compiler performs a lexical analysis in which it breaks the source code down into a sequence of tokens that represent the individual elements of the program like keywords, operators and identifiers.
  2. Syntactic and Semantic Analysis -- Next, the compiler performs a syntactic analysis. In this phase, it checks the source code for any syntax errors and ensures that it follows the correct language-specific rules and conventions. If any errors occur, the compiler throws an error and stops the compilation.
  3. Optimization -- Once the compiler has successfully parsed and checked the source code for errors, it runs low-level optimization on the code to improve its performance. This can involve reducing the amount of memory the program uses or optimizing the code for speed by rearranging instructions or eliminating unnecessary operations.
  4. Output Code Generation -- Finally, the compiler generates the machine code that corresponds to the original source code. This machine code lives in a binary file that the computer’s hardware can execute directly.
__________________
.
.
Without freedom of speech we wouldn't know who all the idiots are. -- anonymous poster

____________________
.
.
“You belong to Universe” -- the voice in Bucky Fuller's head
  Reply With Quote