Assignment 4 — Secure Programming 2020
Part 1 — 24%
In this part, you are asked to analyse a few function to understand what they do. The functions perform simple arithmetic and bitwise operations on their inputs. We do not ask you to describe these operations,but to explain what the outcome is. For example, consider the function:
int32_t example1(int32_t a) {
uint32_t example2(uint32_t a, uint32_t b) {
For all questions, assume that signed numbers are represented using two’s complement. Moreover, contrary to the C standard, for this assignment the behaviour of integer overflflow is well defifined to wrap around. For example, MAX INT32+1 results in MIN INT32.
2020-09-22
Question 1 — 6%
Question 2 — 6%
Question 3 — 6%
Question 4 — 6%
Part 2 — 76% (70% for COMP SCI 7307)
struct bn
Use Example
Part 3 — 6% (COMP SCI 7307 only)
Submission Instructions
You should submit a .tar or a .tgz archive. The archive should contain a single directory, whose name is your student a-number. In that directory, we expect to fifind four items: