From: lisard@zetnet.co.uk Newsgroups: alt.folklore.computers Subject: Re: YKYBHTL... 1 Date: 12 Oct 1998 20:03:14 GMT Message-ID: <6vtna2$5im$12@irk.zetnet.co.uk> References: <361F6292.2967A8DC@stoneweb.com> NNTP-Posting-Host: man-011.dialup.zetnet.co.uk X-Trace: irk.zetnet.co.uk 908222594 5718 194.247.41.13 (12 Oct 1998 20:03:14 GMT) NNTP-Posting-Date: 12 Oct 1998 20:03:14 GMT X-Everything: Net-Tamer V 1.08X Lines: 18 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news.belnet.be!newsgate.cistron.nl!het.net!news-feed.inet.tele.dk!bofh.vszbr.cz!dispose.news.demon.net!demon!peer.news.zetnet.net!zetnet.co.uk!not-for-mail On 1998-10-10 carl.friend@stoneweb.com said: :jmfbahciv@aol.com wrote: :> [...] try to build a CPU that can do a single bit shift. Others :> in this newsgroup can be more helpful than I since hardware :> was not my specialty. :Which direction? Will that be one bit or two? Halfword swap? :Hint: You do _not_ need a "shift register" to do it. Thus spake the Nova fan... ;> Incidentally, whilst no, you don't need a shift register to do it, I can't think of any other way, except for a 1 in N selector switch on every bit leaving the ALU. ( LL L 0 R RR X : N=6 ) Am I missing something? -- Communa (together) we remember... we'll see you falling you know soft spoken changes nothing to sing within her... ###### From: "Carl R. Friend" Newsgroups: alt.folklore.computers Subject: Re: YKYBHTL... 1 Date: Mon, 12 Oct 1998 18:29:54 -0400 Organization: as little as possible! Lines: 40 Message-ID: <362282E2.707FDDD6@stoneweb.com> References: <361F6292.2967A8DC@stoneweb.com> <6vtna2$5im$12@irk.zetnet.co.uk> NNTP-Posting-Host: zephyr.ultranet.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@ultra.net X-Ultra-Time: 12 Oct 1998 22:29:55 GMT X-Mailer: Mozilla 2.0 (X11; I; Linux 2.0.29 i586) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news.belnet.be!newsgate.cistron.nl!het.net!newsfeed.wirehub.nl!btnet-peer!btnet!newsfeed.cwix.com!207.172.3.37!feed1.news.rcn.net!rcn!news.ultranet.com!not-for-mail lisard@zetnet.co.uk wrote: > > On 1998-10-10 carl.friend@stoneweb.com said: > > :Which direction? Will that be one bit or two? Halfword swap? > :Hint: You do _not_ need a "shift register" to do it. > > Thus spake the Nova fan... ;> Incidentally, whilst no, you don't need > a shift register to do it, I can't think of any other way, except for > a 1 in N selector switch on every bit leaving the ALU. ( LL L 0 R RR > X : N=6 ) Am I missing something? Nope. You didn't miss a thing - good job. Shifts, swaps, and the like were frequently done with multiplexers which were hard-wired to the appropriate ALU output bits. The Nova uses a four-input mux to do the job: "bit 2" is wired to "bit 2" (for straight transfers), "bit 1" (for right shift), "bit 3" (for left shift), and "bit 9" for halfword swap. Selecting the appropriate input is done by a field in the instruction word. Other architectures (e.g. PDP-10) used similar means. While it _is_ possible to use a shift register to do this sort of stuff, it's not worth the clock cycles unless you _routinely_ do variable length shifts (or rotations). With a simple multiplexer you don't incur extra clock cycles for a shift. Even without a dedicated shift register the effect is possible by merely recirculating the whole thing through the ALU under the control of a counter. (Also, in "classic" architectures, hardware was obscenely expensive so corners "got cut" all the time - e.g. the pdp11/10 lacked byte-swap capability and did an 8-bit rotation to perform the task.) -- ______________________________________________________________________ | | | | Carl Richard Friend (UNIX Sysadmin) | West Boylston | | Minicomputer Collector / Enthusiast | Massachusetts, USA | | mailto:carl.friend@stoneweb.com | | | http://www.ultranet.com/~engelbrt/carl/museum | ICBM: N42:22 W71:47 | |________________________________________________|_____________________|