[hackeroid] B1:2 Number systems.

In most of the countries of the world they count in the same way, "in arabic", regardless of the language, using ten digits, 0123456789. When the digits are over, two-digit numbers are used. If we have only five digits, 01234, we would count like this: 0 1 2 3 4 10 11 12 13 14 20 21 22 23 24 30 31 32 33 34 40 41 42 43 44 100 101 102 103 104 110 111 112...

The most common number system is called decimal (dec). The number system we have just looked at is called пятеричная. The number of digits in number system is called base (or radix).

When using number systems with radix of more than ten, one must invent new digits. It is used to use latin letters (alphas). So in seventeen-based number system we would count like this: 0 1 2 3 4 5 6 7 8 9 A B C D E F G 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G 20.. GD GE GF GG 100 101 102.. When the base is big enough (When?), this will not do.

Different number systems are like different languages. One number can have absolutely different representations in various number systems. So the number 127 is equal to 7F in hexadecimal and 1111111 in binary. Similarly, like the words are being translated from one language to another, numbers can be converted from one number system to another. These number systems are like the computer language for numbers. Binary number system (bin) is used virtually on every machine. Additionally PDP-11, BK-0010, DVK use octal number system (oct). IMB PC machines, Macintosh, VAX use hexadecimal (hex) number system.

Of course trailing zeroes do not alter its value in any number system. It wouod be good if you wil imagine that in front of every number there is an infinte number of zeroes -- it wil help you a lot in the beginning of base two (B2:1).

It is strongly adviced to calculate a little in various number systems. If you would take a piece of paper and numerate the rows first in decimal, then in octal, hexadecimal and binary number systems, you will get good table for conversion of first about thirty numbers between the most used in hacking number systems. Write down the numerical values of all the latin letters also -- it will help you a lot.

Table of conversion of first 16 numbers between binary, decimal and hexadecimal number systems is called The Dragon Table in our school.

>>>

The exact glyphs of numbers is not important. The fact that zero is written as a circle and one as a line segment is no more than historical условность. We can count in ternary number systems with letters %$^: % $ ^ $% $$ $^ ^% ^$ ^^ $%% $%$ $%^ $$% $$$ $$^ $^% $^$ $^^ ^%%... Also the number system where russian letters are used as digits is very perspective in computer world -- there are thirty two (not counting e umlaut) russian letters, and that is the power of two!

Also it's not worth taking too seriously demand of using latin letters after nine. ASCII-symbols standing after the "nine" aren't worse. Only less people would understand you. (I do not advice to hide your laziness of making the normal output of hexadecimal numbers this way -- you'll запутаетесь while analyzing output).

In fact for defining number system one must provide not its base, but a vector (ordered array) of its digits. Counting in number system where digits go in wrong order (for example, octal number system with vector 31276504) can significantly harden the understanding.

During our school' seminar "Cracking games w/o debugger" I talked about cracking of game cartridge Ecco the Dolphin for Sega videogame. The idea of the game was in dolphin's quest through seas and oceans for his lost family. In order not to die, dolphin has to swim to the surface of the water to breath some air.

In this game there was password save system -- in the beginning of each episode there was a password, which could be used to jump to this level directly. Analyzing this codes (there were six latin letters in them) it turned out that they were the numbers in twenty-six-based number system with vector of ABCDEFGHIJKLMNOPQRSTUVWXYZ -- all latin letters in alphabet order. in such a number system, for example, decimal number 10 would be written as K. And the number FUCK, converted from this system to decimal, would look like 101462 (Check it out).

having converted the number from 26-base number system to binary and having found the type of checksum, I could jump to the desired level and turn off the oxygen needance. There was such a bit.

<<<

in math it is accustomed to write the radix of number system (with digits (012...ABCD...Z) as the subscript of the number. The base is written in decimal number system. We in the text files of The Base will mark this like this: 1Fc_16 means 1FC in hexadecimal number system.

Please note (check out with your table) that 10..0_x=x^n, where n is th number of zeroes after one.

<<<B1:2 EOF>>>



E-mail: hscool@netclub.ru
Hosted by uCoz