added rotation to XOr and XNOr

This commit is contained in:
hneemann 2016-04-07 14:17:57 +02:00
parent bec935acb2
commit 3d693845ea
2 changed files with 9 additions and 2 deletions

View File

@ -10,7 +10,10 @@ import de.neemann.digital.core.element.ElementTypeDescription;
*/
public class XNOr extends XOr {
public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(XNOr.class, "a", "b").addAttribute(AttributeKey.Bits);
public static final ElementTypeDescription DESCRIPTION
= new ElementTypeDescription(XNOr.class, "a", "b")
.addAttribute(AttributeKey.Rotate)
.addAttribute(AttributeKey.Bits);
public XNOr(ElementAttributes attributes) {
super(attributes);

View File

@ -14,7 +14,11 @@ import de.neemann.digital.core.element.ElementTypeDescription;
*/
public class XOr extends Node implements Element {
public static final ElementTypeDescription DESCRIPTION = new ElementTypeDescription(XOr.class, "a", "b").addAttribute(AttributeKey.Bits);
public static final ElementTypeDescription DESCRIPTION
= new ElementTypeDescription(XOr.class, "a", "b")
.addAttribute(AttributeKey.Rotate)
.addAttribute(AttributeKey.Bits);
private final int bits;
private final ObservableValue out;
protected ObservableValue a;