Question: The assignment will start with your Park ID Number. Convert this number to a binary number. Show the procedure followed to get your result (

The assignment will start with your Park ID Number. Convert this number to a binary number. Show the procedure followed to get your result (1 point).
Show how the binary number obtained in (1) will be represented in RAM as an unsigned long, an unsigned int, and unsigned short. If these formats are too small to represent your number, show the digits that will be discarded next and to the left of the digits inside the format. Clearly differentiate the included and no-included digits (1 point).
Write a secure piece of code that will convert the unsigned long obtained in (2) onto an unsigned char. Trace the code with your id number (1 point).
Write a secure piece of code that will convert the unsigned int obtained in (2) onto a signed int. Trace the code with your id number (1 point).
Show how the negation of the binary number obtained in (1) will be represented in RAM as a signed int using two-complements format. Show the procedure followed to get your result (1 point).
Show how the signed int obtained in (5) will be represented as a signed char if the conversion is forced. Indicate also which number it will represent in the decimal system. Show the procedure followed to get your results (1 point).
Show the effect of left-shifting on the unsigned short number obtained in (2). Apply left-shifting five times to this number and in each time show its RAM representation and its decimal value.
Show the effect of right-shifting on the unsigned short number obtained in (2). Apply right-shifting five times to this number and in each time show its RAM representation and its decimal value.
Show how the integer binary number obtained in (1) will be represented in memory if stored in a float variable using the IEEE-754 standard. Show the procedure followed to get your result (1 point).
Select any of the mathematical functions in h that have domain restrictions and write a secure piece of code to apply this function to a float variable. Trace what your code will do on the number obtained in (9) and show the final result. (1 point).

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 Databases Questions!