Question: Can anybody help me build the code that will do what this assignment asks? 1. Convert the given numbers to the other bases. The data

Can anybody help me build the code that will do what this assignment asks?

Can anybody help me build the code that will do what this

1. Convert the given numbers to the other bases. The data values are small enough to be shown in 8 bit binary. They can be positive or negative. Binary Number 0001 0010 1000 0000 Hexa-Decimal 12 80 Equivalent in base 10 18 0001 0111 1000 0001 1100 0011 12 100 20 75 AB 2. Write a C program to do the following tasks: a) Declare an int variable, name it number. b) Prompt the user to enter a whole number - read it into the variable. a. Validate the range in a loop. Valid range is 20 to 200 both inclusive c) Display the number to the screen (base 10) d) Display the number in hexadecimal (Use %X) c) Determine the rightmost bit in the number, display it to the screen (0 or 1) 0000 0001 Do a bitwise &between the number and the maskRight, If it is equal to 0, the rightmost bit is 0, otherwise, it is 1 o f) Create a mask to determine the fifth bit from the right in the number 0001 0000 o Do a bitwise&between the number and the mask - if it is equal to 0 the 5th bit in number is 0, otherwise it is 1 g) Shift the number to the left by 2 bits - display the updated number to the screen (It will be multiplied by 2 twice).I Enter a whole numbernetueen 20 and 200, inclusive: 210 Enter a whole number netueen 20 and 200, inclusive: 17 Enter a whole nunber netueen 20 and 200, inclusive: 35 The input number is: 35 The number in Hexadecimal: 23 The right most bit is 1 The fifth bit is Number after 2 bits shift to the left140

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!