Question: 5. Write a function with the following prototype: /* Determine whether arguments can be subtracted without overflow/ int tsub_ok(int x, int y); This function should

5. Write a function with the following prototype: /* Determine whether arguments can be subtracted without overflow/ int tsub_ok(int x, int y); This function should return 1 if the computation x - y does not overflow. 6. Convert the following numbers as indicated, using as few digits in the results as necessary. (a) (010101)2 to base 10 (b) (011100)2 to base 16 (c) (54.125)ho to binary (d) (122.3)4 to base 16 7. Show the results of adding the following pairs of five-bit two's complement numbers and indicate whether or not overflow occurs for each case. (a) 11110 + 11101; (b) 10111 + 10111; 8. Assuming a 64-bit machine and two's complement representation for integers, show the total number of bits used, and all the bit values, for the following variables: char c = 35; char d = ,G"; int x - -42
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
