RIP #02
29 ноября 1997

School Hacker - Cycle BASE -1 ": Ukraschenie Dragon Attack Dragon.

<b>School Hacker</b> - Cycle BASE -1
                             BASE-1

                  The first seminar. Base.

                (Continued from in RIP # 1)



    All rights training materials Hekerskoy Schools
belong Arvi Hacker (Ilya Vasilyev), Moscow,
2:5020 / 287 @ fidonet, arvi@hsys.msk.ru, 
ath@verte.dnntm.rssi.ru. If you use any part of this material 
for any purpose obligatory link to the source. In the case of 
commercial use or for teaching more than one

Rights required a preliminary agreement with the author.
This material was originally intended for students and
students, pupils Hekerskoy School.


                     B1: 3 Taming the Dragon.

                     =======================


    Translation algorithm from any system to decimal we call
algorithm Taming the Dragon: X_n-> Y_10. Called because
long line computation resembles a dragon's back lying and
Reply - dragon's head resigned. It is based on the observation
that:

34947 = 30000 +4000 +900 +40 +7 = 3 * 10 ^ 4 + 4 * 10 ^ 3 + 9 * 
10 ^ 2 + 4 * 10 +7 


    That is, the number is the sum of its digits multiplied by
appropriate to the ground. Transfers of numbers and 1210_3
C00L_22:

 1210_3 = 1 * 3 ^ 3 + 2 * 3 ^ 2 + 1 * 3 + 0 = 27 + 18 + 3 = 
48_10  C00L_22 = 12 * 22 ^ 3 + 0 * 22 ^ 2 + 0 * 22 + 21 = 
127776 + 21 = 127797 


    Many of the books that version of the algorithm Taming the 
Dragon used to determine what the number system.

Try poperevodit larger numbers of the different systems
notation. Preferably without using a calculator, performing
all arithmetic operations in the mind or on a leaflet. Larger
binary numbers - they give us more useful!

>>>


    Applying Horner's scheme (B1: 1) we get a lot more
efficient version of the algorithm Taming the Dragon.


   1210_3 = ((1 * 3 +2) * 3 +1) * 3 +0 = 16 * 3 = 48


   C00L_22 = (((12 * 22 +0) * 22 +0) * 22 21 = 127 776 + 21 = 
127797 


    What is its efficiency? Now you do not need surgery
exponentiation! When programming in assembly language is
just shine! Even high-level language translation software
obtained much faster and shorter. Try to make
This program takes the number from any number system to
you familiar decimal language. It almost duplicates the program 
for Horner scheme.



    Hacker to be constantly on alert - who
knows where he will demonstrate the art. Quite
it is possible that you will be asked to repair or remove the 
virus from computer at a strange place-in the supermarket or at 
home your girl. (In the movie "War Games" a young hacker, David,

Accidentally connecting the recorder to a combination lock,
able to record and repeat signals open the door and escape from
under arrest.)


    If the hand is only a primitive calculator, with only
four arithmetical operations (such as let into hours), then
by the traditional method you have somewhere to write, and then
type intermediate results. The new method you
only need to dial numbers between the multiplication sign,
radix and the sign of addition.


    If the hand was not even a primitive
calculator, the new algorithm can Taming the Dragon
used to transfer the number of bars. The result of one
example is the initial value for the next.


   January 1912

  * 3 * 22
 --- ---
   March 1924

  24 +2
 --- ---
   5 264

  * 3 +0 Of course, the zeros I add here only for training,
 --- ---- In real life do not necessarily. :-)

  15 264

  +1 * 22
 --- ---
  16 528

  * 3528
 --- ---
  18 5808

  3 +0
 --- ---
  48 5808

  +0 * 22
 --- ---
  48 11616

     11616

     -----
     127776

        +21

     -----
     127797


    Here we have tamed the Dragon set vertically, muzzle
down. Perhaps to be more fit ...

<<<



                      B1: 4 Attack of the Dragon.

                      ===================


    The opposite effect, a transfer from the decimal number 
system in arbitrary, we call Dragon Attack: Y_10-> X_n. This

action usually occurs when we want to enter information
into the computer. We live in a decimal world, and the computer 
- in some hex. And in order to enter

something to us in his world, the "attack", we have to translate
it's a foreign number system.


    You've got to be able to share. :-) Translate the numbers 
obtained by Taming the Dragon back to the native number system

successively dividing them into the ground, until a number
smaller than the base. This number is a column not sharing.
:-)


   48 | 3 127 797 | 22

  -3 -110 +-----+ +------+

  - | 16 | 3 --- | 5,808 | 22

   18 -15 177 -44 +----+ +------+

  -18 - | 5 | 3 -176 - | 264 | 22

   - 1 -3 140 -22 +---- --- + ---
    0 - | 1 197 -132 - | 12 = C

               2 -176 --- 44

                           --- 88 -44

                            21 = L -88 -
                                  - 0

                                   0


    The result is read from the last private and balances
collected in reverse order. So in the first case
1210_3, while the second - C00L_22.


    Try to translate the numbers, resulting in self-
The Taming of the practice, back to their original number 
system. Try a few decimal numbers translate into any

strange number system and vice versa.

>>>


    If you know a good share in the mind (or use
calculator), it is more convenient to use a different account:


   48 | 0 127797 | 21 = L

   16 | January 5808 | 0

    5 | 2264 | 0

    1 | 12 = C


    Here, for each division remainder is written to the right of
features, and private-bottom. As always, the attack response is 
read in reverse order, from bottom to top.



    Create a program that performs automatic translation
any number system.

<<<


                                        (To be continued ...)





Other articles:

7 Origins - Seven top origin'ov-wise, and not expressions.

Game - Description of the game "Shark".

Games TOP 10 - The best ten game programs from DOC'a and Sanalex'a.

Marazm - Humor.

Post ... - letter of Freeman'a.

Wares - Overview of new revenue: FIENDISH FREDDY'S.

ZX-World news - Super Strategy Civilization is close to completion. Vyacheslav Mednonogov the release of "Black Crow". A new journal "Scenergy". A draft TECHNODROM II. New network program BBS v4.01 for XTR-modems. CD-ROM with a collection of programs for the ZX-SPECTRUMA.

Entry - a week has passed, but the news is not diminished.

Iron - The scheme of the converter 5 -> 12 for feeding VGshki.

School Hacker - Cycle BASE -1 ": Ukraschenie Dragon Attack Dragon.

Epilogue


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Events - Chaos Constructions 2000. Report.
General Sound - X-Player - first normal player mods for General Sound.
Archive - discussed in detail the game "ARCHON". You are invited to fight against the computer or with a live opponent in the fairy chess, where instead of the traditional chess pieces involving dragons, witches, etc.

В этот день...   4 May