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
Q

what is one Hertz equal to?

A

1 pulse per second

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

what is the prefix on hertz nowadays for computers?

A

giga (10^9)

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

what is a multicore CPU?

A

a single component with two or more independent cores?

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

How is data stored in a computer?

A

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

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

what are the 0 and 1 digits of the computers binary number system called?

A

bits (binary digits)

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

how many bits are there in a byte?

A

8

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

what is a byte?

A

the minimum storage unit in a computer (8 bits)

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

what is an encoding scheme?

A

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

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

what do most encoding schemes do to translate characters?

A

they translate characters into predetermined strings of bits

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

what is a good way to think of a computers memory?

A

a work area for executing a program

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

what does a computers memory consist of?

A

an ordered sequence of bytes for storing programs and data that the program is working with

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

what must happen with the a program and data before they can be executed by the CPU?

A

the data and program must be moved into the computers memory

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

what unique thing does every byte have?

A

a unique address

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

what is the unique address of a byte used for?

A

it is used to locate the byte for storing and retrieving data

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

what does RAM stand for?

A

Random Access Memory

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

Generally speaking the more RAM a computer has, the _____ it can run. But there is a _____ to this rule of thumb

A

faster

limit

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

Can you have an empty memory byte?

A

no, memory bytes are never empty, but they may have information that is useless to your program

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

is data stored in the computer memory saved permanently?

A

no. as soon as the power is turned off all memory stored in RAM is lost

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

why is RAM considered volatile data storage?

A

all memory is lost when the systems power is turned off

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

How is data stored permanently?

A

on storage devices

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

How is information in permanent storage used or accessed?

A

the data is moved to memory

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

why is data not accessed directly from permanent storage?

A

memory operates at a must faster speed than permanent storage devices can

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

what are the three main types of storage devices?

A
  1. magnetic disc drives
  2. Optical disc drives (CD and DVD)
  3. USB flash drives
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

what is a drive?

A

a device used to operate a storage medium

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

how does a storage medium function?

A

it physically stores data and program instructions

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

what is the function of a hard disc dive?

A

storing data and programs permannently

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

what does CD stand for?

A

compact disc

52
Q

what are the two types of CDs?

A
  1. CD-R

2. CD_RW

53
Q

what is the difference between a CD-R and a CD-RW?

A

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
Q

what is the difference between a CD and a DVD?

A

a DVD can hold more data

55
Q

what does USB stand for?

A

Universal Serial Bus

56
Q

What is a USB flash drive?

A

a device for string and transporting data

57
Q

what is a computers native language?

A

machine language

58
Q

what is machine language?

A

a set of built-in primitive instructions in the form of binary code

59
Q

assembly language is a ____ ____ language

A

low level

60
Q

how does assembly language work?

A

mnemonics are used to represent each of the machine-language instructions. the assembly source file is translated into machine language by the assembler

61
Q

what does platform-independent mean?

A

different machines could run one high level language program

62
Q

what are instructions in a high level language called?

A

statements

63
Q

what is a program written in high level language called?

A

source code or source program

64
Q

what must happen to a source code for the machine to execute the program?

A

translation via the interpreter or compiler

65
Q

what language does the CPU understand?

A

Machine language/binary number system

66
Q

what is an assembly language?

A

a language which uses mnemonics to respresent machine language instructions, which are then translated into machine language by the assembler

67
Q

what is an assembler?

A

a program which translate assembly language into machine language

68
Q

what is a high-level programing language?

A

an English-like platform-independent language which is translated by a interpreter/compiler

69
Q

what is a source program/code?

A

a program written in high-level language

70
Q

what is an interpreter?

A

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
Q

what is a compiler?

A

a translator of high level language that translates the entire source code into a machine code file, and then executes that file

72
Q

what are the three major task of an operating system?

A
  1. controlling and monitoring system activities
  2. allocating and assigning system resources
  3. scheduling operations
73
Q

the operating system (OS) is the _____ important ___ that runs on a computer

A

most

program

74
Q

what does an OS do?

A

manages and controls a computers activities

75
Q

_____ allows a single prgram to execute multiple tasks at the same time

A

