Path: utzoo!mnetor!uunet!tektronix!orca!tekecs!frip!andrew From: andrew@frip.gwd.tek.com (Andrew Klossner) Newsgroups: comp.arch Subject: Re: conditional branches Message-ID: <9782@tekecs.TEK.COM> Date: 22 Feb 88 16:27:07 GMT References: <191@telesoft.UUCP> <28200098@ccvaxa> Sender: nobody@tekecs.TEK.COM Organization: Tektronix, Wilsonville, Oregon Lines: 15 "The test x = 0, and therefore x = y, can almost certainly be done with minimum delay in a pipeline, as can x < 0, looking just at the sign bit. A full arithmetic compare might be a problem because of carry." I've seen this assertion a couple of times, but it ain't so. You need to worry about carry when doing a subtract, but not when just doing a compare. If both operands are positive, a simple bit-for-bit comparison is sufficient, analogous to the way that C programs compare strings. When the operands can be signed, a little extra logic is required, but nothing as fancy as a full adder/subtractor. -=- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] (andrew%tekecs.tek.com@relay.cs.net) [ARPA]