Deck 6: Low-Level Programming Languages and Pseudocode

Full screen (f)
exit full mode
Question
Which of the following best describes a virtual computer?

A) A hypothetical computer with unlimited memory
B) A hypothetical computer with an unlimited instruction set
C) A hypothetical computer used to illustrate the features of a real machine
D) A programmed simulator for a real CPU like a Pentium 4
E) A programmed simulator of multiple CPUs
Use Space or
up arrow
down arrow
to flip the card.
Question
Which part of the Pep/9 instruction specifier indicates which instruction is to be carried out?

A) Operation code
B) Register specifier
C) Addressing mode specifier
D) Status bit
E) Accumulator
Question
Which of the following is not an operation that can be performed by a Pep/9 machine instruction?

A) Stop execution
B) Load the operand into the accumulator
C) Store the contents of the accumulator into the operand
D) Add the contents of the program counter to the accumulator
E) Read character input and store into the operand
Question
What is an assembler directive?

A) An assembly language instruction
B) An instruction to the assembler program
C) A human-readable comment
D) An alternative way to specify the operand
E) An instruction that begins the assembly language translation
Question
Given that the word length in the Pep/9 virtual computer is 2 bytes, how long is the information that flows into and out of the arithmetic/logic unit (ALU) of the PEP/9's CPU?

A) 16 bits
B) 8 bits
C) 32 bits
D) 64 bits
E) 128 bits
Question
Machine language is the set of binary-coded instructions that are executed directly by a computer.
Question
The Pep/9 character input instruction specifies the register into which a character is to be stored.
Question
An assembler directive is an instruction to the assembler itself.
Question
Assembly language is an abstraction, hiding some of the details that occur at the machine language level.
Question
A(n) _______________ is a hypothetical machine used to illustrate the features of a real machine.
Question
A(n) _______________ is a program that puts a machine-language program into memory so that it can be executed.
Question
An assembly-language program uses _______________ to represent instructions.
Question
In _______________ testing, tests are designed based on the logic of the code.
Question
How many hexadecimal digits are needed to describe the bit pattern in a byte? Why?
Question
What is the word length of the Pep/9 machine?
Question
What does an assembler accept as input and what does it produce as output?
Question
Where is the operand if the address mode specifier is 001?
Question
What is a memory address?
Question
What is an assembler directive?
Question
Which language is actually executed by the central processing unit of a computer?

A) High-level language
B) Assembly language
C) Machine language
D) Virtual language
E) Accumulator language
Question
Which of the following is not a valid mnemonic in the Pep/9 assembly language?

A) STOP
B) LDWA
C) ADDA
D) STWA
E) REPEAT
Question
Which of the following is true about black-box testing?

A) The test cases are based on the code.
B) The test cases are based on the input.
C) The test cases are based on the output.
D) The testing is performed by dedicated testers.
E) The testing is performed each time the program changes.
Question
Which of the following is part of a Pep/9 program instruction?

A) Accumulator
B) Simulator
C) Program counter
D) Specifier
E) Register
Question
In which of the following are tests designed based only on possible input data (rather than code)?

A) Clear-box testing
B) Code-coverage approach
C) Black-box testing
D) Test plan implementation
Question
Each machine language instruction performs a single complex task, such as sorting a list of numbers.
Question
Very few programs are written in machine language today.
Question
The Pep/9 system includes a simulator that can be used to input and run programs.
Question
Machine language programs are loaded into the Pep/9 simulator by specifying the instructions in hexadecimal.
Question
Assembly language allows program instructions to be specified using mnemonics that correspond to machine language instructions.
Question
In Pep/9 assembly language, decisions can be made using instructions that check the status of the accumulator.
Question
The data-coverage testing approach tests the limits of the program's data.
Question
Assembly language instructions are executed directly by the hardware of a particular computer.
Question
The input to an assembler is an assembly language program.
Question
A test case is a document that specifies how a program is to be tested.
Question
Which register contains the address of the next instruction to be executed?

A) Program counter
B) Instruction register
C) Index register
D) Accumulator
E) Status register
Question
Which Pep/9 addressing mode indicates that the operand contains the location of data rather than the data itself?

A) Accumulator
B) Direct
C) Immediate
D) Virtual
E) Status
Question
Which of the following does not represent a function of the accumulator (A register)?

A) Data loaded from main memory is stored in the accumulator.
B) Results of ALU operations are stored in the accumulator.
C) The contents of an instruction's operand specifier can be stored in the accumulator.
D) The contents of the accumulator can be subtracted from the instruction register.
E) The contents of the accumulator can be stored to main memory.
Question
A virtual computer is a hypothetical machine in which there are no limits on memory use.
Question
True or False? Character input and output in Pep/9 uses a principle called memory-mapped I/O.
Question
An assembler is used to execute an assembly language program directly on the central processing unit.
Question
In the Pep/9 machine, the contents of the A register can be compared to the contents of a place in memory.
Question
The code-coverage testing approach eliminates the need to test some of the code by covering it with a theoretical "black box."
Question
Konrad Zuse's 1936 patent application for the Z1 computer, with program and data modifiable in storage, anticipated the von Neumann architecture by nine years.
Question
The _______________ is a register used to hold the address of the next instruction to be executed.
Question
A(n) _______________ is a program that translates an assembly-language program into machine code.
Question
A(n) _______________ is an instruction for the translating program.
Question
___________________ is an approach to computer program testing that designs tests cases to ensure that each statement in the program is executed properly.
Question
____________________ is an approach to computer program testing that involves designing tests to ensure that the limits of the permissible data are covered.
Question
A(n) ______________________ is a section of code that repeats.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/49
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Low-Level Programming Languages and Pseudocode
1
Which of the following best describes a virtual computer?

