• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/105

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

105 Cards in this Set

  • Front
  • Back
Which of the following is not a control statement?
assignment statement
In an artificial neural network, what input values will cause the processing unit below to produce an output of 1.

input : 1 -2 1
threshold: .5
Any combination in which the center input is 0 and at least one other input is 1
Which of the following does not require a Boolean structure?
assignment statement

Which of the following is actually constructed during a heuristic search?
search tree
what is ignored by the compiler?
comment statements
Which of the following is not constructed by a typical compiler?
source code
Most machine languages are based on the
Imperative paradigm
Correct
Which of the following is the scope of a variable?
The portion of the program in which the variable can be accessed
Which of the following learning technique results in an agent merely performing a pre-recorded sequence of steps?
imitation
Which of the following is not a step in the process of translating a program?
executing the program
Which of the following is not associated with object-oriented programming?
resolution
which of the following is not a type of statement found in a typical high-level imperative programming language?
Exclamatory statement
positions within arrays are identified by means of numbers called
indices
In an artificial neural network, which of the following pairs of weights would cause a processing unit with two inputs and a threshold value of 3 to produce an output of 1 only when both of its inputs are 1?
2 and 2
Correct
Because transistors were smaller and produced less heat than vacuum tubes, they allowed for the design of smaller and faster computers.
true
is one of several individuals credited for inventing the World Wide Web
tim berners-lee
The Hollerith Tabulating Co. eventually became Hewlett Packard.
false

became IBM
What is the maximum number of items the binary search algorithm would check when searching a list with 8 items?
4
What is the maximum number of items the sequential search algorithm would check when searching a list with 8 items?
8
n the TurtleSim program, the following code is supposed to move in a square. What is the missing command?
x = 4;
while (x > 0) {
_____________;
x = x - 1;
}
left(90);

right(90);
Which of the following set of instructions defines an algorithm in the formal, strict sense?
x = 3;
while (x > 0) {
x = x - 1;
}
In the TurtleSim program, what is the command to declare a variable called y?
double y;
When searching within the list
(Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom)
which of the following entries will be found most quickly using the sequential search algorithm?
lewis
Write the value of y after the algorithm finishes

x = 5;
y = 7 + x;
12
Choose all numbers that will be printed by the code below?
X = 5;
while (X < 8) {
print (X);
X = X + 1
}
5
6
7

Suppose the binary search algorithm was being used to search for the entry Pat in the list
(Nathan, Oliver, Pat, Quincy, Roger, Stacey, Tom).
The first entry in the list to be considered would be [v1].
The second entry in the list to be considered would be [v2].
The first entry in the list to be considered would be Correct Quincy.
The second entry in the list to be considered would be Correct Oliver.
Write the value of y after the algorithm finishes

x = 4;
y = 18;
if (x > y) {
y = x;
}
else {
y = x + y;
}
22
Write the value of y after the algorithm finishes

y = 4;
x = y;
while ( x > 0 ){
y = y + x;
x = x - 1;
}
14
Match the following pseudocode types to its corresponding example

x = 1;
x = x + 1;

if (x > 5) {
print A;
}

while (x < 5) {
x = x + 1;
}
sequencing


conditional


iteration
Given the following loop
x = 3;
while (x < 5) {
x = x + 1;
}
Identify the following parts of the looping structure:
Test: [v1]
Modification: [v2]
Initialization: [v3]
Test: Correct x < 5
Modification: Correct x = x + 1;
Initialization: Correct x = 3;
What is the fewest number of bits needed to represent 23 things?
5
how many bits in a byte ?
8
Convert the 6-bit two’s complement number 101010 to its equivalent decimal representation. />
-22
What is the hexadecimal representation of the bit pattern 01111101?
7D
What is the unsigned binary representation of 20?
10100
How many states can be represented using 6 bits?
2^6
64
Which of these is the sign-magnitude representation for -5?
1101
If C=1 in the following circuit, select all combinations of values at inputs A, B and D that give an output of 0.
A=0, B=0, C=1, D=1


A=0, B=1, C=1, D=0


A=1, B=0, C=1, D=0


A=1, B=1, C=1, D=0
What is the sum of the following unsigned binary numbers:
1101
+ 0111
------
?
10100
Using the following 4-bit two's complement addition problems, identify whether an error condition like overflow occurs:


0101
+ 0110

1010
+ 1010

