Skip to content

Conversation

@Luke-Manyamazi
Copy link

@Luke-Manyamazi Luke-Manyamazi commented Jul 15, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Here's your brief as a list, based on what you've stated you've done:

I have:

  • Completed exercises on binary numbers and representations.
  • Converted numbers between binary, decimal, and hexadecimal.
  • Performed binary arithmetic.
  • Calculated bit requirements for various number ranges.
  • Identified the bitwise trick for checking powers of two.
  • Demonstrated how a single byte can represent a decimal number, an ASCII character, or a color.

Questions

Beyond these exercises, what's a practical, real-world scenario where understanding these low-level binary/hex/byte interpretations becomes critical in programming?

@Luke-Manyamazi Luke-Manyamazi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 15, 2025
@chinar-amrutkar chinar-amrutkar self-assigned this Jul 16, 2025
Copy link

@chinar-amrutkar chinar-amrutkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a think about the comment I added, and then we are good to go! Great work :)


How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)?
Answer:
Answer: by using the bitwise formula (N & (N - 1)) == 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you think of a simpler way of doing this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A number is a power of two if you can keep dividing it by 2 until you reach 1, with no remainders along the way. If at any point there’s a remainder, it’s not a power of two.

@chinar-amrutkar chinar-amrutkar added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 20, 2025
@Luke-Manyamazi
Copy link
Author

Luke-Manyamazi commented Oct 13, 2025

If all is well please help me mark the PR as complete.

@Luke-Manyamazi
Copy link
Author

@chinar-amrutkar @LonMcGregor @illicitonion kindly help to check if all is well here and please mark as complete if all is well, this is a requirement for my Launch Module application. Thank you very much.

@Luke-Manyamazi Luke-Manyamazi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 14, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TECH ED] Number systems exercises

3 participants