please dont rip this site

language ccpp CREF PROBLEMS bits

#include <stdio.h>
#include <stdlib.h>
main ()
   {
   long int i=1,j=i;

					/* title			*/
   puts("Bits\tRange");
   puts("----\t-----");
					/* O/P data and calc the next 
					 * set of values		*/
   for (i=1; i<=32; i++)
      {
      printf("%2ld\t0-%12lu\n", i, j*=2);
      }
   }
/************************************************************************
 * Bits    Range
 * ----    -----
 *  1      0-           1
 *  2      0-           3
 *  3      0-           7
 *  4      0-          15
 *  5      0-          31
 *  6      0-          63
 *  7      0-         127
 *  8      0-         255
 *  9      0-         511
 * 10      0-        1023
 * 11      0-        2047
 * 12      0-        4095
 * 13      0-        8191
 * 14      0-       16383
 * 15      0-       32767
 * 16      0-       65535
 * 17      0-      131071
 * 18      0-      262143
 * 19      0-      524287
 * 20      0-     1048575
 * 21      0-     2097151
 * 22      0-     4194303
 * 23      0-     8388607
 * 24      0-    16777215
 * 25      0-    33554431
 * 26      0-    67108863
 * 27      0-   134217727
 * 28      0-   268435455
 * 29      0-   536870911
 * 30      0-  1073741823
 * 31      0-  2147483647
 * 32      0-  4294967295
 */


file: /Techref/language/ccpp/CREF/PROBLEMS/bits.c, 1KB, , updated: 1997/4/21 09:53, local time: 2012/5/25 08:03,
TOP NEW HELP FIND: 
38.107.179.232:LOG IN

 ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF="http://www.piclist.com/techref/language/ccpp/CREF/PROBLEMS/bits.c"> language ccpp CREF PROBLEMS bits</A>

Did you find what you needed?

 
Check out Peter Cousens EXCELLENT
Calculator
7-seg LED chars, port values, resistor color codes and common values, ohms law, wavelength / frequency, RMS and Peak, max value for x bits, etc...
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .