West Midlands | 26 March SDC | Iswat Bello | Sprint 1 | Number systems#370
West Midlands | 26 March SDC | Iswat Bello | Sprint 1 | Number systems#370Iswanna wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
- Filled in answers for binary, decimal, and hex conversions - Provided answers for bit storage, binary addition, and comparison questions - Added responses for interpreting bytes as numbers, ASCII, greyscale, and RGB colors
- Updated README.md to provide a clearer explanation for testing powers of two in binary. - Replaced the previous answer with a more descriptive method.
cjyuan
left a comment
There was a problem hiding this comment.
Can you do a self-check against the answers on https://github.com/CodeYourFuture/Module-Tools/blob/solutions/number-systems/README.md?plain=1
Should you have any question regarding number systems, feel free to raise them in the comment of this PR.
Hi @cjyuan, Thank you for the review. I will carry out a self-check against my answers and leave a comment on this PR as advised. Apologies for the delayed response. I didn’t receive a notification as I usually do when my PR is reviewed. I only noticed your review when I manually checked my PRs. |
|
number-systems/README.md
Outdated
|
|
||
| How many bits would you need in order to store the numbers between 0 and 1000 inclusive? | ||
| Answer: | ||
| Answer: 10 bits |
There was a problem hiding this comment.
I have compared my answer with the answer in the reference material, and I can see that the provided answer is more detailed. It correctly notes that 10 bits provide 1,024 combinations, leaving 23 spare values after storing the range 0–1000 (which contains 1,001 total values). I will update my answer to include this context.
number-systems/README.md
Outdated
|
|
||
| How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? | ||
| Answer: | ||
| Answer: It can be tested if one of the bits in the value is one e.g 0100, 10, 100 |
There was a problem hiding this comment.
I also see here that my answer was not precise enough. Stating that ‘one of the bits in the value is one' could incorrectly include numbers like 3 (0011) or 6 (0110), which are not powers of two. I have updated the answer to specify that there must be exactly one bit set to 1.
number-systems/README.md
Outdated
|
|
||
| If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? | ||
| Answer: | ||
| Answer: very dark gray |
There was a problem hiding this comment.
I used 'very dark grey' because 0x21 (decimal 33) is quite close to 0 (black). However, I will update my answer to 'Dark grey' to maintain consistency with the reference material.
There was a problem hiding this comment.
They mean the same thing. There is no standard for "dark" or "very dark".
|
Your proposed changes look good. Why close the PR when you were making changes? I think you did it several times in ITP too. |
Hi @cjyuan, I just noticed that the PR was closed 5 hours ago; this was unintentional. If this happened previously in ITP, those were also accidents. I'll be more careful to avoid clicking the 'Close with comment' button in the future. Thank you for approving my PR! |
- Specify that 10 bits leave 23 spare values (1001–1023) for the 0–1000 range - Clarify power-of-two test: exactly one '1' in binary representation - Adjust greyscale wording/capitalization to "Dark grey"
Learners, PR Template
Self checklist
Changelist
This pull request completes the answers for all exercises in the README.md file related to binary, hexadecimal, and colour representation. All previously blank "Answer:" fields have been filled in with the correct values.
Questions
Hi, could you please review my PR? I would really appreciate your feedback.