Upload

Loading icon Loading...

This video is unavailable.

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

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like Coding FTW's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike Coding FTW's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add Coding FTW's video to your playlist.

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 icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Loading icon Loading...

Loading...
Working...
to add this to Watch Later

Add to