No, you should have multiplied by CHAR_BITS. Check out this thread: http://cboard.cprogramming.com/showthread.php?t=86809