Answers to Base Conversion Exercises
-
- 35
- 738
- 2393
- 45871
- 14040
-
- 4678; 13716
- 273658; 2EF516
-
- 111100000011
- F03
-
- 00111100100111100111 (the first two 0s aren't necessary!)
- 744747
-
- 10000100002;
10208; 21016; 13537
- 10000101011012;
102558; 10AD16; 153067
- 1010101012;
5258; 15516; 6657
-
- 25-1 = 31
- 211-1 = 2047
- 231-1 = 2,147,483,647
-
- 1111111100111010
- 0000000000100101
- 1111111111011011
- 1110101110001101
- 0010001110001110
- 1101110001110010
-
- 115
- -119
- -34
- 7
- -1
-
- The largest positive integer that fits in 12-bit twos complement
is 211 - 1 = 2047 so 2548 is too big and overflow will occur.
In fact, the base 2 representation of 2548 is 100111110100 which is
12 bits but there needs to be at least one more bit for the sign. The
computer would take the 12 bits and interpret it as a 12-bit twos
complement number. Hence it would report a value of -1548.
- The smallest integer that fits in 12-bit twos complement is -2048
so -5377 is too small.