Skip to content

Conversation

@aiahibrahim
Copy link

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

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@aiahibrahim aiahibrahim 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
@chinar-amrutkar chinar-amrutkar self-requested a review July 22, 2025 08:39
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.

Well done!


How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)?
Answer:
How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? will have exactly one bit set to 1

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 to do this?

Copy link
Author

Choose a reason for hiding this comment

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

if a number has only one 1 in its binary form and all other digits are 0 — then it’s a power of two.

@chinar-amrutkar chinar-amrutkar added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 22, 2025
@aiahibrahim aiahibrahim closed this Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants