Save
Computer Science GCSE WJEC
Unit 1
Program Construction
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Evan Crecraft
Visit profile
Cards (31)
What is the purpose of a programming language?
To write code understandable to the
programmer
View source
Why must programmer's code be translated?
Because processors can only run
machine code
View source
What are the three types of translators?
Compiler
,
interpreter
, and
assembler
View source
What does a compiler do?
Converts
high-level language
into
machine code
View source
How does an interpreter function?
Converts
code
one line at a time
View source
What does an assembler convert?
Low-level
assembly language
into
machine code
View source
What is a high-level language?
Language independent of
specific
computer types
View source
What is source code?
Programming code not yet
translated
View source
What is object code?
Translated
code that can be
executed
View source
What happens if an interpreter encounters an error?
It stops the
translation
process
View source
What is an advantage of using a compiler?
Code can be run multiple times after
translation
View source
What is a disadvantage of a compiler?
Errors
are reported only at the end
View source
What is lexical analysis?
Removing
comments
and replacing
tokens
View source
What is parsing in programming?
Analyzing a string of
tokens
View source
What is a syntax error?
Error due to
incorrect
code structure
View source
What is a runtime error?
Error that occurs during
program execution
View source
What is a logical error?
Incorrect behavior due to
code
mistakes
View source
What is a linking error?
Error due to missing
library functions
View source
What is a rounding error?
Difference between
rounded
and actual values
View source
What is a truncation error?
Difference between
truncated
and
actual
values
View source
What is the definition of a compiler?
Converts
high-level language
into
machine code
View source
What is the definition of an interpreter?
Converts
code
one line at a time
View source
What is the definition of an assembler?
Converts low-level
assembly language
into
machine code
View source
What is the definition of high-level language?
Language independent of
specific
computer
types
View source
What is the definition of source code?
Programming code not yet
translated
View source
What is the definition of object code?
Translated
code that can be
executed
View source
What are the processes involved in lexical analysis?
Remove comments and unneeded spaces
Replace
keywords
,
constants
, and identifiers with tokens
View source
What are the processes involved in syntax analysis?
Check
tokens
for correct syntax
Produce
error messages
for syntax errors
View source
What are the processes involved in semantic analysis?
Check variable
declarations
and usage
Ensure correct
data types
for variables
Validate
operators
for variable types
View source
What are the processes involved in code generation and optimization?
Generate
machine code
Optimize code for efficiency and speed
View source
What types of programming errors exist?
Syntax errors
Runtime errors
Logical errors
Linking errors
Rounding errors
Truncation errors
View source