Professional Documents
Culture Documents
1.1 Why is the computer used by so many different people, in so many different
professions?
because they can be programmed. Computeres are not designed to do just one job, but any job that
their programs tell them to do
- Main memory
- Input device
- Output device
-The control unit and the arithmetic and logic unit ( ALU )
Fetch: the cpu fetches the instructions from the main memory into register.
Then the next instruction in the sequence of program instruction is being hold
Because data stored in main memory can be access quickly but easily erase when
the computer is turend off. On the other hand secondary storage can hold data for
long periods of time- even when there is no power to the computer and can be
loaded into main memory as needed
System software : prograns that control and manage the basic operation of a
computer
Application software: programs that make a computer useful for everyday tasks ex
Microsoft word, powerpoint,…
1.8 What fundamental set of programs control the internal operations of the
computer’s hardware?
1.9 What do you call a program that performs a specialized task, such as a virus
scanner, a file-compression program, or a data-backup program?
- Utility programs
- Applications software
- A computer’s CPU can only process instruction that are written in machine
language which are a stream of binary numbers. The process of encoding an
algorithm in machine language is very difficult and tedious. That’s why we
invented programming language to make it easier to develop computer programs.
1.13 What is the difference between a high-level language and a low-level
language?
Low level language is close to the level of the computer and high level language
are closer to the level of human-readabilty than computer-readability.
- Is mean a program can be wrriten on one type of computer and then run on many
other types of system.
1.15 Explain the operations carried out by the preprocessor, compiler, and linker.
The preprocessor searches for special line that start with the # symbol. These lines contain
commands that cause the preprocessor to modify the source code in some way.
The compiler then translate each source code instruction into appropriate machine language
instruction. This process ill uncover any syntax error that may be in the program, if the program is
free of syntax errors. The compiler stores the translated machine language instructions, which are
called object code in an object file.
The linker then combines the object file with the necessary library routines. Once the linker has
finished with this step, an executable file is created.
1.16 Explain what is stored in a source file, an object file, and an executable file.
The source file contain statements written by the programmer (which are called
source code)
The object file contains machine language instructions but it’s not a complete
program.
Keyword is words that have a special meaning and can only be used for their
intended purposes. Programmer-Defined-Identifier are words or name made up by
the programmer for their own purposes such as holding datas.
Line is just that single line as it appears in the body of a program, most lines
contain something meaningful or empty. The blank line just make the program
more readable
Because the information stored in it may change while the program is running.
1.22 What happens to a variable’s current contents when a new value is stored
there?
The variable’s current contents are then replaced with the new value.
Input
Processing
Output
1.25 What four items should you identify when defining what a program is to do?
Purpose
Input
Process
Output
1.26 What does it mean to “visualize a program running”? What is the value of
such an activity?
Visualize a program running is imagining what the computer screeen looks like
while the program is running. IT will help you determined most of the program’s
output.
The programmer will start reading the program or a portion of a program, step
through each statement to help locate run-time errors.
1.29 Describe what a compiler does with a program’s source code.
The compiler then translate each source code instruction into appropriate machine language
instruction. This process ill uncover any syntax error that may be in the program, if the program is
free of syntax errors. The compiler stores the translated machine language instructions, which are
called object code in an object file.
A run-time error is an errỏ that occurs while the program is running. These are
usually logical errors, such as mathematical mistake.
1.31 Is a syntax error (such as misspelling a key word) found by the compiler or
when the program is running?
Yes, while the compiler translates each statement into machine code, it alsso
uncover syntax error
1.32 What is the purpose of testing a program with sample data or input?
Testing for runtime error and dettermine if a logical error is present in the
program.