home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10623 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!news
  3. From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879)
  4. Subject: Re: MINIMUM instruction set
  5. Sender: news@news.uiowa.edu (News)
  6. Message-ID: <1992Nov11.200817.15552@news.uiowa.edu>
  7. Date: Wed, 11 Nov 1992 20:08:17 GMT
  8. References: <4f0IQEm00WD5IXXKNc@andrew.cmu.edu>
  9. Nntp-Posting-Host: pyrite.cs.uiowa.edu
  10. Organization: University of Iowa, Iowa City, IA, USA
  11. Lines: 29
  12.  
  13. From article <4f0IQEm00WD5IXXKNc@andrew.cmu.edu>,
  14. by "Jon C. R. Bennett" <jb7m+@andrew.cmu.edu>:
  15. > i think that perhaps a better question, and one which i think you almost
  16. > answered is, "How many operations are needed...."
  17. > the instructions that you present do the following
  18. > load > store > subtract > compare > branch
  19. > the only things i can think of that are missing are
  20. > shift > bit op (and,or,xor)
  21.  
  22. You don't need shift or bit-ops.  Shifts are equivalent to multiply and
  23. divide operations.  Multiply can be done by repeated addition (which is
  24. really repeated subtraction of negated addends), and division can be done
  25. by repeated subtraction.
  26.  
  27. To test bit i of a word, shift the word until bit i is the sign bit.  To
  28. do a logical and, just test all the relevant bits and construct the
  29. appropriate result.
  30.  
  31. Of course, logical sufficiency is the only thing that concerns us, speed
  32. doesn't matter, right?  If speed matters, then (and only then) do you bother
  33. adding an add instruction, bit operations, shift instructions, and other
  34. convenient stuff.
  35.                     Doug Jones
  36.                     jones@cs.uiowa.edu
  37.  
  38.