Upload

Loading...

SPIQ #5 - Write one line of code to check if X is a power of 2

1,398

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Mar 25, 2014

If your interviewer fancies themself as hard core or if you're applying for a systems programming job then you might be asked to twiddle bits at the interview.

Here is one of the more common bit twiddling hacks - test if an integer X is a power of 2 (meaning "is X equal to some number raised to the power of 2")

Loading...

Sign in to add this to Watch Later

Add to