home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- 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
- From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879)
- Subject: Re: MINIMUM instruction set
- Sender: news@news.uiowa.edu (News)
- Message-ID: <1992Nov11.200817.15552@news.uiowa.edu>
- Date: Wed, 11 Nov 1992 20:08:17 GMT
- References: <4f0IQEm00WD5IXXKNc@andrew.cmu.edu>
- Nntp-Posting-Host: pyrite.cs.uiowa.edu
- Organization: University of Iowa, Iowa City, IA, USA
- Lines: 29
-
- From article <4f0IQEm00WD5IXXKNc@andrew.cmu.edu>,
- by "Jon C. R. Bennett" <jb7m+@andrew.cmu.edu>:
- >
- > i think that perhaps a better question, and one which i think you almost
- > answered is, "How many operations are needed...."
- > the instructions that you present do the following
- >
- > load > store > subtract > compare > branch
- >
- > the only things i can think of that are missing are
- >
- > shift > bit op (and,or,xor)
-
- You don't need shift or bit-ops. Shifts are equivalent to multiply and
- divide operations. Multiply can be done by repeated addition (which is
- really repeated subtraction of negated addends), and division can be done
- by repeated subtraction.
-
- To test bit i of a word, shift the word until bit i is the sign bit. To
- do a logical and, just test all the relevant bits and construct the
- appropriate result.
-
- Of course, logical sufficiency is the only thing that concerns us, speed
- doesn't matter, right? If speed matters, then (and only then) do you bother
- adding an add instruction, bit operations, shift instructions, and other
- convenient stuff.
- Doug Jones
- jones@cs.uiowa.edu
-
-