From 668d5f2a864ed026891a5befe628305fe7a77fac Mon Sep 17 00:00:00 2001 From: Christian Femers Date: Mon, 2 Sep 2019 06:50:24 +0200 Subject: [PATCH] Shortcut for single bit BitVector creation added to Bit --- .../src/net/mograsim/logic/core/types/Bit.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/Bit.java b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/Bit.java index 119ee53a..752fbb80 100644 --- a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/Bit.java +++ b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/Bit.java @@ -87,6 +87,11 @@ public enum Bit implements StrictLogicType return bits; } + public BitVector toVector() + { + return BitVector.of(this, 1); + } + public BitVector toVector(int length) { return BitVector.of(this, length); -- 2.17.1