A) A hypothetical computer with unlimited memory
B) A hypothetical computer with an unlimited instruction set
C) A hypothetical computer used to illustrate the features of a real machine
D) A programmed simulator for a real CPU like a Pentium 4
E) A programmed simulator of multiple CPUs
C
2
Which part of the Pep/9 instruction specifier indicates which instruction is to be carried out?

A) Operation code
B) Register specifier
C) Addressing mode specifier
D) Status bit
E) Accumulator
A
3
Which of the following is not an operation that can be performed by a Pep/9 machine instruction?

A) Stop execution
B) Load the operand into the accumulator
C) Store the contents of the accumulator into the operand
D) Add the contents of the program counter to the accumulator
E) Read character input and store into the operand
D
4
What is an assembler directive?

A) An assembly language instruction
B) An instruction to the assembler program
C) A human-readable comment
D) An alternative way to specify the operand
E) An instruction that begins the assembly language translation
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
5
Given that the word length in the Pep/9 virtual computer is 2 bytes, how long is the information that flows into and out of the arithmetic/logic unit (ALU) of the PEP/9's CPU?

A) 16 bits
B) 8 bits
C) 32 bits
D) 64 bits
E) 128 bits
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
6
Machine language is the set of binary-coded instructions that are executed directly by a computer.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
7
The Pep/9 character input instruction specifies the register into which a character is to be stored.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
8
An assembler directive is an instruction to the assembler itself.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
9
Assembly language is an abstraction, hiding some of the details that occur at the machine language level.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
10
A(n) _______________ is a hypothetical machine used to illustrate the features of a real machine.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
11
A(n) _______________ is a program that puts a machine-language program into memory so that it can be executed.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
12
An assembly-language program uses _______________ to represent instructions.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
13
In _______________ testing, tests are designed based on the logic of the code.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
14
How many hexadecimal digits are needed to describe the bit pattern in a byte? Why?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
15
What is the word length of the Pep/9 machine?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
16
What does an assembler accept as input and what does it produce as output?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
17
Where is the operand if the address mode specifier is 001?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
18
What is a memory address?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
19
What is an assembler directive?
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
20
Which language is actually executed by the central processing unit of a computer?

A) High-level language
B) Assembly language
C) Machine language
D) Virtual language
E) Accumulator language
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following is not a valid mnemonic in the Pep/9 assembly language?

A) STOP
B) LDWA
C) ADDA
D) STWA
E) REPEAT
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following is true about black-box testing?

A) The test cases are based on the code.
B) The test cases are based on the input.
C) The test cases are based on the output.
D) The testing is performed by dedicated testers.
E) The testing is performed each time the program changes.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following is part of a Pep/9 program instruction?

A) Accumulator
B) Simulator
C) Program counter
D) Specifier
E) Register
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
24
In which of the following are tests designed based only on possible input data (rather than code)?

A) Clear-box testing
B) Code-coverage approach
C) Black-box testing
D) Test plan implementation
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
25
Each machine language instruction performs a single complex task, such as sorting a list of numbers.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
26
Very few programs are written in machine language today.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
27
The Pep/9 system includes a simulator that can be used to input and run programs.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
28
Machine language programs are loaded into the Pep/9 simulator by specifying the instructions in hexadecimal.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
29
Assembly language allows program instructions to be specified using mnemonics that correspond to machine language instructions.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
30
In Pep/9 assembly language, decisions can be made using instructions that check the status of the accumulator.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
31
The data-coverage testing approach tests the limits of the program's data.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
32
Assembly language instructions are executed directly by the hardware of a particular computer.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
33
The input to an assembler is an assembly language program.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
34
A test case is a document that specifies how a program is to be tested.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
35
Which register contains the address of the next instruction to be executed?

A) Program counter
B) Instruction register
C) Index register
D) Accumulator
E) Status register
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
36
Which Pep/9 addressing mode indicates that the operand contains the location of data rather than the data itself?

A) Accumulator
B) Direct
C) Immediate
D) Virtual
E) Status
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following does not represent a function of the accumulator (A register)?

A) Data loaded from main memory is stored in the accumulator.
B) Results of ALU operations are stored in the accumulator.
C) The contents of an instruction's operand specifier can be stored in the accumulator.
D) The contents of the accumulator can be subtracted from the instruction register.
E) The contents of the accumulator can be stored to main memory.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
38
A virtual computer is a hypothetical machine in which there are no limits on memory use.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
39
True or False? Character input and output in Pep/9 uses a principle called memory-mapped I/O.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
40
An assembler is used to execute an assembly language program directly on the central processing unit.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
41
In the Pep/9 machine, the contents of the A register can be compared to the contents of a place in memory.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
42
The code-coverage testing approach eliminates the need to test some of the code by covering it with a theoretical "black box."
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
43
Konrad Zuse's 1936 patent application for the Z1 computer, with program and data modifiable in storage, anticipated the von Neumann architecture by nine years.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
44
The _______________ is a register used to hold the address of the next instruction to be executed.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
45
A(n) _______________ is a program that translates an assembly-language program into machine code.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
46
A(n) _______________ is an instruction for the translating program.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
47
___________________ is an approach to computer program testing that designs tests cases to ensure that each statement in the program is executed properly.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
48
____________________ is an approach to computer program testing that involves designing tests to ensure that the limits of the permissible data are covered.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
49
A(n) ______________________ is a section of code that repeats.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 49 flashcards in this deck.