Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the binary reprsentation of 0x1337d00d. Then, give its Two\'s Complement i

ID: 3733614 • Letter: W

Question

Write the binary reprsentation of 0x1337d00d.

Then, give its Two's Complement in hex. Then, give its Two's Complement in binary.

Binary : ____________________________

Two's Complement

Hex     : ____________________________

Binary : ____________________________

What are the values of a, b, and c from the main function?

#include <stdio.h>

void some_func(int a, int b, int *c) {
a ^= 5;
*c = a + b;
b <<= 4;
}

int main() {
int a = 3, b = 0x011, c = 0;
some_func(a, b, &c);
a = (b > c) ? b : c;
}

a: ________ b: _________ c: _________

What are the values of a and b?


int a = 0xd00d;
char b = (char) 128;
b = b + a;
a = a + 'Ý';

a (rightmost 4 digits, in hex): ____________________________

b (in hex):
____________________________

Explanation / Answer

Q 1) Write the binary reprsentation of 0x1337d00d.

Binary ---> 10011001101111101000000001101

Two's Complement

Hex     :0x3320B

Binary : 110011001000001011

----------------------------------------------------------------------------------------

2) What are the values of a, b, and c from the main function?

Ans) a=23 , b=17, c=23

Explanation:-

----------------------------------------------------------------------------------------------------------------------

3) What are the values of a and b?

Ans) a=53226 ,b=-115

Explanation:-

a (rightmost 4 digits, in hex): C9A

b (in hex):-73