ASSIGNMENT on Data. For practice.
[Link] the following binary numbers to a decimal value:
a) (011011)2 = ( )10 b) (101001)2 =( )10
[Link] the following decimal numbers to binary:
a) (257)10 =( )2 b) (2048)10 =( )2 c) (87)10 =?
d) (-1)10 =? e) (-45)10 =( )
[Link] will be the equivalent in hexadecimal for the given binary data:
a) 11101101101 b) 0100010010111
[Link] the following hexadecimal numbers to a binary number:
a). 0XABCD b). 0X0F1
5. Convert the following octal num to a binary number :
a) 0111 b) 0777 c)074
6. Convert the following binary number to a octal num :
a) 100111010 b) 010000001
7. Convert the following hexadecimal number to a octal number:
a) 0X1BC b)0XFFFF
8. if the variable is declared as given below, then what will be the exact
binary presentation in memory, when the program is being executed?
char ch1=’6’ , ch2=’a’, ch3=’*’, ch4=’ ‘,ch5=98;
char v1=127,v2=128;
unsigned char u1=127,u2=128,u3=255,u4=256;
9. if the following integer variables are declared, then what will be exact
picture of memory occupied .
short int s1=50, s2=-5, s3=32767,s4=32768;
[Link] the integer variables are declared as given below, then predict the
binary presentation in memory.
int i=’1’, j=520, k=65536, l=-2, m=-50