COMP12111
One and a half hours
Section A is COMPULSORY
UNIVERSITY OF MANCHESTER
SCHOOL OF COMPUTER SCIENCE
Fundamentals of Computer Engineering
Date: Thursday 21st January 2016
Time: 14:00 - 15:30
Answer BOTH Questions in Section A and ONE Question from Section B
Use a SEPARATE answerbook for each SECTION.
This is a CLOSED book examination
The use of electronic calculators is permitted provided they are not programmable and do not store text
[PTO]
, COMP12111
Section A
COMPULSORY
Please answer both questions
1. Answer any 5 parts of this question. Each part is worth 2 marks.
a) You are required to write a variable assignment in Verilog that assigns a value
to the variable abc (which has been defined as reg). State the assignment in
the following cases:
i) the variable is assigned an 8-bit binary value that is equivalent to the
decimal value 25 (½ mark)
ii) the variable is assigned the decimal value 65 as a 16-bit value
(½ mark)
iii) the variable is assigned a 16-bit hexadecimal value equivalent to the
decimal value -18 (using two’s complement form) (½ mark)
iv) the variable is assigned an 8-bit decimal value equivalent to the
unsigned binary value 11101111. (½ mark)
b) Explain how the contents of the sensitivity list in a Verilog always statement
differ when the always block contains blocking or non-blocking assignments.
(2 marks)
c) The Verilog code shown in Figure 1 represents a combinatorial circuit.
However, it contains a number of errors. List the errors. (2 marks)
Figure 1: Verilog code
d) Using DeMorgan’s Theorem, express the following sum-of-products
expression in a form that includes a product-of-sums expression.
(2 marks)
Q=A.B.C+A.B.C+A.B.C
(Question 1 continues on the following page)
Page 2 of 13
One and a half hours
Section A is COMPULSORY
UNIVERSITY OF MANCHESTER
SCHOOL OF COMPUTER SCIENCE
Fundamentals of Computer Engineering
Date: Thursday 21st January 2016
Time: 14:00 - 15:30
Answer BOTH Questions in Section A and ONE Question from Section B
Use a SEPARATE answerbook for each SECTION.
This is a CLOSED book examination
The use of electronic calculators is permitted provided they are not programmable and do not store text
[PTO]
, COMP12111
Section A
COMPULSORY
Please answer both questions
1. Answer any 5 parts of this question. Each part is worth 2 marks.
a) You are required to write a variable assignment in Verilog that assigns a value
to the variable abc (which has been defined as reg). State the assignment in
the following cases:
i) the variable is assigned an 8-bit binary value that is equivalent to the
decimal value 25 (½ mark)
ii) the variable is assigned the decimal value 65 as a 16-bit value
(½ mark)
iii) the variable is assigned a 16-bit hexadecimal value equivalent to the
decimal value -18 (using two’s complement form) (½ mark)
iv) the variable is assigned an 8-bit decimal value equivalent to the
unsigned binary value 11101111. (½ mark)
b) Explain how the contents of the sensitivity list in a Verilog always statement
differ when the always block contains blocking or non-blocking assignments.
(2 marks)
c) The Verilog code shown in Figure 1 represents a combinatorial circuit.
However, it contains a number of errors. List the errors. (2 marks)
Figure 1: Verilog code
d) Using DeMorgan’s Theorem, express the following sum-of-products
expression in a form that includes a product-of-sums expression.
(2 marks)
Q=A.B.C+A.B.C+A.B.C
(Question 1 continues on the following page)
Page 2 of 13