COMPSCI210 Computer Systems 1 FIRST SEMESTER, 2019
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
COMPSCI210
FIRST SEMESTER, 2019
TEST
Computer Systems 1
Question 1
[2 marks] What is the decimal value of 1001002 which is a 6-bit two’s complement representation?
(a) 3610
(b) -4410
(c) 2810
(d) -3610
(e) -2810
Question 2
[2 marks] What are the results of the logic expressions 1 + (0 × 1) and 1 × (0 + 1)?
(a) 1 and 0
(b) 0 and 1
(c) 0 and 0
(d) 1 and 1 (e) None of the above
Question 3
[2 marks] What should be the range of a 9-bit unsigned integer?
(a) -255 - 256
(b) 0 - 511
(c) 1 - 512
(d) 0 - 255
(e) -256 - 255
Question 4
[2 marks] What is the ASCII character with the value ‘c’ + 4?
(a) ‘g’
(b) ‘d’
(c) ‘e’
(d) ‘h’
(e) ‘f’
Question 5
[2 marks] Convert 1C.A16 to a decimal value.
(a) 24.87510
(b) 24.62510
(c) 28.87510
(d) 28.62510
(e) 30.7510
Question 6
[2 marks] What is the binary representation for -3.510 using the IEEE 754 floating point format?"
(a) 1 (b) 1
10000000
10000001
10000001
10000000
10000000
110000000000000000000002
110000000000000000000002
111000000000000000000002
111000000000000000000002
100000000000000000000002
Question 7
[2 marks] According to the below memory architecture, which cell should be selected if the address is “11002”?
(a) Cell 11
(b) Cell 10
Cell 12
Cell 14
Cell 15
Question 8
[2 marks] Which one is the characteristic of register compared to memory?
(a) Read-only
(b) Slower
(c) One address can be accessed at a time
(d) Smaller area per data-bit (e) More expensive per data-bit
Question 9
[2 marks] Which registers/register in LC3 should be accessed during the decoding stage?
(a) Program Counter (PC) only
(b) Memory Data Register (MDR) only
(c) Instruction register (IR) only
(d) Memory Address Register (MAR) only
(e) All of the above
Question 10
[2 marks] Which one is the correct procedure of instruction operation in LC3?
(a) Fetch instruction, Decode, Evaluate address, Fetch operands, Execute, Store (b) Fetch instruction, Fetch operands, Decode, Evaluate address, Execute, Store (c) Fetch instruction, Decode, Fetch operands, Execute, Evaluate address, Store (d) Fetch instruction, Evaluate address, Fetch operands, Decode, Execute, Store (e) Fetch instruction, Decode, Fetch operands, Evaluate address, Execute, Store
Question 11
[2 marks] What is the meaning of the following LC3 instruction?
ADD R1, R2, #-4
(a) R2 R1 + sign-extended(-4)
(b) R1 R2 + zero-extended(-4)
(c) R2 R1 - sign-extended(-4)
(d) R2 R1 + zero-extended(-4)
(e) R1 R2 + sign-extended(-4)
Question 12
[2 marks] What is the meaning of the following LC3 instruction?
LDI R2, #-4
(a) PC Mem[Mem[R2 + sign-extended(-4)]]
(b) R2 Mem[Mem[PC + sign-extended(-4)]]
(c) R2 Mem[PC + sign-extended(-4)]
(d) PC Mem[R2 + sign-extended(-4)]
(e) R2 PC + sign-extended(-4)
Question 13
[2 marks] What is the machine code of the instruction "STI R1, -1"
(a) x330F
(b) xB30F
(c) xB3FF
(d) x33FF
(e) xB1FF
Question 14
[2 marks] What is the machine code of the instruction "LEA R0, -8"?
(a) xE209
(b) xE7F7
(c) xE9F8
(d) xE1F8
(e) xE403
The LC3 program below is used for the following 3 questions.
Push
Pop
EMPTY EXIT |
.ORIG AND LD ADD JSR ADD ADD JSR ADD JSR ADD JSR JSR ADD BRnzp STR ADD RET ADD LDR RET .FILL TRAP .END |
x3000 R0, R0, #0 R6, EMPTY R1, R0, #1 |
|
Push R1, R0, R1, R0, Push R1, R0, Pop R1, R0, Push Pop R0, R1, EXIT R1, R6, R6, R6, R6, R6, R1, R6, x3030 x25 |
; The first Push #5 #-2 ; The second Push #2 ; The first Pop #3 ; The third Push ; The second Pop #0 #0 #-1 #1 #0
; Halt |
Question 15
[2 marks] What is the value of R7 before the execution of instruction “JSR Push ; The third Push”?
(a) 0x3008
(b) 0x3009
(c) 0x3010
(d) 0x300A
(e) 0x3000
Question 16
[2 marks] What is the value of R6 before the execution of instruction “JSR Push ; The third Push”?
(a) 0x302F
(b) 0x302E
(c) 0x3028
(d) 0x3029
(e) 0x3031
Question 17
[2 marks] What is the value of R0 after the execution of the whole program?
(a) 0x0002
(b) 0x0000
(c) 0x0003
(d) 0x0005
(e) 0xFFFE
The LC3 program below is used for the following 3 questions.
|
Question 18
[2 marks] What is the value of R3 after the completion of the above program if mem[VAR] is 0x0010 at the beginning?
(a) 0x0055
(b) 0x0136
(c) 0x0037
(d) 0x0088
(e) 0x0124
Question 19
[2 marks] What is the address of the label “VAR”?
(a) 0x3007
(b) 0x3006
(c) 0x3012
(d) 0x300A
(e) 0x3018
Question 20
[2 marks] What is the machine code of the instruction “BRp LOOP1”?
(a) 0x02FD
(b) 0x03FD
(c) 0x05FD
(d) 0x04FC
(e) 0x02FC
2022-06-17