CMSC 140 Self Test Chapter 1
Example of preprocessor directive
#include <iostream>
Internally, CPU consists of two parts
Control Unit and Arithmetic and Logic Unit
True or False: Machine language is an example of high-level language
False
RAM
a computer's main memory
Variable
a named storage location in the computer's memory used for holding a piece of information
Syntax
a set of rules that must be followed when constructing a program
Algorithm
a set of well-developed steps for performing a task or solving a problem
Job of the CPU
fetch information, decode it, execute the cycle
Software engineering
field that encompasses designing, writing, testing, debugging, documenting, modifying and maintaining computer programs
Logic Errors
mistakes that cause the running program to produce incorrect results
Variables
programmer-designed names of memory locations that hold data
Preprocessor
reads source code (#)
decode
stage where CPU analyzes instructions and encode it in a form of a number and then generate an electronic signal
Source code
statements written by the programmer
T/F: CPU only really understands instructions that are written in machine language
true
Punctuation
used to mark the beginning or the end of a statement or separate items in a list
Compiler
used to translate each source code instruction into the appropriate machine language instruction.
Hardware components
Input device, output device, processing unit, communication device, storage device
Hardware
Physical components of the computer
Process of translating a source file sequence
Source code -> preprocessor -> modified source code -> compiler -> object code -> linker -> executable code
Software
another term for computer program
Run-time error
asking the computer to do something it cannot do
Operators
characters or symbols that perform operations
Binary code
consists of 0's and 1's