1010
+ 0111
[c1] [c2] [c3]
error
error
no error
Partial Credit
The following message was originally transmitted with odd parity in each short bit string. Choose the bit strings that contain errors.

11001 11011 10110 00000 11111 10101 10001 00100 01110
10001


11011


00000
look on word doc for circuit problem!!!
!
Perform the following mathematic operation using 8-bit two's complement arithmetic.
Two's Complement
-35 [a1]
- 12 [a2]
[a3]
Correct Answers for: a1 11011101
Correct Answers for: a2 11110100
Correct Answers for: a3 11010001
Partial Credit
Convert -28 from decimal to the following formats:
6 bit Signed-magnitude binary - [v1]
6 bit Two's complement binary - [v2]
Specified Answer for: v1 111100
Specified Answer for: v2 100100
Solve the following 4-bit two's complement addition problems:
0101
+ 0110

1010
+ 1010

1010
+ 0111
[b1] [b2] [b3]


While it is no required for the completion of these problems, you may want to check your work by translating the problem and your answer into decimal.
Specified Answer for: b1 1011
Specified Answer for: b2 0100
Specified Answer for: b3 0001
Which of the following instructions (as described in Appendix C of the text) changes the contents of a memory cell?
30AB
Suppose the memory cells at addresses 00 through 0B in our simple machine contain the following program. The program counter is set to 00.

Address Contents
00 2A
01 A0
02 3A
03 06
04 10
05 0A
06 B0
07 04
08 30
09 0A
0A 0C
0B 00

what will happen when program executed?
.
The program will be executed without problems and the machine will halt.
Which of the following is not a form of parallel processing?
SISD
Which of the following instructions (as described in Appendix C of the text) is essentially an unconditional jump?
Answer
B033
Consider the following program in machine language:
21AA
11BB
31CC
C000

What is contained in memory cell CC after the program halts?
Not enough information has been supplied to determine the contents of memory cell CC.
Which of the following instructions (as described in Appendix C of the text) will not change the contents of register 5?
A508
Which of the following instructions falls in the category of data transfer instructions?
LOAD
Which of the following instructions does not fall in the category of arithmetic/logic instructions?
JUMP
Which of the following is not an activity performed entirely within a CPU?
fetch instructions
Consider the following program in machine language:
11AA
21BB
31CC
C000

What is contained in memory cell CC after the program halts?
BB
Consider the following program in machine language:
21AA
31BB
31CC
C000

What is contained in memory cell CC after the program halts?
AA
Which of the following is not contained in a CPU?
memory cell
The most common form of RAM is:
dynamic ram
Which of the following components of an operating system maintains the directory system (structure)?
file manager
Which of the following components of an operating system is executed as the result of an interrupt signal?
dispatcher
Which of the following events is detrimental to an operating system’s performance?
deadlock
Which of the following components of an operating system is not part of the kernel?
shell
What is the UNIX command that lists all files in the current directory?
ls
Which of the following is not a means of performing multiple activities at the same time?
virtual memory
Data packets can be as large as necessary to contain all of its data.
false
The command you should use in the Windows Command Prompt application to determine the IP address(es) of a particular URL is:
nslookup
Once connected to a Web server, the connection remains in place until the client requests a page from another client.
false
Which layer of the TCP/IP hierarchy decides the direction in which message segments are transferred across the Internet?
network
The Internet began with the development of:
ARPANet
The DNS translates your human-readable address into an IP number.
true
a proxy server
forwards certain data packets and is a security solution
Which of the following is an Internet application that is named after its underlying protocol?
FTP
When you type ipconfig in the Windows Command Prompt application, it returns all of the following information about your computer's network connection, except:
hostname
Which layer of the TCP/IP hierarchy chops messages into units whose size is compatible with the Internet?
transport
Which layer of the TCP/IP hierarchy is responsible for obtaining the correct address for a message’s destination?
application
A wireless connection still needs a wired connection at some point in order to communicate with the Internet.
true
www.pcs.cnu.edu is a:
domain
Which phase(s) of the Fetch-Decode-Execute cycle might involve the bus? (More than one answer may apply - select all that apply)
Execute


Fetch
What is the result of the following operation:
10101010
XOR 11110000
01011010

5A
Correct
Suppose the memory cells at addresses A0 through AB in our simple machine contain the following program. The program counter is set to A0.

Address Contents
A0 10
A1 00
A2 21
A3 FF
A4 B1
A5 AA
A6 22
A7 00
A8 32
A9 00
AA C0
AB 00

