Popular recipes tagged "octal" but not "linux"http://code.activestate.com/recipes/tags/octal-linux/2016-10-10T20:40:48-07:00ActiveState Code RecipesGenerate a PDF cheat sheet for converting 0 to 255 between bin / oct / dec / hex (Python) 2016-10-10T20:40:48-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580706-generate-a-pdf-cheat-sheet-for-converting-0-to-255/ <p style="color: grey"> Python recipe 580706 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/binary/">binary</a>, <a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/hexadecimal/">hexadecimal</a>, <a href="/recipes/tags/octal/">octal</a>, <a href="/recipes/tags/pdfwriter/">pdfwriter</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/utility/">utility</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how to generate a PDF cheat sheet, that contains a table for conversion of the numbers 0 to 255 (the numbers that can fit in one byte) between binary, octal, decimal and hexadecimal representations. The table has four columns, one for each of those bases, and 256 rows, for the numbers 0 to 255.</p> <p>TO use the table, you can look for a number, say in decimal, in the Dec(imal) column (or use the search function of your PDF viewer), then when you find it in some row, just look at the other 3 columns in that row, to find the value of that number in binary, octal and hexadecimal. And use the same procedure if starting with a number in any of the other three bases.</p> Convert from decimal to base-n for any positive n less than or equal to 10 (Python) 2013-08-09T05:56:16-07:00Samuel James Ericksonhttp://code.activestate.com/recipes/users/4187478/http://code.activestate.com/recipes/578630-convert-from-decimal-to-base-n-for-any-positive-n-/ <p style="color: grey"> Python recipe 578630 by <a href="/recipes/users/4187478/">Samuel James Erickson</a> (<a href="/recipes/tags/binary/">binary</a>, <a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/octal/">octal</a>). </p> <p>Takes in any non-negative integer and converts to the desired base-n for 1&lt;=n&lt;=10.</p>