Programming - All Flashcards
State the definition of an algorithm
A series of steps to solve a problem which can be expressed in structured English, pseudocode or as a system flowchart.
State the features of machine code language
Processor specific: one language per processor architecture, won’t work on another machine.
Designed with hardware in mind.
One assembly language command will be translated into one binary instruction in machine code.
Translated using an assembler
Describe what is meant by a variable.
An identifier in a program that names a location in memory where data is stored while being used in a program. Its value can be changed as the program runs.
How do you know if you’re making an error?
You know by the different colour coded text, and also by the error it gives you when you begin to run your program
State what is meant by a syntax error, giving an example.
An error in the code where it does not meet the grammar rules for that language.
For example, “While x=3” without the word “do” at the end or a misspelt keyword like “wriet” instead of “write”.
What is an integer variable?
A whole number.
What is a real number variable?
A number that can have decimals or fractions.
What is a constant?
A set number that is programmed into the code, different to a variable that can change and be changed in the program.
What is assembly language?
To write code at the processor level we use assembly language, which is also known as second generation language. There are lots of different assembly languages; one for every different processor architecture. The code is written in mnemonics, abbreviated text commands such as LOAD, STORE, ADD.
What are mnemonics?
Abbreviated text commands such as LOAD, STORE, ADD, used in assembly language.
What is machine code?
Program code in binary is referred to as machine code and is known as the first generation of programming languages.
What are higher level programming languages?
Human beings find it easier to write programs in languages that are suited to the type of problem and languages that look more like normal languages. 3rd generation languages were invented for this, otherwise known as high level languages. There are lots of different programming languages to suit different types of problem. Examples are Python, C++, Javascript.
What are assemblers?
Converts assembly language into machine code. A simple conversion as every assembly language instruction is translated into a single machine code instruction.
What are compilers and interpreters?
Converts a high level programming language into machine code. This is a more complex translation as a single instruction in Delphi, for example, can result in many machine code instructions.
What is a string?
Zero or more characters. A string can be null (empty), just one character or several characters. Most programming languages have a limit of 255 characters if the programmer does not specify the maximum size.