Anda di halaman 1dari 6

CM-0107L Computer Architecture and Systems Software

Coursework 1
Semester 1, AY 2014/2015
Due date: December 5, 2014
Instructions:
It is a requirement to submit this coursework as electronic submission via Black-
board. Only word and pdf les are accepted. Please name your le as
CASS CW1 YourUoBnumber.doc or CASS CW1 YourUoBnumber.pdf
This document consists of two questions and one appendix in four pages. All ques-
tions and sub-questions are compulsory.
Total marks from all questions are 100 marks. Marks for each sub-question are indi-
cated in the corresponding sub-question. Marking criteria are indicated in Appendix
on page 6.
This coursework is worth 20% of the years assessment.
Submission deadline: The assignment must be submitted to the BlackBoard (under
Assessment) before 5pm on the 5th of December 2014. Do not forget to press the
SUBMIT button.
Feedback report on your coursework will be available in the BlackBoard at the
beginning of Semester 2.
CM-0107L page 1 of 6
Suppose that the University of Bradford (UoB) wants to implement a new UoB identity
number for students. For the new number, the system will rst reverse the current UoB
number and then insert a digit 9 at the beginning of the reversed number. Denote the
current UoB number as H and the new UoB number as K.
Example:
If your current UoB number is
H = 12345678,
then your new UoB number will be
K = 987654321.
If your current UoB number is
H = 14027212
the your new UoB number will be
K = 921272041
Question 1: Number Systems and Representation
A. Among the bases from 2, 3, . . . , to 10, which of those bases are possibly used in your
current UoB number (H)? Will your answer change for your new UoB number (K)?
Justify your answers.
(Hint: The possible bases can be more than one option) [6 marks]
B. Assume that your new UoB number (K) is known to be in base 10. Suppose
that decimal number M is obtained by dividing K by decimal number 5000, i.e.,
M = K 5000
M can be represented as M
i
M
j
where the dot () indicates the decimal point.
B1. Derive the values of M
i
and M
j
. By treating each digit separately, evaluate
the ASCII representation of the rst two letters of M
i
and the last two letters
of M
j
.
(Hint: ASCII code can be found in the lecture notes.) [8 marks]
B2. By showing relevant steps, translate M to octal number (i.e., base 8 number
system).
(Hint: You can limit the number of octal digits for the fraction up to maximum
6 digits.) [5 marks]
B3. By showing relevant steps, convert M
i
to binary number (i.e., base 2 number
system). [5 marks]
CM-0107L page 2 of 6
B4. By showing relevant steps, convert M to binary number (i.e., base 2 number
system).
(Hint: You can limit the number of binary digits for the fraction up to maxi-
mum 6 digits.) [5 marks]
B5. Evaluate the sign-magnitude representation of M
i
in a 20-bit length.
[5 marks]
C. Consider base 20 number system where the symbols are given by:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J
Those symbols are equivalent to decimal numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
Example:
A
20
= 10
10
J
20
= 19
10
Assume that your new UoB number (K) is known to be in base 20 number
system.
C1. A base-20 number N is obtained by dividing K with 5000 (in base 20), i.e.,
(N)
20
= (K)
20
(5000)
20
Evaluate the value of N.
(Hint: You can perform division in base 10 (by rst converting the number to
base 10). But, you need to convert the division result back to base 20. You can
limit the number of base-20 digits for the fraction up to maximum 6 digits.)
[11 marks]
C2. Following C1, by showing the necessary steps, convert N to the corresponding
decimal number (base 10) and hexadecimal number (base 16).
(Hint: You can limit the number of hexadecimal digits for the fraction up to
maximum 6 digits.) [7 marks]
C3. Suppose N
i
is the integer part of N. Evaluate the representation of N
i
in a
24-bit length string using twos complement method. [7 marks]
C4. Continuing from C3, suppose that L is a base-20 number obtained from the
last two letters of N
i
. Evaluate (L)
20
+(281)
10
using 24-bit twos complement
arithmetic. [11 marks]
CM-0107L page 3 of 6
Question 2: Truth Table and Boolean Logic
Assume that your new UoB number (K) is known to be a decimal number (base 10).
Suppose that q
1
is the smallest digit in your new UoB number and q
3
is the third smallest
digit in your new UoB number. Let S = q
1
+q
3
.
Denote the 4-bit binary number for S with binary-coded decimal (BCD) code by
b
0
b
1
b
2
b
3
and the 4-bit binary number for S with Gray code by b
4
b
5
b
6
b
7
. (Refer to the
lecture notes for the BCD and Gray codes.) Further denote b as a result of merging BCD
codeword and Gray codeword, i.e.,
b = b
0
b
1
b
2
b
3
b
4
b
5
b
6
b
7
.
Herein b
i
denotes the bit in b at (i + 1)-th location from the left.
Example:
If your new UoB number K = 987654321, then the smallest digit is 1, the 2nd
smallest digit is 2 and the 3rd smallest digit is 3. So,
q
1
= 1
q
3
= 3
S = q
1
+q
3
= 4
BCD: S = 4 0100 so b
0
b
1
b
2
b
3
= 0100
Gray code: S = 4 0110 so b
4
b
5
b
6
b
7
= 0110
Then: b = b
0
b
1
b
2
b
3
b
4
b
5
b
6
b
7
= 0100 0110
If your new UoB number K = 921272041, then the smallest digit is 0, the 2nd
smallest digit is 1 and the 3rd smallest digit is 2. So,
q
1
= 0
q
3
= 2
S = q
1
+q
3
= 2
BCD: S = 2 0010 so b
0
b
1
b
2
b
3
= 0010
Gray code: S = 2 0101 so b
4
b
5
b
6
b
7
= 0101
Then: b = b
0
b
1
b
2
b
3
b
4
b
5
b
6
b
7
= 0010 0101
A logic circuit is used to transform three inputs X, Y and Z into the output A.
Supposed that the underlying function for the circuit is denoted by G. The output A for
any combination of inputs (X, Y, Z) coincides with the digits in b in the increasing index
CM-0107L page 4 of 6
of bit position, i.e.,
(X, Y, Z) = (0, 0, 0) then A = b
0
(X, Y, Z) = (0, 0, 1) then A = b
1
(X, Y, Z) = (0, 1, 0) then A = b
2
.
.
.
.
.
.
(X, Y, Z) = (1, 1, 1) then A = b
7
.
A. Evaluate and show the truth table for function G from all combination of inputs.
[9 marks]
B. Determine the standard forms of the Boolean expressions:
B1. Using a sum of products expression; [5 marks]
B2. Using a product of sums expression. [5 marks]
C. Simplify the Boolean expression in B1 (sum of products) using algebraic manipula-
tions.
[11 marks]
CM-0107L page 5 of 6
Appendix
Marking schemes and criteria in terms of percentage of the marks:
0-20 % Basic and confused understanding with erroneous calculations and program-
ming
20-40 % Basic understanding with some correct and some erroneous steps and cal-
culations
40-60 % Good understanding mostly correct steps and calculations but with minor
mistakes or missing point
60-80 % Good demonstration of understanding of with correct steps and calculations
but non-signicant errors
80-100 % Outstanding demonstration of understanding of with correct steps and cal-
culations with good presentation
CM-0107L page 6 of 6

Anda mungkin juga menyukai