02 - Section 6 - Translators and IDES Flashcards
What are the two types of computer languages?
High level
low level
What are examples of high-level languages?
Python
C++
JavaScript
What is an example of machine code?
Binary
What is an example of assembly code?
Little man computer
What do low-level languages consist of?
Machine code and binary code
What are the features of high-level languages?
- one high level instruction represents many instructions of machine code
- same code works for many machines and processors
- programmer can store data without knowing the memory structure
What are the advantages of high level languages?
Code is easy to read, understand and modify
What are the disadvantages of high-level languages?
- must be translated into machine code before a computer can understand it
- less memory efficient and slower (don’t have much control over what the CPU actually does)
What are the features of low-level languages?
- one instruction of assembly code usually represents one instruction of machine code
- usually written for one type of machine or processor
- the programmer needs to know about the internal structure of the CPU and how it manages its memory
What are the disadvantages of low-level languages?
-code is difficult to read, understand and modify
What are the advantages of low-level languages?
- commands in machine code don’t need to be translated, they can be executed directly
- you control exactly what the CPU does, so programs are more memory efficient and faster
What are the three types of translators?
Assemblers
Compilers
Interpreters
What are assemblers used to translate?
Assembly language into machine code
-there are many assembly languages and each one needs its own unique assembler
What are compilers and interpreters used to translate?
High-level code into machine code
What does a compiler do?
- translates all of the source code at the same time and creates one executable file
- only needed once to create the executable file
- returns a list of errors once compiling is complete
- once compiled the program runs quickly but compiling can take a long time
What does a interpreter do?
- translates and runs the source code one instruction at a time, doesn’t create an executable file
- needed every time you run a program
- will return the first error and stop (useful for debugging)
- programs will run more slowly
What is used to join separate compiled codes into one executable program?
A linker
What determines the type of translator?
The programming language and the IDE
What does IDE stand for?
Integrated development environment
What is an IDE?
A piece of software that provides features to help a programmer to develop their program
What is the code editor in an IDE?
- the main part of an IDE
- where the code is written
- most have line numbering and auto-colour coding
- good code editors will also have autocorrect, auto-indentation, auto-complete
What is the run-time environment in an IDE?
- allows the code to run quickly in an IDE
- this is done by using a start or run button
- can help identify logic errors in the program
What will an explorer window do in an IDE?
-help navigate through programs
What will an output window do in an IDE?
-show the output from when a program is run
What will error diagnostics and debugging tools do in an IDE?
- help to find and fix errors
- tell you a location of an error and often suggest ways to fix it
What do breakpoints do in an IDE?
-stop the program on certain lines, so you can gather information like the value of variables as the program is running
What are some common features of an IDE?
- a translator (source code into machine code)
- auto documentation, helps with the maintenance of programs (stored in a separate document to give a summary of what the code does)
- GUI builder, lets you design a user interface up by building it graphically rather than designing it with source code
What does GUI stand for?
Graphical user interface