diff options
Diffstat (limited to 'XorInterpreter.java')
-rw-r--r-- | XorInterpreter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/XorInterpreter.java b/XorInterpreter.java new file mode 100644 index 0000000..1b0ee0f --- /dev/null +++ b/XorInterpreter.java @@ -0,0 +1,9 @@ +class XorInterpreter extends AbstractInterpreter { + public String eval(String code, String param) { + BitString + x1 = new BitString(code), + x2 = new BitString(param); + x1.xor(x2); + return x1.toString(code.length()); + } +} |