Professional Documents
Culture Documents
University of Ottawa
School of Information Technology and Engineering
Number:___________________________________________________
Notes:
Calculators are not allowed
You may use the back of the pages for any side work. This will not be
marked.
Instruction formats and PSR format for the ARC is given on page 8
1. Converting ( -15)10 to 8-bit binary, using signed 2’s complement notation is equal to:
(a) 01110001 (b) 11110001
(c) 00101101 (d) 11000111
4. What portion of an instruction tells the CPU where data are to be taken from or sent to
during the instruction execution?
(a) Operand (b) Opcode
(c) Code mnemonic (d) None of these
5. Which CPU register provides the address from which the next instruction opcode is to
be fetched?
(a) Stack pointer SP (b) Link register
(c) Program counter PC (d) None of these
7. If the capacity of a certain memory is 4kbyte, then the number of address lines to
access to all the allocations is:
(a) 4 (b) 4096
(c) 12 (d) 210
8. If the number of lines in the address bus is 20, then we can access to the following
number of memory locations:
(a) 20 (b) 1 Mega
(c) 512 (d) 1 Kilo
9. For the microarchitecture of ARC, the control store is a 2048-word n-bit ROM,
where n is:
(a) 31 (b) 24
(c) 16 (d) 41
10. In ARC instructions, registers are always referred to in terms of their contents, and
never in terms of an address
(a) True (b) False
Page 3 of 11
By completing the following steps (give you answer for each step)
(v) Convert 12.6 to normalized floating point number and rounded to 10 bits.
(vi) Form the two’s complement of the mantissa for the 12.6
(x) Convert your result into decimal and compare to exact answer.
.begin
org 2048
swap ld [X] , %r1
ld [Y] , %r2
st %r1 , [Y]
st %r2 , [X]
jmpl %r15 + 4 , %r0
X: 25
Y: 50
end
.begin
org 2048
subtract ld [X] , %r1
ld [Y] , %r2
orncc %r2 , %r0 , %r2 !complement Y
addcc %r2 , 1 , %r2 ! making 2nd complement of Y
addcc %r1 , %r2 , %r2
st %r2 , [Z]
jmpl %r15 + 4 , %r0
X: 50
Y: 25
.end
Page 5 of 11
Solution:
b: addcc %r2,1,%r2
andcc %r5,%r6,%r0
be a
orcc %r6,1,%r6
ba b
a: jmpl %r15+4,%r0
Solution:
1281 : R[temp0] <- LSHIFT2 (R [ir]); /shift disp30 left two bits
(ii) Use a decoder logic element, draw diagram showing how to decode the address of the
the memory space. In your drawing show clearly how the address bus and the data bus
are connected to the memory space.
Page 7 of 11
(iii) Assuming that a decoder is not available, draw diagram show how to implement the
decoding approach in part (ii) using logic gates such NOT, OR, NOR, AND and NAND.
The chip select signal to be generated is an active low (i. e. CS)
Page 8 of 11