Question 1
Convert the following binary numbers to decimal:
- 1001
- 1101101
- 1000001
- 1111111
- 100000011000001
- 101010101010101
- 110101
- 10101100
- 11111010001
Check your answers (you can google search “1001 binary to decimal” or similar to get an answer)
1001 |
2³ + 2⁰ |
9 |
1101101 |
2⁶ + 2⁵ + 2³ + 2² + 2⁰ |
109 |
1000001 |
2⁶ + 2⁰ |
65 |
1111111 |
2⁶ + 2⁵ + 2⁴ + 2³ + 2² + 2¹ + 2⁰ |
127 |
100000011000001 |
2¹⁴ + 2⁷ + 2⁶ + 2⁰ |
16577 |
101010101010101 |
2¹⁴ + 2¹² + 2¹⁰ + 2⁸ + 2⁶ + 2⁴ + 2² + 2⁰ |
21845 |
110101 |
2⁵ + 2⁴ + 2² + 2⁰ |
53 |
10101100 |
2⁷ + 2⁵ + 2³ + 2² |
172 |
11111010001 |
2¹⁰ + 2⁹ + 2⁸ + 2⁷ + 2⁶ + 2⁴ + 2⁰ |
2001 |
Question 2
Convert the following decimal numbers in binary: - 33 - 58 - 263 - 3450 - 9349 - 724
33 |
32 + 1 = 2⁵ + 2⁰ |
100001 |
58 |
32 + 16 + 8 + 2 = 2⁵ + 2⁴ + 2³ + 2¹ |
111010 |
263 |
256 + 4 + 2 + 1 = 2⁸ + 2² + 2¹ + 2⁰ |
100000111 |
3450 |
2048 + 1024 + 256 + 64 + 32 + 16 + 8 + 2 = 2¹¹+2¹⁰+2⁸+2⁶+2⁵+2⁴+2³+2¹ |
110101111010 |
9349 |
8192 + 1024 + 128 + 4 + 1 = 2¹³ + 2¹⁰ + 2⁷ + 2² + 2⁰ |
1001001000101 |
724 |
512 + 128 + 64 + 16 + 4 = 2⁹ + 2⁷ + 2⁶ + 2⁴ + 2² |
1011010100 |
(263)10 = …
131 |
1 |
65 |
1 |
32 |
1 |
16 |
0 |
8 |
0 |
4 |
0 |
2 |
0 |
1 |
0 |
0 |
1 |
(3450)10 = …
1725 |
0 |
862 |
1 |
431 |
0 |
215 |
1 |
107 |
1 |
53 |
1 |
26 |
1 |
13 |
0 |
6 |
1 |
3 |
0 |
1 |
1 |
0 |
1 |
Reading from bottom to top: 1101 0111 1010
(9349)10 = …
4674 |
1 |
2337 |
0 |
1168 |
1 |
584 |
0 |
292 |
0 |
146 |
0 |
73 |
0 |
36 |
1 |
18 |
0 |
9 |
0 |
4 |
1 |
2 |
0 |
1 |
0 |
0 |
1 |
Reading from bottom to top: 10 0100 1000 0101
Question 3
Consider a 32-bit CPU: a. How many numbers can be represented on this CPU? b. What’s the largest unsigned number (positive numbers only)? c. What’s the largest signed number?
- 4,294,967,296 (232)
- 4,294,967,295
- 2,147,483,648 (231) Note that for signed numbers, one bit is reserved for the sign (+/-).
Question 4
What’s the smallest number which requires 12 bits?
212 = 4096 Note: Any number smaller than 4096, doesn’t require 12 bits to be represented in binary. 4096 is the smallest number which requires 12 bits.
Question 5
What’s the minimum numbers of bits required to store the value 16587.
- Represent the number in binary: 100 0000 1100 1011
- Count the number of bits required to represent this number.
The answer is 15 bits.
Back to top