multithreading

76
Q

_____ allows multiple programs to run simultaneously by sharing the CPU

A

multiprogramming

77
Q

______ (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

A

multiprocessing

parallel processing

78
Q

what is #include ?

A

a compiler preprocessor directive

79
Q

what does #include do?

A

tells the compiler to include the iostream library in this program

80
Q

why is a library like iostream called a header file in C++?

A

because it is usually included at the head of the program

81
Q

what is the function of using namespace std; ?

A

it tells the compiler to to used the standard namespace

82
Q

what is std the abbreviation of?

A

standard

83
Q

namespace is a mechanism to avoid ____ ____ in a large program

A

naming conflicts

84
Q

what is a function?

A

a construct that contains statements

85
Q

Every C++ program is ___ from a _____ function

A

main

86
Q

main functions must be enclosed in a _____

A

block { }

87
Q

what are the symbols { and } called?

A

left and right braces

88
Q

every statement in C++ must end with a ________

A

semicolon ( ; )

89
Q

what is the semicolon placed at the end of every statement called?

A

a statement terminator

90
Q

what does cout stand for?

A

console output

91
Q

what is

A

stream insertion operator

92
Q

what is the function of

A

sends a string (outputs) to the console

93
Q

a string must be enclosed in _____ _____.

A

quotation marks

94
Q

What does endl stand for?

A

end line

95
Q

what does sending endl to the console do?

A

ends a line and flushes the output buffer to ensure that the output is displayed immediately

96
Q

where is return 0; placed and what is its function?

A

it is placed at the end of every main function and tells the computer to exit the program

97
Q

what does the value 0 in return0; indicate?

A

it indicates that the program has terminated with a successful exit

98
Q

what does // mean?

A

that this line is a comment and is not part of the program

99
Q

what is a line comment?

A

a single line comment preceeded by double slashes //

100
Q

what does /* (imaginary text) */ mean?

A

that in between these two /*s is a block or paragraph comment

101
Q

what is a block comment?

A

a comment between two slashes like such /* */. the compiler ignores all comments between the two slashes

102
Q

C++ programs are ___ sensitive

A

case

103
Q

_____ (or ____ ___) are words which have specific meaning to the compiler and cannot be used in the program for other purposes

A

keywords

reserved words

104
Q

preproccessor directives (such as #include) _____ (are/are not) statement so _____(do/do not) put semicolons at the end of processor directives

A

are not

do not

105
Q

is it okay to put spaces between ?

A

no

106
Q

what is # used to denote?

A

a processor directive

107
Q

what do do?

A

encloses a library name when used with #iostream

108
Q

when are ( ) used?

A

with functions (such as main( ) )

109
Q

what are called?

A

angle brackets

110
Q

what does ; do?

A

marks the end of a statement

111
Q

What are the 4 rules and identifier must obey?

A
  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
Q

C++ is _____ sensitive

A

Case

113
Q

what are the three separate programs a c++ compiler contains?

A

preprocessor
compiler
linker

114
Q

C++ compiler preform three tasks: linking, preprocessing, and linking. What sequence does it do these tasks in?

A
  1. preprocessing
  2. compiling
  3. linking
115
Q

a preprocessor is a program that…..?

A

processes a source file before it is passed down to the compiler

116
Q

the preprocesser processes _______.

A

directives

117
Q

the compiler translates the intermediate file (from the ______) into a _____ _____ file

A

preprosesor

machine code

118
Q

what is a machine code file also known as?

A

an object file

119
Q

the linker links the machine code file with the _____ ____ ___ to form an _____ ____

A

supporting library files

executable file

120
Q

what does IDE stand for?

A

integrated development environment

121
Q

what does a syntax error result from?

A

errors in the codes construction (such as misspelled words or forgotten punctuation)

122
Q

_____ errors cause a program to terminate abnormally

A

runtime

123
Q

errors detected by the compiler are called ____ errors or _____ errrors

A

syntax

compile

124
Q

when do input errors occur?

A

when the program is waiting for a value but the user has actually already entered a value but the computer cannot handle it

125
Q

logic errors occur when……?

A

a program does not preform the way it was intended