What will be the contents of memory cell 00 after the program halts, assuming that memory cell 00 initially contained the value FF?
Answer: [a]

What will be the contents of memory cell 00 after the program halts, assuming that memory cell 00 initially contained the value AB?
Answer: [b]
Specified Answer for: a FF
Specified Answer for: b 00
In the movie "The Net", several times Sandra Bullock's character is shown entering the IP address "23.75.345.200". Is this a valid IP address? If not, explain what is wrong with this address.
No, because it is not a correct dotted decimal notation which is something IP addresses have to be written in

Yes, this is an invalid IP Address. Each octet in the IP Address can only be between 0 and 255.
What is the result of the following operation:
10101010
AND 11110000
10100000

A0
What is the UNIX command that copies the file “one.txt” and names the copy “two.txt”?
cp one.txt two.txt
Incorrect
Name three types of network topologies.
[a]
[b]
[c]
bus
star
mesh
irregular
ring
If register 0 contains the pattern 01101001 before executing the instruction A003 (as described in Appendix C of the text), what bit pattern will be in register 0 after the instruction is executed?
00101101
2D
If registers 5 and 6 contain the bit patterns 54 and 58 respectively, what bit pattern will be in register 4 after executing the instruction 5456? (as described in Appendix C of the text.)
AC
10101100
Which of the following activities occur during the FETCH phase? (More than one answer may apply - select all that apply)
Fetch an instruction from memory into the instruction register


Read the contents of the program counter


Increment the program counter
Correct
Identify the parts of the URL used to take you to the CPSC125 Syllabus:
https://www.pcs.cnu.edu/academics/cpsc125/syllabus.html
domain [a]
filename [b]
protocol [c]
pathname [d]
Identify the parts of the URL used to take you to the CPSC125 Syllabus:
https://www.pcs.cnu.edu/academics/cpsc125/syllabus.html
domain www.pcs.cnu.edu
filename syllabus.html
protocol https://
pathname /academics/cpsc125/
program counter
Used by the CPU to hold the address of the next instruction to be fetched.
opcode
The part of a machine instruction that identifies which circuit in the CPU to activate.
register
A location within the CPU for temporary data storage.
bus
The communication path between a CPU and primary (main) memory.
process
Activity of executing machine instructions
program
Static description of an algorithm in the form of machine instructions.
scheduler
Keeps track of active processes
dispatcher
Assigns time slices to the individual processes
ADD the contents of register 5 and 6 as though they were values in two's complement notation and put the result in register 4.
5456
STORE the contents of register A to the memory cell at address B6.
3AB6
LOAD register 7 with the contents of the memory cell at address A5.
17A5
XOR the contents of register 1 with the contents of register 2 and put the result in register 0. (NOTE: use 9 for the opcode of XOR)
9012
AND the contents of register 2 with the contents of register 0 and put the result in register 4. (NOTE: use 8 for the opcode of AND)
8420
JUMP unconditionally to the instruction at address 84.
B084
LOAD register 7 with the value A5
27A5
Write a program using the instruction set referenced in Appendix C of the text, which increments (increases) the two’s complement number stored in memory cell AA by the contents of memory location FF. The result should be place back in memory cell AA.

Give the machine instructions and specify where in memory your program needs to be located (in other words, define what your PC should be set to before the program is executed). Assume that all registers and memory cells are empty with the exception of those you specify to contain your program.
Answer
PC= AA
Machine Instructions:
10AA
11FF
5201
32AA
C000




PC = 10
10 10
11 AA
12 11
13 FF
14 52
15 01
16 32
17 AA
18 C0
19 00
10 - 10AA
12 - 11FF
14 - 5201
16 - 32AA
18 - C000
Partial Credit
Write a program using the instruction set referenced in Appendix C of the text, which puts the value 99 into memory cell 88 if memory cell 77 contains value 66. For all other values in memory cell 77 it should put value 55 into memory cell 88.

Give the machine instructions and specify where in memory your program needs to be located. Assume that all registers and memory cells are empty with the exception of those you specify to contain your program.
PC = A0
A0 10
A1 77
A2 21
A3 66
A4 22
A5 99
A6 23
A7 55
A8 B1
A9 AE
AA 33
AB 88
AC B0
AD B0
AE 32
AF 88
B0 C0
B1 00


A0 - 1077
A2 - 2166
A4 - 2299
A6 - 2355
A8 - B1AE
AA - 3388
AC - B0B0
AE - 3288
B0 - C000