Chapter 1 Flashcards

1
Q

In basic terms, software contains the instructions that….

A

Tell a computer what to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a computer?

A

A computer is an electronic device that stores and processes data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In general what is hardware comprised of

A

The visible, physical elements of a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In general what does software do?

A

It provides invisible instructions that control the hardware and make it preform specific tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The term programming means….

A

To create (or develop) software, which is also called a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the six major hardware components a computer consists of?

A
  1. CPU
  2. Memory
  3. Storage devices
  4. Input devices
  5. Out put devices
  6. Communication devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Give 2 examples of an input device

A

Mouse

Keyboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Give 2 examples of output devices

A

Monitor

Printer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give 2 examples of communication devices

A

Modem

Network interface cards (NIC)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the subsystem that interconnects all of the computers components called?

A

The bus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where can you find the bus in personal computers?

A

In the motherboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a motherboard?

A

A circuit case that connects the parts of a computer together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what does CPU stand for?

A

central processing unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is the CPU?

A

the computers brain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is the function of the CPU?

A

it retrieves instructions from memory and executes them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are the two components of the CPU?

A
  1. a control unit

2. an arithmetic/logic unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is the function of the control unit in the CPU?

A

it controls and coordinates the actions of the other components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what is the function of the arithmetic/logic unit in the CPU?

A

it preforms numeric operations (addition, subtraction, multiplication, division) and logical operations (comparisons)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what are transistors?

A

tiny electric switches

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what are CPUs built on?

A

small silicon semiconductor chips that contain millions of transistors for processing information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what does the internal clock of a computer do?

A

it emits pulses at a constant rate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

what do the constant pulses of a computer internal clock do?

A

they synchronize the pace of operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what is the function of a higher speed internal clock in a computer?

A

the higher speed enables more instructions to be executed in a given period of time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what is the unit of measurement for the speed of a computers internal clock?

A

