# Logisim input and terminal issue

I had this final gate that I made. but when I run it in terminal. it says my output is E instead of 0/1. I wanna know why my output is E instead of 0/1.

• The circuit should have four inputs: A, B, C, and D.
• The circuit should have two outputs: W and X.

You will need to modify it so that the following things are true:

• The output W should be a 1 if and only if there aren't two adjacent 1s in the inputs (i.e. A and B, B and C, or C and D).
• The output X should be a 1 if and only if there aren't two adjacent 0s in the inputs.

My question is why my output is 0000 E 0, which it should be 0000 1 0?

• You can clearly see all of your signals...which of them is different from what you designed? If they are consistent with your design then your design must not meet the specifications...but you haven't shared the specifications or your design so we can not help with that. Do you have a specific question? – Elliot Alderson May 18 at 22:08
• @ElliotAlderson sorry I just added some specifications to my question. my question is why my output is 0000 E 0, which it should be 0000 1 0 – kristyahh wu May 18 at 22:17
• E seems like a sampling “race” error, so use a delay after you change inputs . If you can’t, then use a FF to sample output on opposite edge – Sunnyskyguy EE75 May 18 at 22:47
• "E" means "error." It's in the docs. You have red wires. Those are also errors. Blue wires mean bad things, too. Like nothing driving them. Those are also errors. Fix the blue and red wires. You should see dark green or light green wires, only. Anything else is a problem you need to fix. It's clear you don't yet know how to use Logisim and need to do some reading and/or get yourself a tutor to walk you through using it. – jonk May 18 at 23:15
• @jonk thank you! This really helps – kristyahh wu May 19 at 0:00

Let me give you some help. It won't solve all your problems. But it will help solve this one.

First, let's look at a PIN in Logisim. If you go to the Wiring folder, you see something called Pin. This can either be an input pin or an output pin (as I think you already know.) An input pin, placed onto the schematic page, looks like this:

There is already one problem that needs to be fixed. The default, when you first start up Logisim, is that a pin is for generating input signals. (Technically, it's actually an output "device" but Logisim calls it an "output=No" on the dialog box. So you just get used to it.) It is also, by default, a 3-state output. Normally, you do NOT want 3-state outputs. So to fix that, go here and change the option from Yes to No.

I think you may already know that much, as well.

So this gets us to the main problem in your circuit. The PIN device only has an output connection on one of its sides. If you look at the above dialog, you can see that there is a "Facing" option. In the above, it says East. Let's look at a zoomed up version again -- this time the pin is a 2-state output and I'm putting an arrow pointing at the only connection point you can use:

See that green dot on the East side of the box? That's the place where your wiring must go. You can't come up from the bottom, or top, or the west side. You must connect at that green dot on the East side.

You didn't do that with some of your wiring.

So what happens then is that your inverters have an unknown input (shown as a blue wire) and don't know how to invert it since there's no input and inverters don't assume one for you. So the inverter generates a red wire to let you know you have a problem.

A red wire as input to a gate will cause the gate's output to also be red. (Another error.) A blue wire input into a gate with more than one input doesn't necessarily cause any trouble. For example, an AND gate with two inputs (you seem to be using the default of 5 inputs on your gates, but who is counting) and only one of them connected up to something generating a value will cause the AND gate to simply follow the only input it has. So a 0 in will put a 0 out and a 1 in will put a 1 out, in that case. So some gates will do "reasonable things" if not all their inputs are tied to something. (The case where a blue wire is okay.) In general, though, you should not want to have any blue wires. Better is to specify the correct number of inputs to your gates and then make sure that all those inputs have active and valid drivers for them.

This is how each of your left-side pins should look:

Note the lack of red wires? Or blue?

• thank you!! I see why it wasnt working! This really helps! – kristyahh wu May 18 at 23:59