Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions