关键词 >

COMPSCI 110 Introduction to Computer Systems

发布时间:2022-09-14

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMPSCI 110

SUMMER SCHOOL SEMESTER 2020

COMPUTER SCIENCE

Introduction to Computer Systems

1.  Which of the following equations with decimal and binary numbers are TRUE? Note the subscripts denote the bases (2=binary, 10=decimal).

X.  8910=0101 10112

Y.  3610=0010 01102

Z.  5810=0011 10112

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

2.  Which of the following equations with hexadecimal and octal numbers are TRUE? Note the subscripts denote the bases (16=hexadecimal, 8=octal).

X.  4E16=1178

Y.  6816=1488

Z.  2916=528

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

3.  Which of the following additions are TRUE? Note the subscripts denote the bases (2=binary, 8=octal, 16=hexadecimal)

X.  348 + 268 = 628

Y.  568 + 678 = 1238

Z.  6616 + F816 = 14D16

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

4.  Which of the following subtractions are TRUE? Note the subscripts denote the bases (2=binary, 8=octal, 16=hexadecimal)

X.  D0816 - 9916 = C6F16

Y.  45A16 - 36B16 = CD16

Z.  2138 - 1378 = 768

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

5.  Which of the following statements about signed integers are TRUE?

X.  With sign-magnitude, the largest number you can represent with 6 bits is 31.

Y.  With sign-magnitude, the smallest number you can represent with 5 bits is -15.

Z.  With sign-magnitude, the largest number you can represent with 8 bits is 255.

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

6.  Which of the following answers correctly give the 8-bit two's complement of the specified decimal number?

X.  -23 is 1001 0111

Y.  -109 is 1001 0011

Z.  36 is 0010 0100

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

7.  Which of the following decimal numbers can be represented with a finite number of bits?

X .  6 .125

Y .  14 .8

Z .  21 .375

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

8.  Which of the following are correct representations of the specified decimal values in the 16-bit floating     point format presented in lectures and the textbook? Note that the floating point representation has been expressed in hexadecimal.

X.  -78.5 (decimal) is 6747 (hexadecimal)

Y.  -15.875 (decimal) is FF24 (hexadecimal)

Z.  49 (decimal) is 6226 (hexadecimal)

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

9.  Which of the following statements are correct?

X.  7 bits are required to represent 108 values.

Y.  6 bits are required to represent 112 values.

Z.  8 bits are required to represent 215 values.

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

10.  Given that the hexadecimal value of the ASCII code for "A" is 41, the ASCII code for "a" is 61 and the ASCII code for "1"(one) is 31, which of the following statements are TRUE? All numbers are in          hexadecimal.

X.  ASCII is used to encode the characters in the English alphabet (uppercase and lowercase), decimal digits, certain symbols and punctuation only.

Y.  The ASCII code for "U" is 62.

Z.  All uppercase letters have ASCII codes larger than the ASCII codes of all lowercase letters.

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

11.  Which of the following statements are TRUE?

A.  The RGB encoding scheme typically uses 3 bytes to encode red, green and blue colour data.

B.  A compression ratio of 0.25 indicates that the uncompressed data is four times as large as the compressed data.

C.  UTF-8 is not backwards compatible with ASCII.

D .  Data lost during lossy compression can always be restored.

E.  When digitizing a sound wave, all sound data is always encoded.

12.  Consider the truth table below:

Which of the following boolean expressions match the output column in the truth table above?

X.  (NOT A AND NOT B AND C) OR (NOT A AND B AND C)

Y .  NOT  A AND  C

Z.  NOT(A OR NOT C)

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

13.  Consider the table below:

Using this table with a Huffman encoding select the answer where the letters correspond to the binary encoding.

A.  10101000 matches DA

B.  10010101111 matches ONE

C.  1101001010 matches EFT

D .  1001011111 matches ORE

E.  01100010 matches SAT

14.  Which of the following statements are TRUE?

A.  If both inputs to a 1-CE circuit are identical, then the output of the circuit is 0.

B.  A multiplexor with 8 input lines and 3 selector lines requires 2 output lines.

C.  A 1-ADD circuit is an example of a sequential circuit.

