LONDON \ DONARA BLANC | MODULE TOOLS | SPRINT 1 | Number systems #28
LONDON \ DONARA BLANC | MODULE TOOLS | SPRINT 1 | Number systems #28donarbl wants to merge 0 commit intoCodeYourFuture:mainfrom
Conversation
mjpeet
left a comment
There was a problem hiding this comment.
It's great to see you working through these exercises and putting in the effort to understand binary and hexadecimal number systems. Mistakes are a natural part of the learning process, and it's important to learn from them and keep moving forward.
Keep pushing, and remember that every step, even the missteps, are part of your journey to becoming a proficient developer. You're doing great, and with continued effort and attention to detail, you'll keep improving.
There was a problem hiding this comment.
hi, it looks like this file was included in the wrong pull request. Please be more careful with your Git operations, as we hold trainees accountable for their Git knowledge at this level. Please ensure that each PR contains only the relevant changes for the specific task or feature you are working on. (i can see that this file also appears in your PR for individual shell tools)
hint: when you create a PR, it's always a good idea to check which file changes will actually be included in the PR, when you click the create PR button
number-systems/README.md
Outdated
| How many bits would you need in order to store the numbers between 0 and 1000 inclusive? | ||
| Answer: | ||
|
|
||
| 10 |
There was a problem hiding this comment.
what would be the largest decimal number you can store on 10 bits?
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: | ||
|
|
||
| n(n-1) =0 |
There was a problem hiding this comment.
can you please explain to me what do you mean here? (what operation is between "n" and "(n-1)" in this expression?)
There was a problem hiding this comment.
a power of two has only 1 in its representation. 0001- 1, 0010- 2, 0011-3 is not power of 2, 0100-4, 0101-5 -is not power of 2. but there is a faster formula we can apply the formula n(n-1) =0, that is a bisewise operation.
number-systems/README.md
Outdated
| Convert the hex number 386 to decimal. | ||
| Answer: | ||
|
|
||
| 3*16(2) +8*16(1)+ 6*16(0) =902 |
There was a problem hiding this comment.
well done, and thanks for sharing how you got to the result! (i'll be a nitpicky (and i can see you used "*" to signal multiplication), but i think it's worth 'signaling' if you try to use exponentiation/power of in plain text eg. with ^ - so your expression would look like this: 3 * 16^2 + 8 * 16^1 + 6 * 16^0 = 902 )
regardless, the solution is correct
number-systems/README.md
Outdated
| If reading the byte 0x21 as an ASCII character, what character would it mean? | ||
| Answer: | ||
|
|
||
| "!! |
There was a problem hiding this comment.
could you please clarify this? (is it 3 characters, two or just one at the end?)
Self checklist
Changelist
Completed exercises on converting decimals into binary and hexadecimal and vice-versa.
Questions
Ask any questions you have for your reviewer.