Machine speed, human thinking
★ Must-know
📌 A computer obeys literally, follows instructions in order unless told to jump, and never guesses what an unclear instruction means.
📌 An instruction can be carried out only when it has one single definite meaning, so phrases such as “buy some rice” or “charge a fair price” must be made precise before a computer can act on them.
Further detail
Machine versus person
The place values in a binary number double from right to left: .
The binary number 1101 equals decimal 13 because its active place values are 8, 4, and 1.
0 and 1 → binary → machine instructions
★ Must-know
Further detail
Machine → Assembly → High-level
Whole file versus one instruction
★ Must-know
Compilation checks the whole source file, produces a machine-code file saved on disk, and then runs that prepared file.
Interpretation begins execution immediately and translates each instruction when it is reached during the run.
Compilation generally starts more slowly but runs faster and detects faults before execution, while interpretation starts faster but translates during execution and finds a fault only when its instruction is reached.
Further detail
Source → translation → running process
★ Must-know
A programmer is responsible for every instruction a computer carries out, including instructions that were omitted for an input case.
To make an everyday instruction executable, replace vague judgments with a specific condition and a specific output, such as displaying PASSED when the grade is 75 or more and FAILED otherwise.
Further detail
Ambiguous instruction → no exact action
Compilation Versus Interpretation
| Dimension | Compilation | Interpretation |
|---|---|---|
| Translation timing | Whole source file before execution | One instruction at a time during execution |
| Output | Saved machine-code file | Nothing saved from the translation |
| Startup and execution | Slower startup, faster running | Faster startup, slower running |
| Error detection | Whole file checked before anything runs | Error found when the faulty line is reached |
Pon a prueba tus conocimientos sobre Introduction to Computer Programming con 11 preguntas de opción múltiple con correcciones detalladas.
1. What is the primary role of a computer in relation to data and instructions?
2. What is a computer in the context of programming?
Memoriza los conceptos clave de Introduction to Computer Programming con 11 tarjetas de memoria interactivas.
What is a computer?
A machine that stores data and carries out instructions exactly as given.
Computer Definition
Machine that stores and executes instructions.
Who is a programmer?
The person who decides instructions and is answerable for their actions.
Importa tu curso y la IA genera hojas, cuestionarios y tarjetas de memoria en 30 segundos.
Generador de hojas