Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is your geekiness rating?
#51
Hm...

What's wrong with two zeroes..? That way, to convert from negative to positive you only need one switch. Otherwise you have to flip EVERY bit!!

I don't think anyone missed that extra negative.. did they?

I suppose that if the bit flipping is done in parallel it doesn't matter, but it does add some circuitry.. :roll:
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#52
Two's complements is better. Positive to negative is done by hardware. In hardware, every undetermined stuff is dangerous (spaceship crashes in mars, and the like). Having two zeroes causes a calculus overhead.

An example: To check if a register equals zero, there are "wires" directly connected to each bit, so the comparison is immediate. If you used only simple complement, and not two's complement you can have zero expressed by 00000000 and 10000000 (+0 and -0, in 8 bits), and you'd have to add extra circuitry. Imagine having to add extra circuitry for each register. Crazy.

There are many other examples, but I am too lazy now Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#53
Besides, you can still use the MSB (or LSB depending on the machines endianness) to determine whether the number is negative, because all negative two's complement numbers have it set.

Subtraction is very easy in a two's complement register, because you just add the two's complement of the number you want to subtract. This means you dont need special subtraction circuits for each register.
esus saves.... Passes to Moses, shoots, he scores!
Reply
#54
But didn't Neo get a higher score than you???
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)