D .  A decoder sets one of its output lines to 1, with the rest of the output lines set to 0.

E.  In a machine with 16 general purpose registers, a decoder would be used to choose from which register a value is sent to a compare with zero operation.

15.  Consider the circuit diagram below:

Which of the following statements are TRUE?

X.  The given circuit is called a multiplexor.

Y.  If inputs A = 0, B = 1, and C = 0, then output 1 is 1 and output 2 is 0.

Z.  If inputs A = 0, B = 1, and C = 1, then output 1 is 0 and output 2 is 1.

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

16.  Which of the following statements are TRUE?

X.  NOR gates are functionally complete.

Y.  We can construct an AND gate from OR and NOT gates.

Z.  An OR gate can be constructed from NAND gates.

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

17.  Consider the circuit below:

Which of the following statements are TRUE?

X.  If Out1=0 and Out2=1, then setting In1 to 0 and In2 to 1 would result in in Out1 changing to 1 and Out2 changing to 0.

Y.  Several of these circuits can be used to build a register.

Z.  If Out1=0 and Out2=1, then setting In1 to 1 and In2 to 0 would result in no change to Out1 and Out2.

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

18.  Consider the diagram of the Von Neumann architecture below:

Which of the following statements about the diagram above are TRUE?

X.  L is used to select whether memory is being fetched or stored.

Y.  RAM is the fastest form of memory in a computer.

Z.  K holds the memory address to access.

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z

19.  Which of the following statements are TRUE?

X.  The continuation condition of a while loop is performed one more time than the body of the loop.

Y.  A variable is a named storage location to hold a data value.

Z.  With an if statement, you iterate over a block of instructions if a condition remains true.

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

20.  Here is an assembly language program using the textbook language:

.BEGIN

LOAD  X

ADD  X

DECREMENT  X

ADD  X

DECREMENT  X

ADD  X

STORE  Y

ADD  Y

STORE  Y

OUT  Y

HALT

Y:    .DATA 0

.END

Using this program which of the following give the correct output with the given input?

X.  Input: 9, Output: 68

Y.  Input: 4, Output: 26

Z.  Input: 2, Output: 5

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

21.  Here is an assembly language program using the textbook language:

.BEGIN

IN  X

LOAD  X

L1:  SUBTRACT Y

COMPARE  Y

JUMPGT L2

JUMP L1

L2:  OUT Z

HALT

Y:   .DATA 3

Z:   .DATA 0

.END

Using this program which of the following give the correct output with the given input?

X.  Input: 6, Output: 3

Y.  Input: 9, Output: 4

Z.  Input: 12, Output: 5

A.  X and Y only

B.  X and Z only

C. Y and Z only

D .  All of X, Y, and Z

E.  None, or only one of X, Y, and Z

22.  Here is an assembly language program using the textbook language. The comments at the right end of each line are for numbering the lines. The program starts at address zero.

S :

E :

X :

Y :

A :

B :

T :

Z :

.BEGIN

IN X

IN Y

LOAD X

ADD X

STORE A

LOAD Y

ADD Y

STORE B

DECREMENT Y

LOAD A

ADD B

STORE T

LOAD Z

COMPARE Y

JUMPEQ E

JUMP S

OUT T

HALT

.DATA 0

.DATA 0

.DATA 0

.DATA 0

.DATA 0

.DATA 0

.END

-- line 1 -- line 2 -- line 3 -- line 4 -- line 5 -- line 6 -- line 7 -- line 8 -- line 9 -- line 10 -- line 11 -- line 12 -- line 13 -- line 14 -- line 15 -- line 16 -- line 17 -- line 18 -- line 19 -- line 20 -- line 21 -- line 22 -- line 23 -- line 24 -- line 25 -- line 26

Using this program which of the following have the correct machine code and data for the specified line? Use the appendix at the end of the test.

X.  Line 9 - 0001 0000 0001 0111

Y.  Line 5 - 0011 0000 0001 0100

Z.  Line 3 - 1101 0000 0001 0101

A.  X only

B. Y only

C.  Z only

D .  None of X, Y, and Z

E.  All, or two of X, Y, and Z