Discussion:
XOR in logisim
(too old to reply)
David Schleimer
2008-07-26 01:14:01 UTC
Permalink
Raw Message
This is because there are two different definitions for XOR:

1) 1 iff the number of 1 inputs is 1 (i.e. if the parity of the input is
odd), which is used in 61c

2) 1 iff there is exactly 1 input that is 1, which logism uses

You want the odd parity block in logisim, found under Gates, looks like
a square with 2k+1 on it.

David
Hi,
In our reading we said XOR outputs a 1 when the number of 1's on the input is
odd. This isn't true. It fails if, say, we have a 3 input XOR and all inputs
are 1. This gives us an odd number of 1's but the XOR outputs a 0.
This doesn't match what's in the handouts given as reading and what we
discussed in class.
Kevin
[Instr] Albert Chae
2008-07-26 01:54:37 UTC
Permalink
Raw Message
You're right, logisim's XOR doesn't behave consistently with what we
want in 61C. If you need a multibit XOR, you'll need to build it
yourself.

Here's an explanation for the other way to interpret multi input XOR
gates:

http://en.wikipedia.org/wiki/XOR_gate#More_than_two_inputs

Albert
Hi,
In our reading we said XOR outputs a 1 when the number of 1's on the input is
odd. This isn't true. It fails if, say, we have a 3 input XOR and all inputs
are 1. This gives us an odd number of 1's but the XOR outputs a 0.
This doesn't match what's in the handouts given as reading and what we
discussed in class.
Kevin
[Instr] Albert Chae
2008-07-26 01:56:39 UTC
Permalink
Raw Message
Never mind, there is something that behaves like multi-input XORs.
See David's post.
Post by [Instr] Albert Chae
You're right, logisim's XOR doesn't behave consistently with what we
want in 61C. If you need a multibit XOR, you'll need to build it
yourself.
Here's an explanation for the other way to interpret multi input XOR
http://en.wikipedia.org/wiki/XOR_gate#More_than_two_inputs
Albert
Hi,
In our reading we said XOR outputs a 1 when the number of 1's on the input is
odd. This isn't true. It fails if, say, we have a 3 input XOR and all inputs
are 1. This gives us an odd number of 1's but the XOR outputs a 0.
This doesn't match what's in the handouts given as reading and what we
discussed in class.
Kevin
[Instr] Albert Chae
2008-07-26 22:59:41 UTC
Permalink
Raw Message
Yes, of course.

Albert
I've already done a fair amount of work, using a multibit XOR I built. Is it
OK to continue like this instead of using the solution mentioned in David's
post?
Post by [Instr] Albert Chae
Never mind, there is something that behaves like multi-input XORs.
See David's post.
Post by [Instr] Albert Chae
You're right, logisim's XOR doesn't behave consistently with what we
want in 61C. If you need a multibit XOR, you'll need to build it
yourself.
Here's an explanation for the other way to interpret multi input XOR
http://en.wikipedia.org/wiki/XOR_gate#More_than_two_inputs
Albert
Hi,
In our reading we said XOR outputs a 1 when the number of 1's on the input is
odd. This isn't true. It fails if, say, we have a 3 input XOR and all inputs
are 1. This gives us an odd number of 1's but the XOR outputs a 0.
This doesn't match what's in the handouts given as reading and what we
discussed in class.
Kevin
Loading...