-
-
Notifications
You must be signed in to change notification settings - Fork 42
London | 25-SDC-July | Andrei Filippov | Sprint 1 | Number systems exercises #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
chinar-amrutkar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! There are a few errors which you need to correct, hopefully the hints help!
number-systems/README.md
Outdated
|
|
||
| How many bits would you need in order to store the numbers between 0 and 255 inclusive? | ||
| Answer: | ||
| Answer: 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about what 255 looks like in binary form. How many bits does it have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be 11111111, so I’ll need 8 bits for this. I completely forgot that the last digit in a binary number represents 2 to the power of 0, not 1.
number-systems/README.md
Outdated
|
|
||
| How many bits would you need in order to store the numbers between 0 and 1000 inclusive? | ||
| Answer: | ||
| Answer: 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about what 1000 looks like in binary form. How many bits does it have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1111101000 has 10 bits, so I need 10 bits. I made the same mistake again - I forgot that the rightmost digit represents 2 to the power of 0.
number-systems/README.md
Outdated
|
|
||
| Convert the decimal number 14 to hex. | ||
| Answer: | ||
| Answer: F |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think again!
Hint - you start counting the alphabets from 10, not 11
|
|
||
| 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: Gray colour with light intensity equals 33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the gray light?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the question clearly. Are you asking why the colour is grey, or why it's light instead of dark
|
Hi Andrei, I think the only question left here is when the reviewer was asking about the grey colour. When you say "light intensity equals 33" - what would this look like if displayed on a screen? Can you describe that colour in general terms |
|
Hi. Since grayscale images are commonly represented with 8 bits per pixel, allowing for 256 shades of grey, where 0 corresponds to black (no light intensity) and 255 to white (full intensity), I would describe the colour 0x21 as a dark grey. |
|
Great - you are done with this sprint now |
Learners, PR Template
Self checklist
Changelist
done exercises
Questions
no questions