Skip to content

Commit fcc6833

Browse files
committed
Restore deleted file README.md
1 parent 2bd81fe commit fcc6833

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

number-systems/README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,61 @@ Do not convert any binary numbers to decimal when solving a question unless the
55
The goal of these exercises is for you to gain an intuition for binary numbers. Using tools to solve the problems defeats the point.
66

77
Convert the decimal number 14 to binary.
8-
Answer: 1110
8+
Answer:
99

1010
Convert the binary number 101101 to decimal:
11-
Answer: 45
11+
Answer:
1212

1313
Which is larger: 1000 or 0111?
14-
Answer: 1000
14+
Answer:
1515

1616
Which is larger: 00100 or 01011?
17-
Answer: 01011
17+
Answer:
1818

1919
What is 10101 + 01010?
20-
Answer: 11111
20+
Answer:
2121

2222
What is 10001 + 10001?
23-
Answer:100010
23+
Answer:
2424

2525
What's the largest number you can store with 4 bits, if you want to be able to represent the number 0?
26-
Answer: 1111 = 15 (largest representable number)
27-
Number of possible values including 0 = 16
26+
Answer:
2827

2928
How many bits would you need in order to store the numbers between 0 and 255 inclusive?
30-
Answer: 8 bits
29+
Answer:
3130

3231
How many bits would you need in order to store the numbers between 0 and 3 inclusive?
33-
Answer: 2 bits => 00, 01, 10, 11
32+
Answer:
3433

3534
How many bits would you need in order to store the numbers between 0 and 1000 inclusive?
36-
Answer: 10 bits
35+
Answer:
3736

3837
How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)?
39-
Answer: Been a binary it would be 1 followed by 0s => 100, 10000, 10
38+
Answer:
4039

4140
Convert the decimal number 14 to hex.
42-
Answer:0xE
41+
Answer:
4342

4443
Convert the decimal number 386 to hex.
45-
Answer: 0x182
44+
Answer:
4645

4746
Convert the hex number 386 to decimal.
48-
Answer: 902
47+
Answer:
4948

5049
Convert the hex number B to decimal.
51-
Answer:11
50+
Answer:
5251

5352
If reading the byte 0x21 as a number, what decimal number would it mean?
54-
Answer:33
53+
Answer:
5554

5655
If reading the byte 0x21 as an ASCII character, what character would it mean?
57-
Answer:!
56+
Answer:
5857

5958
If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Representing Colors and Images", what colour would it mean?
60-
Answer: Dark Grey
59+
Answer:
6160

6261
If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean?
63-
Answer:Purple (magenta)
62+
Answer:
6463

6564
If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be?
66-
Answer: 170 0 255
65+
Answer:

0 commit comments

Comments
 (0)