程序代写代做代考 1.

1.
The number of different values can be stored in x bits is: 2^x
The number of different values can be stored in 5 bits is: 2^5 = 32
one’s compliment format mean for the number of different values that can be stored changed to: 2^x – 1, because now 11111 and 00000 both represent 0.
highest number is 011111 (15), its magnitude is 15. lowest number is 10000 (-15), its magnitude is 15.
two’s compliment format mean for the number of different values that can be stored changed to: 2^x , because now all binary represent different number.
highest number is 011111 (15), its magnitude is 15. lowest number is 10000 (-16), its magnitude is 16.
binary
00000
00001
00010
00011
00100
00101
00110
00111
01000
01001
01010
01011
01100
01101
01110
integer
one
two
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14

01111 15
10000 16
10001 17
10010 18
10011 19
10100 20
10101 21
10110 22
10111 23
11000 24
11001 25
11010 26
11011 27
11100 28
11101 29
11110 30
11111 31
15 15 -15 -16 -14 -15 -13 -14 -12 -13 -11 -12 -10 -11
-9 -10 -8 -9 -7 -8 -6 -7 -5 -6 -4 -5 -3 -4 -2 -3 -1 -2 -0 -1
2.
Bits per character is 100 * 8 / 100 = 8 (bits).
Number of possible symbols could be represented in this way: 2^8 = 256.
There are 26 lowercase letters, and because 2^4 < 26 < 2^5, so they need at least 5 bits. Upper and lower together is 52, because 2^5 < 26 < 2^6, so they need at least 6 bits. There are 52 letters, plus 10 numbers and 33 punctuations, in total it is 95, because 2^6 < 95 < 2^7, so they need at least 7 bits. 4. 5 + 5 = 101 + 101 = 1010 = 10 8 + 7 = 1000 + 111 = 1111 = 15 9 - 3 = 1001 - 11 = 110 = 6 7 - 5 = 111 - 101 = 10 = 2 5. 1011=23 +21 +20 =8+2+1=11 1 0 1 0 0 0 0 = 26 + 24 = 64 + 16 = 80
 11001111= 27 +26 +23 +22 +21 +20 = 128 + 64 + 8 + 4 + 2 + 1 = 207 01111000=26 +25 +24 +23 =64+32+16+8=120 1 0 1 0 0 00 0 1 1 1 0 1 000 = 215 + 213 + 27 + 26 + 25 + 23 = 32768 + 8192 + 128 + 64 + 32 + 8 = 41192