Loading ...
Sorry, an error occurred while loading the content.

RE: [hackers-il] Re: Why Assembler is perfect for Algorithms book

Expand Messages
  • Omer Musaev
    -----Original Message----- From: Shlomi Fish [mailto:shlomif@techst02.technion.ac.il] Sent: Tuesday, November 19, 2002 9:10 AM To:
    Message 1 of 4 , Nov 19, 2002
    • 0 Attachment
      ' -----Original Message-----
      ' From: Shlomi Fish [mailto:shlomif@...]
      ' Sent: Tuesday, November 19, 2002 9:10 AM
      ' To: hackers-il@yahoogroups.com
      ' Subject: [hackers-il] Re: Why Assembler is perfect for Algorithms book
      '
      '
      ' On Mon, 18 Nov 2002, Muli Ben-Yehuda wrote:
      '
      ' > On Mon, Nov 18, 2002 at 07:10:43PM +0200, Chen Shapira wrote:
      ' >
      ' > > Using assembly clearly defines the basic operations -
      ' everything that the
      ' > > CPU does in one command.
      ' >
      ' > Ah, but no too commands are created equal. an integer add and a
      ' > floating point div, will not take the same ammount of time. If I
      ' > remember correctly, most asm commands are actually implemented in
      ' > terms of "micro code", and are actually several micro code
      ' > instructions each. I'm sure someone will correct me if I'm wrong.
      ' >
      '
      ' Well, when we built the MAYBE as part of the "Logic Design"
      ' course, we had
      ' a predefined ALU (Arithmetical and Logical Unit) that did
      ' most of the job
      ' for us. But I think you can calclulate the complexities of various
      ' operations based on Al-Huarizmi's Algorithms:
      '
      ' (n is the number of bits)
      '
      ' 1. Increment/Decrement : O(log(n)).
      ' 2. Addition O(log(n)^2))
      ' 3. Shift: O(log (n))
      '
      ' And so on. For floating points it is a bit trickier because
      ' of the mantisa
      ' and exponent and stuff but still possible.
      '
      ' I still think Knuth should have given the algorithms in Pseudo-code so
      ' people can understand and then expand them into Assembler.

      Shlomi, did you happen to read TAOP? The pseudo code is in the comments to
      MIX...

      '
      ' Oh and I'll spend the time thinking about profound things to say.
      '
      ' Regards,
      '
      ' Shlomi Fish
      '
      ' > Anyway, while your reasons are sound, I believe that the best reason
      ' > to use a make believe language is to keep the books relevant
      ' > regardless of the latest fad current computer language or
      ' > architecture. Imagine TAOCP in Java, TAOCP in CPP, TAOCP in
      ' > JavaScript, TAOCP.NET.
      ' > --
      ' > Muli Ben-Yehuda http://www.mulix.org/
      ' > mulix@...:~$ sctrace strace
      ' /bin/foohttp://syscalltrack.sf.net/
      ' > Quis custodes ipsos custodiet?
      ' >
      ' >
      ' > To unsubscribe from this group, send an email to:
      ' > hackers-il-unsubscribe@egroups.com
      ' >
      ' >
      ' >
      ' > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      >
      >



      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/
      Home E-mail: shlomif@...

      "Let's suppose you have a table with 2^n cups..."
      "Wait a second - is n a natural number?"


      To unsubscribe from this group, send an email to:
      hackers-il-unsubscribe@egroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.