1/8
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What are Trace tables
Give a simple way of testing that a price of code is working correctly and to find logic errors
Different logic gates
What are Truth tables
Truth tables are used to show all possible inputs and the associated output for each input.
Why is high level language used and cons
-High-level programming languages use code written in a way that is similar to a natural human language, such as English, making it easier to understand and use the language
-Using high-level languages leads to fewer errors and allows for more powerful and complex commands compared to low-level languages
-The same code will work for differ machines and processors
CON:high-level language must be translated into machine code (binary) before it can be run, as high-level languages cannot be executed directly by the CPU.
What are features of low level language and Cons
Low-level languages are used when a program must be executed quickly or when programmers need to write code that interacts directly with the hardware, such as device drivers
-Commands on machine code can be excited directly withoutt use for translator.
-Easier for a computer to run
-CONS:Code is difficult to read,understand and modify
-Progrmamed needs to know about internal structure of CPU and how it manages memory.
What are the two types of Low level languages
Machine code and Assembly language
What are Translators used for
translator changes (translates) a program written in one language into another language (usually machine code).This is so computer can understand it to execute the instructions.
What are the two types of translators
Interpreter-An interpreter converts high-level language one line at a time into machine code and executes it
-Complier-A compiler converts high-level language into machine code for execution at a later time. The entire program is converted at once.
Compare compiler with Translator
Execution speed-An interpreter is slower than a compiler because the code must be reinterpreted each time the program is run.
-Complier is only needed once to create the execrable file while interpreter is needed every time you want to run the program
-Complier returns a list of errors for programs once compiling is complete while interpreter will return first error it finds and then stop/useful for debugging.
-In complied programs they run more quickly compared to interpreter where programs run more slowly because the code is being translated as the program is running.