Hertz (Hz)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
what is one Hertz equal to?
1 pulse per second
26
what is the prefix on hertz nowadays for computers?
giga (10^9)
27
what is a multicore CPU?
a single component with two or more independent cores?
28
How is data stored in a computer?
by setting a sequence of switches on or off. When the switch is off the value is zero and when the switch is on the value is 1. These 0's and 1's are interperted as digits in the binary number system
29
what are the 0 and 1 digits of the computers binary number system called?
bits (binary digits)
30
how many bits are there in a byte?
8
31
what is a byte?
the minimum storage unit in a computer (8 bits)
32
what is an encoding scheme?
a set of rules that governs how a computer that governs how a computer translates characters, numbers, and symbols into data the computer can actually work with
33
what do most encoding schemes do to translate characters?
they translate characters into predetermined strings of bits
34
what is a good way to think of a computers memory?
a work area for executing a program
35
what does a computers memory consist of?
an ordered sequence of bytes for storing programs and data that the program is working with
36
what must happen with the a program and data before they can be executed by the CPU?
the data and program must be moved into the computers memory
37
what unique thing does every byte have?
a unique address
38
what is the unique address of a byte used for?
it is used to locate the byte for storing and retrieving data
39
what does RAM stand for?
Random Access Memory
40
Generally speaking the more RAM a computer has, the _____ it can run. But there is a _____ to this rule of thumb
faster | limit
41
Can you have an empty memory byte?
no, memory bytes are never empty, but they may have information that is useless to your program
42
is data stored in the computer memory saved permanently?
no. as soon as the power is turned off all memory stored in RAM is lost
43
why is RAM considered volatile data storage?
all memory is lost when the systems power is turned off
44
How is data stored permanently?
on storage devices
45
How is information in permanent storage used or accessed?
the data is moved to memory
46
why is data not accessed directly from permanent storage?
memory operates at a must faster speed than permanent storage devices can
47
what are the three main types of storage devices?
1. magnetic disc drives 2. Optical disc drives (CD and DVD) 3. USB flash drives
48
what is a drive?
a device used to operate a storage medium
49
how does a storage medium function?
it physically stores data and program instructions
50
what is the function of a hard disc dive?
storing data and programs permannently
51
what does CD stand for?
compact disc
52
what are the two types of CDs?
1. CD-R | 2. CD_RW
53
what is the difference between a CD-R and a CD-RW?
CD-R is for read only permanent storage; the user cannot modify its contents once they are recorded CD-RW can be used like an hard disk; you can write data ontp the disk and then overwrite that data with new data
54
what is the difference between a CD and a DVD?
a DVD can hold more data
55
what does USB stand for?
Universal Serial Bus
56
What is a USB flash drive?
a device for string and transporting data
57
what is a computers native language?
machine language
58
what is machine language?
a set of built-in primitive instructions in the form of binary code
59
assembly language is a ____ ____ language
low level
60
how does assembly language work?
mnemonics are used to represent each of the machine-language instructions. the assembly source file is translated into machine language by the assembler
61
what does platform-independent mean?
different machines could run one high level language program
62
what are instructions in a high level language called?
statements
63
what is a program written in high level language called?
source code or source program
64
what must happen to a source code for the machine to execute the program?
translation via the interpreter or compiler
65
what language does the CPU understand?
Machine language/binary number system
66
what is an assembly language?
a language which uses mnemonics to respresent machine language instructions, which are then translated into machine language by the assembler
67
what is an assembler?
a program which translate assembly language into machine language
68
what is a high-level programing language?
an English-like platform-independent language which is translated by a interpreter/compiler
69
what is a source program/code?
a program written in high-level language
70
what is an interpreter?
a translator of high-level language which reads one statement from the source code, translates into machine code, executes it immediately and moves onto the next statement
71
what is a compiler?
a translator of high level language that translates the entire source code into a machine code file, and then executes that file
72
what are the three major task of an operating system?
1. controlling and monitoring system activities 2. allocating and assigning system resources 3. scheduling operations
73
the operating system (OS) is the _____ important ___ that runs on a computer
most | program
74
what does an OS do?
manages and controls a computers activities
75
_____ allows a single prgram to execute multiple tasks at the same time
multithreading
76
_____ allows multiple programs to run simultaneously by sharing the CPU
multiprogramming
77
______ (also called ____ ____) uses two or more processors together to preform sub tasks concurrently and then combine the solutions of the subtasks to obtain the solution for the entire task
multiprocessing | parallel processing
78
what is #include ?
a compiler preprocessor directive
79
what does #include do?
tells the compiler to include the iostream library in this program
80
why is a library like iostream called a header file in C++?
because it is usually included at the head of the program
81
what is the function of using namespace std; ?
it tells the compiler to to used the standard namespace
82
what is std the abbreviation of?
standard
83
namespace is a mechanism to avoid ____ ____ in a large program
naming conflicts
84
what is a function?
a construct that contains statements
85
Every C++ program is ___ from a _____ function
main
86
main functions must be enclosed in a _____
block { }
87
what are the symbols { and } called?
left and right braces
88
every statement in C++ must end with a ________
semicolon ( ; )
89
what is the semicolon placed at the end of every statement called?
a statement terminator
90
what does cout stand for?
console output
91
what is
stream insertion operator
92
what is the function of
sends a string (outputs) to the console
93
a string must be enclosed in _____ _____.
quotation marks
94
What does endl stand for?
end line
95
what does sending endl to the console do?
ends a line and flushes the output buffer to ensure that the output is displayed immediately
96
where is return 0; placed and what is its function?
it is placed at the end of every main function and tells the computer to exit the program
97
what does the value 0 in return0; indicate?
it indicates that the program has terminated with a successful exit
98
what does // mean?
that this line is a comment and is not part of the program
99
what is a line comment?
a single line comment preceeded by double slashes //
100
what does /* (imaginary text) */ mean?
that in between these two /*s is a block or paragraph comment
101
what is a block comment?
a comment between two slashes like such /* */. the compiler ignores all comments between the two slashes
102
C++ programs are ___ sensitive
case
103
_____ (or ____ ___) are words which have specific meaning to the compiler and cannot be used in the program for other purposes
keywords | reserved words
104
preproccessor directives (such as #include) _____ (are/are not) statement so _____(do/do not) put semicolons at the end of processor directives
are not | do not
105
is it okay to put spaces between ?
no
106
what is # used to denote?
a processor directive
107
what do do?
encloses a library name when used with #iostream
108
when are ( ) used?
with functions (such as main( ) )
109
what are called?
angle brackets
110
what does ; do?
marks the end of a statement
111
What are the 4 rules and identifier must obey?
1. Can only be composed of letters, digits, and underscores 2. Must start with a letter or underscore 3. Cannot be a reserved word 4. Can be any length but is usually capped at 30
112
C++ is _____ sensitive
Case
113
what are the three separate programs a c++ compiler contains?
preprocessor compiler linker
114
C++ compiler preform three tasks: linking, preprocessing, and linking. What sequence does it do these tasks in?
1. preprocessing 2. compiling 3. linking
115
a preprocessor is a program that.....?
processes a source file before it is passed down to the compiler
116
the preprocesser processes _______.
directives
117
the compiler translates the intermediate file (from the ______) into a _____ _____ file
preprosesor | machine code
118
what is a machine code file also known as?
an object file
119
the linker links the machine code file with the _____ ____ ___ to form an _____ ____
supporting library files | executable file
120
what does IDE stand for?
integrated development environment
121
what does a syntax error result from?
errors in the codes construction (such as misspelled words or forgotten punctuation)
122
_____ errors cause a program to terminate abnormally
runtime
123
errors detected by the compiler are called ____ errors or _____ errrors
syntax | compile
124
when do input errors occur?
when the program is waiting for a value but the user has actually already entered a value but the computer cannot handle it
125
logic errors occur when......?
a program does not preform the way it was intended