When we write a program, you might think that it's easy for the computer to understand what we are writing and that it understands all programming languages. Instead, your computer cannot understand any programming language except 1: binary. Binary, also called machine code, is a programming language so simple that it only uses 1s and 0s representing on and off. Converting a program written in Java into binary code takes many steps and processes, but knowing how it works can help you understand many important concepts like later on.
Here's how it works:
You might have noticed that I have mentioned the word compiler many times throughout this course. What does it mean? A compiler translates your programming file into binary. The compiler has a counterpart called an interpreter. Although both the compiler and the interpreter accomplish the same task of turning a programming file into binary, they both do it in different ways making both useful in different scenarios.
________________________________________________________________________________
Examples of languages that use a compiler:
Examples languages that use an interpreter:
________________________________________________________________________________
How a compiler translates regular code into binary:
How an Interpreter translates regular code into binary:
________________________________________________________________________________
Attributes of Compilers:
Attributes of Interpreters:
________________________________________________________________________________
What to use when?
Copyright © 2024 PieceOfAPie - All Rights Reserved.
Powered by GoDaddy
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.