Skip to content

Commit e3b7ab0

Browse files
committed
Resetting other tasks to fix PR issues
1 parent 2b1e73e commit e3b7ab0

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

number-systems/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +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: 0b1110
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: Signed numbers: 0b0111 = 7. Unsigned numbers: 0b1111 = 15
26+
Answer:
2727

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

3131
How many bits would you need in order to store the numbers between 0 and 3 inclusive?
32-
Answer: 2-bits
32+
Answer:
3333

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

3737
How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)?
38-
Answer: Power of two will have only 1 bit set to 1, and the rest of the bits set to zero. e.g 0b1000, 0b0100, 0b0010
38+
Answer:
3939

4040
Convert the decimal number 14 to hex.
41-
Answer: E
41+
Answer:
4242

4343
Convert the decimal number 386 to hex.
44-
Answer: 0x182
44+
Answer:
4545

4646
Convert the hex number 386 to decimal.
47-
Answer: 902
47+
Answer:
4848

4949
Convert the hex number B to decimal.
50-
Answer: 11
50+
Answer:
5151

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

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

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

6161
If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean?
62-
Answer: Purple
62+
Answer:
6363

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

shell-pipelines/ls-grep/script-01.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ set -euo pipefail
44

55
# TODO: Write a command to output the names of the files in the sample-files directory whose name contains at least one upper case letter.
66
# Your output should contain 11 files.
7-
ls ./sample-files | grep '[A-Z]'

shell-pipelines/ls-grep/script-02.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ set -euo pipefail
44

55
# TODO: Write a command to output the names of the files in the sample-files directory whose name starts with an upper case letter.
66
# Your output should contain 10 files.
7-
ls ./sample-files | grep '^[A-Z]'

shell-pipelines/ls-grep/script-03.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ set -euo pipefail
44

55
# TODO: Write a command to output the names of the files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.
66
# Your output should contain 7 files.
7-
ls ./sample-files | grep '^[A-Z][^A-Z]*$'

shell-pipelines/ls-grep/script-04.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ set -euo pipefail
44

55
# TODO: Write a command to count the number of files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.
66
# Your output should be the number 7.
7-
ls ./sample-files | grep '^[A-Z][^A-Z]*$' | wc -l

0 commit comments

Comments
 (0)