Question: CSC 2 0 6 Secure Systems Programming Please finish the following tasks and put the snapshots inside one pdf document You can use Microsoft Word

CSC 206 Secure Systems Programming
Please finish the following tasks and put the snapshots inside one pdf document
You can use Microsoft Word first, and then export the document to a pdf
The numbers mentioned in task 1 and task 2 are all integer numbers, and their size are all 16 bits. This means even for integer 1, you have to write the binary as 0000000000000001.
Task 1(20 points)
Use two's complement to represent the following integer number, show your steps of 1) absolute value, 2) complement, and 3) add one.
-30
-189
Task 2(30 points)
Use two's complement to represent the numbers in the following expressions, and do the arithmetic addition calculation.
23+(-29)
(-31)+6
Task 3(20 points)
Run all 4 programs provided in "Lab.pdf", and put your execution result in the submission.
Task 4(30 points)
For the program 1 in "Lab.pdf", explain how to modify the program line 4 that the number of iterations before integer overflow occurs becomes 2.
Hints:
You only need to modify the line 4.
Try to modify the line 4 or line 5 to see the output of each iteration of the for loop, and understand how the integer overflow occurs.
Check the maximum integer number for 32-bit length storage.
CSC 2 0 6 Secure Systems Programming Please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!