You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sl...@apache.org on 2021/08/09 17:33:47 UTC

[daffodil] branch master updated: Bit Not, Bit And, Bit Or added.Daffodil-2473

This is an automated email from the ASF dual-hosted git repository.

slawrence pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/daffodil.git


The following commit(s) were added to refs/heads/master by this push:
     new fbe3ac1  Bit Not,Bit And,Bit Or added.Daffodil-2473
fbe3ac1 is described below

commit fbe3ac1e05bb04b8f3dd00b88cbe2a40593fed67
Author: s0s03c5 <Sa...@walmartlabs.com>
AuthorDate: Thu Jul 29 23:58:11 2021 +0530

    Bit Not,Bit And,Bit Or added.Daffodil-2473
---
 .../org/apache/daffodil/dpath/Expression.scala     |  43 ++-
 .../org/apache/daffodil/dpath/DFDLXFunctions.scala |  60 +++-
 .../section23/dfdl_functions/BitFunctions.tdml     |   4 -
 .../{BitFunctionsXor.tdml => BitFunctionsAnd.tdml} | 276 +++++++++----------
 .../section23/dfdl_functions/BitFunctionsNot.tdml  | 305 +++++++++++++++++++++
 .../{BitFunctionsXor.tdml => BitFunctionsOr.tdml}  | 260 +++++++++---------
 .../section23/dfdl_functions/BitFunctionsXor.tdml  |  16 +-
 .../dfdl_expressions/TestBitFunctions.scala        |  37 ++-
 8 files changed, 703 insertions(+), 298 deletions(-)

diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala b/daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
index 68ffc84..0aa0616 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala
@@ -1618,9 +1618,19 @@ case class FunctionCallExpression(functionQNameString: String, expressions: List
       case (RefQName(_, "rightShift", DFDLX), args) =>
         DFDLXShiftExpr(functionQNameString, functionQName, args,
           DFDLXRightShift(_, _))
-      case (RefQName(_, "xor", DFDLX), args) =>
-        DFDLXBitExpr(functionQNameString, functionQName, args,
-          DFDLXXor(_,_))
+      case (RefQName(_, "bitXor", DFDLX), args) =>
+        DFDLXBitBinaryExpr(functionQNameString, functionQName, args,
+          DFDLXBitXor(_,_))
+      case (RefQName(_, "bitAnd", DFDLX), args) =>
+        DFDLXBitBinaryExpr(functionQNameString, functionQName, args,
+          DFDLXBitAnd(_,_))
+      case (RefQName(_, "bitOr", DFDLX), args) =>
+        DFDLXBitBinaryExpr(functionQNameString, functionQName, args,
+          DFDLXBitOr(_,_))
+      case (RefQName(_, "bitNot", DFDLX), args) =>
+        DFDLXBitUnaryExpr(functionQNameString, functionQName, args,
+          DFDLXBitNot(_,_))
+
 
 
       case (RefQName(_, "year-from-dateTime", FUNC), args) => FNOneArgExpr(functionQNameString, functionQName, args, NodeInfo.Integer, NodeInfo.DateTime, FNYearFromDateTime(_, _))
@@ -2074,7 +2084,7 @@ case class DFDLXShiftExpr(nameAsParsed: String, fnQName: RefQName,
     res
   }
 }
-case class DFDLXBitExpr(nameAsParsed: String, fnQName: RefQName,
+case class DFDLXBitBinaryExpr(nameAsParsed: String, fnQName: RefQName,
                         args: List[Expression], constructor: (List[CompiledDPath], NodeInfo.Kind) => RecipeOp)
   extends FunctionCallBase(nameAsParsed, fnQName, args) {
   override lazy val inherentType = {
@@ -2099,6 +2109,31 @@ case class DFDLXBitExpr(nameAsParsed: String, fnQName: RefQName,
     res
   }
 }
+
+case class DFDLXBitUnaryExpr(nameAsParsed: String, fnQName: RefQName,
+                        args: List[Expression], constructor: (CompiledDPath, NodeInfo.Kind) => RecipeOp)
+  extends FunctionCallBase(nameAsParsed, fnQName, args) {
+  override lazy val inherentType = {
+    val arg0Type = args(0).inherentType
+    schemaDefinitionUnless(
+      arg0Type.isSubtypeOf(NodeInfo.PrimType.UnsignedLong) || arg0Type.isSubtypeOf(NodeInfo.PrimType.Long),
+      "The argument passed for %s must be either xs:unsignedLong or xs:long or a subtype of those, but was %s.",
+       nameAsParsed, arg0Type.globalQName)
+    arg0Type
+  }
+  override def targetTypeForSubexpression(subexp: Expression): NodeInfo.Kind = inherentType
+
+  override def compiledDPath: CompiledDPath = {
+    checkArgCount(1)
+    val argType = inherentType
+    val arg0Recipe = args(0).compiledDPath
+    val c=conversions
+    val res = new CompiledDPath(constructor(arg0Recipe, argType) +: c)
+    res
+  }
+}
+
+
 case class FNZeroArgExpr(nameAsParsed: String, fnQName: RefQName,
   resultType: NodeInfo.Kind, argType: NodeInfo.Kind, constructor: (CompiledDPath, NodeInfo.Kind) => RecipeOp)
   extends FunctionCallBase(nameAsParsed, fnQName, Nil) {
diff --git a/daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/DFDLXFunctions.scala b/daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/DFDLXFunctions.scala
index 71976a1..cf87e3c 100644
--- a/daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/DFDLXFunctions.scala
+++ b/daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/DFDLXFunctions.scala
@@ -30,7 +30,7 @@ import org.apache.daffodil.processors.unparsers.UState
 import org.apache.daffodil.processors.unparsers.UnparseError
 import org.apache.daffodil.util.Maybe.Nope
 import org.apache.daffodil.util.Maybe.One
-import passera.unsigned.{UInt, ULong}
+import passera.unsigned.{UByte, UInt, ULong, UShort}
 
 /**
  * This is the "logical" shift left.
@@ -97,8 +97,60 @@ case class DFDLXRightShift(recipes: List[CompiledDPath], argType: NodeInfo.Kind)
     }
   }
 }
+case class DFDLXBitAnd(recipes: List[CompiledDPath], argType: NodeInfo.Kind) extends FNTwoArgs(recipes) {
+  override def computeValue(arg1: DataValuePrimitive, arg2: DataValuePrimitive, dstate: DState): DataValuePrimitive = {
+    argType match {
+      case NodeInfo.Long => arg1.getLong & arg2.getLong
+      case NodeInfo.Int => arg1.getInt & arg2.getInt
+      case NodeInfo.Short => (arg1.getShort & arg2.getShort).toShort
+      case NodeInfo.Byte => (arg1.getByte & arg2.getByte).toByte
+      case NodeInfo.UnsignedLong => arg1.getBigInt.and(arg2.getBigInt)
+      case NodeInfo.UnsignedInt => arg1.getLong & arg2.getLong
+      case NodeInfo.UnsignedShort => arg1.getInt & arg2.getInt
+      case NodeInfo.UnsignedByte => (arg1.getShort & arg2.getShort).toShort
+      //$COVERAGE-OFF$
+      case _ => Assert.invariantFailed(s"dfdlx:bitAnd not supported")
+      // $COVERAGE-ON$
+    }
+  }
+}
 
-case class DFDLXXor(recipes: List[CompiledDPath], argType: NodeInfo.Kind) extends FNTwoArgs(recipes) {
+case class DFDLXBitOr(recipes: List[CompiledDPath], argType: NodeInfo.Kind) extends FNTwoArgs(recipes) {
+  override def computeValue(arg1: DataValuePrimitive, arg2: DataValuePrimitive, dstate: DState): DataValuePrimitive = {
+    argType match {
+      case NodeInfo.Long => arg1.getLong | arg2.getLong
+      case NodeInfo.Int => arg1.getInt | arg2.getInt
+      case NodeInfo.Short => (arg1.getShort | arg2.getShort).toShort
+      case NodeInfo.Byte => (arg1.getByte | arg2.getByte).toByte
+      case NodeInfo.UnsignedLong => arg1.getBigInt.or(arg2.getBigInt)
+      case NodeInfo.UnsignedInt => arg1.getLong | arg2.getLong
+      case NodeInfo.UnsignedShort => arg1.getInt | arg2.getInt
+      case NodeInfo.UnsignedByte => (arg1.getShort | arg2.getShort).toShort
+      //$COVERAGE-OFF$
+      case _ => Assert.invariantFailed(s"dfdlx:bitOr not supported")
+      // $COVERAGE-ON$
+    }
+  }
+}
+
+case class DFDLXBitNot(recipes: CompiledDPath, argType: NodeInfo.Kind) extends FNOneArg(recipes,argType) {
+  override def computeValue(arg1: DataValuePrimitive, dstate: DState): DataValuePrimitive = {
+    argType match {
+      case NodeInfo.Long => ~arg1.getLong
+      case NodeInfo.Int => ~arg1.getInt
+      case NodeInfo.Short => (~arg1.getShort).toShort
+      case NodeInfo.Byte => (~arg1.getByte).toByte
+      case NodeInfo.UnsignedLong => ULong((~arg1.getBigInt.longValue)).toBigInt
+      case NodeInfo.UnsignedInt => UInt((~arg1.getLong).toInt).toLong
+      case NodeInfo.UnsignedShort => UShort((~arg1.getInt).toShort).toInt
+      case NodeInfo.UnsignedByte => UByte((~arg1.getShort).toByte).toShort
+      //$COVERAGE-OFF$
+      case _ => Assert.invariantFailed(s"dfdlx:bitNot not supported")
+      // $COVERAGE-ON$
+    }
+  }
+}
+case class DFDLXBitXor(recipes: List[CompiledDPath], argType: NodeInfo.Kind) extends FNTwoArgs(recipes) {
   override def computeValue(arg1: DataValuePrimitive, arg2: DataValuePrimitive, dstate: DState): DataValuePrimitive = {
     argType match {
       case NodeInfo.Long => arg1.getLong ^ arg2.getLong
@@ -110,14 +162,12 @@ case class DFDLXXor(recipes: List[CompiledDPath], argType: NodeInfo.Kind) extend
       case NodeInfo.UnsignedShort => arg1.getInt ^ arg2.getInt
       case NodeInfo.UnsignedByte => (arg1.getShort ^ arg2.getShort).toShort
           //$COVERAGE-OFF$
-      case _ => Assert.invariantFailed(s"dfdlx:XOR not supported")
+      case _ => Assert.invariantFailed(s"dfdlx:bitXor not supported")
           // $COVERAGE-ON$
     }
     }
   }
 
-
-
 case class DFDLXTrace(recipe: CompiledDPath, msg: String)
   extends RecipeOpWithSubRecipes(recipe) {
 
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctions.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctions.tdml
index 0de09e8..6288d39 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctions.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctions.tdml
@@ -591,10 +591,6 @@
       </tdml:infoset>
   </tdml:parserTestCase>
 
-
-
-
-
   <tdml:parserTestCase name="leftShiftFloatError01" root="leftShiftFloat" model="BitFunctions">
     <tdml:document>1.0,1</tdml:document>
       <tdml:errors>
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsAnd.tdml
similarity index 57%
copy from daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
copy to daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsAnd.tdml
index d289a45..40737ae 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsAnd.tdml
@@ -6,9 +6,7 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-
       http://www.apache.org/licenses/LICENSE-2.0
-
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,302 +28,302 @@
     <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
     <dfdl:format ref="ex:GeneralFormat" />
 
-  <xs:complexType name="IntXor">
+  <xs:complexType name="IntAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:int" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:int" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testIntXor">
+  <xs:element name="testIntAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="IntXor1" type="ex:IntXor"/>
-        <xs:element name="IntXor2" type="ex:IntXor"/>
+        <xs:element name="IntAnd1" type="ex:IntAnd"/>
+        <xs:element name="IntAnd2" type="ex:IntAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="LongXor">
+  <xs:complexType name="LongAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:long" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:long" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testLongXor">
+  <xs:element name="testLongAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="LongXor1" type="ex:LongXor"/>
-        <xs:element name="LongXor2" type="ex:LongXor"/>
+        <xs:element name="LongAnd1" type="ex:LongAnd"/>
+        <xs:element name="LongAnd2" type="ex:LongAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="ShortXor">
+  <xs:complexType name="ShortAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:short" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:short" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testShortXor">
+  <xs:element name="testShortAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="ShortXor1" type="ex:ShortXor"/>
-        <xs:element name="ShortXor2" type="ex:ShortXor"/>
+        <xs:element name="ShortAnd1" type="ex:ShortAnd"/>
+        <xs:element name="ShortAnd2" type="ex:ShortAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="ByteXor">
+  <xs:complexType name="ByteAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:byte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:byte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testByteXor">
+  <xs:element name="testByteAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="ByteXor1" type="ex:ByteXor"/>
-        <xs:element name="ByteXor2" type="ex:ByteXor"/>
+        <xs:element name="ByteAnd1" type="ex:ByteAnd"/>
+        <xs:element name="ByteAnd2" type="ex:ByteAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedIntXor">
+  <xs:complexType name="UnsignedIntAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedInt" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedInt" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedIntXor">
+  <xs:element name="testUnsignedIntAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedIntXor1" type="ex:UnsignedIntXor"/>
-        <xs:element name="UnsignedIntXor2" type="ex:UnsignedIntXor"/>
+        <xs:element name="UnsignedIntAnd1" type="ex:UnsignedIntAnd"/>
+        <xs:element name="UnsignedIntAnd2" type="ex:UnsignedIntAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedLongXor">
+  <xs:complexType name="UnsignedLongAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedLong" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedLong" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedLongXor">
+  <xs:element name="testUnsignedLongAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedLongXor1" type="ex:UnsignedLongXor"/>
-        <xs:element name="UnsignedLongXor2" type="ex:UnsignedLongXor"/>
+        <xs:element name="UnsignedLongAnd1" type="ex:UnsignedLongAnd"/>
+        <xs:element name="UnsignedLongAnd2" type="ex:UnsignedLongAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedShortXor">
+  <xs:complexType name="UnsignedShortAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedShort" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedShort" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedShortXor">
+  <xs:element name="testUnsignedShortAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedShortXor1" type="ex:UnsignedShortXor"/>
-        <xs:element name="UnsignedShortXor2" type="ex:UnsignedShortXor"/>
+        <xs:element name="UnsignedShortAnd1" type="ex:UnsignedShortAnd"/>
+        <xs:element name="UnsignedShortAnd2" type="ex:UnsignedShortAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedByteXor">
+  <xs:complexType name="UnsignedByteAnd">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedByte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedByte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:bitAnd(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedByteXor">
+  <xs:element name="testUnsignedByteAnd">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedByteXor1" type="ex:UnsignedByteXor"/>
-        <xs:element name="UnsignedByteXor2" type="ex:UnsignedByteXor"/>
+        <xs:element name="UnsignedByteAnd1" type="ex:UnsignedByteAnd"/>
+        <xs:element name="UnsignedByteAnd2" type="ex:UnsignedByteAnd"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
   </tdml:defineSchema>
 
-  <tdml:parserTestCase name="testIntXor" root="testIntXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testIntAnd" root="testIntAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testIntXor>
-            <ex:IntXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:IntXor1>
-            <ex:IntXor2>
+          <ex:testIntAnd>
+            <ex:IntAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:IntAnd1>
+            <ex:IntAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:IntXor2>
-          </ex:testIntXor>
+              <value>0</value>
+            </ex:IntAnd2>
+          </ex:testIntAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testLongXor" root="testLongXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testLongAnd" root="testLongAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testLongXor>
-            <ex:LongXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:LongXor1>
-            <ex:LongXor2>
+          <ex:testLongAnd>
+            <ex:LongAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:LongAnd1>
+            <ex:LongAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:LongXor2>
-          </ex:testLongXor>
+              <value>0</value>
+            </ex:LongAnd2>
+          </ex:testLongAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testShortXor" root="testShortXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testShortAnd" root="testShortAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testShortXor>
-            <ex:ShortXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:ShortXor1>
-            <ex:ShortXor2>
+          <ex:testShortAnd>
+            <ex:ShortAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:ShortAnd1>
+            <ex:ShortAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:ShortXor2>
-          </ex:testShortXor>
+              <value>0</value>
+            </ex:ShortAnd2>
+          </ex:testShortAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testByteXor" root="testByteXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testByteAnd" root="testByteAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testByteXor>
-            <ex:ByteXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:ByteXor1>
-            <ex:ByteXor2>
+          <ex:testByteAnd>
+            <ex:ByteAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:ByteAnd1>
+            <ex:ByteAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:ByteXor2>
-          </ex:testByteXor>
+              <value>0</value>
+            </ex:ByteAnd2>
+          </ex:testByteAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedIntXor" root="testUnsignedIntXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedIntAnd" root="testUnsignedIntAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedIntXor>
-            <ex:UnsignedIntXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedIntXor1>
-            <ex:UnsignedIntXor2>
+          <ex:testUnsignedIntAnd>
+            <ex:UnsignedIntAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:UnsignedIntAnd1>
+            <ex:UnsignedIntAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:UnsignedIntXor2>
-          </ex:testUnsignedIntXor>
+              <value>0</value>
+            </ex:UnsignedIntAnd2>
+          </ex:testUnsignedIntAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
 
-  <tdml:parserTestCase name="testUnsignedLongXor" root="testUnsignedLongXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedLongAnd" root="testUnsignedLongAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedLongXor>
-            <ex:UnsignedLongXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedLongXor1>
-            <ex:UnsignedLongXor2>
+          <ex:testUnsignedLongAnd>
+            <ex:UnsignedLongAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:UnsignedLongAnd1>
+            <ex:UnsignedLongAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:UnsignedLongXor2>
-          </ex:testUnsignedLongXor>
+              <value>0</value>
+            </ex:UnsignedLongAnd2>
+          </ex:testUnsignedLongAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedShortXor" root="testUnsignedShortXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedShortAnd" root="testUnsignedShortAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedShortXor>
-            <ex:UnsignedShortXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedShortXor1>
-            <ex:UnsignedShortXor2>
+          <ex:testUnsignedShortAnd>
+            <ex:UnsignedShortAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:UnsignedShortAnd1>
+            <ex:UnsignedShortAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:UnsignedShortXor2>
-          </ex:testUnsignedShortXor>
+              <value>0</value>
+            </ex:UnsignedShortAnd2>
+          </ex:testUnsignedShortAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedByteXor" root="testUnsignedByteXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedByteAnd" root="testUnsignedByteAnd" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedByteXor>
-            <ex:UnsignedByteXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedByteXor1>
-            <ex:UnsignedByteXor2>
+          <ex:testUnsignedByteAnd>
+            <ex:UnsignedByteAnd1>
+              <num>3</num>
+              <count>2</count>
+              <value>2</value>
+            </ex:UnsignedByteAnd1>
+            <ex:UnsignedByteAnd2>
               <num>1</num>
               <count>0</count>
-              <value>1</value>
-            </ex:UnsignedByteXor2>
-          </ex:testUnsignedByteXor>
+              <value>0</value>
+            </ex:UnsignedByteAnd2>
+          </ex:testUnsignedByteAnd>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
-</tdml:testSuite>
+</tdml:testSuite>
\ No newline at end of file
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsNot.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsNot.tdml
new file mode 100644
index 0000000..5701bed
--- /dev/null
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsNot.tdml
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<tdml:testSuite suiteName="SimpleTypes" description="Section 5 - simple types"
+  xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions"
+  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:fn="http://www.w3.org/2005/xpath-functions"
+  xmlns:math="http://www.w3.org/2005/xpath-functions/math"
+  xmlns:ex="http://example.com"
+  xmlns:home="http://home.com"
+  xmlns:first="http://first.com"
+  defaultRoundTrip="onePass">
+  <tdml:defineSchema elementFormDefault="unqualified" name="BitFunctions">
+    <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat" />
+
+  <xs:complexType name="IntNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:int" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testIntNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="IntNot1" type="ex:IntNot"/>
+        <xs:element name="IntNot2" type="ex:IntNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="LongNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:long" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testLongNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="LongNot1" type="ex:LongNot"/>
+        <xs:element name="LongNot2" type="ex:LongNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="ShortNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:short" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testShortNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="ShortNot1" type="ex:ShortNot"/>
+        <xs:element name="ShortNot2" type="ex:ShortNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="ByteNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:byte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testByteNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="ByteNot1" type="ex:ByteNot"/>
+        <xs:element name="ByteNot2" type="ex:ByteNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="UnsignedIntNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:unsignedInt" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testUnsignedIntNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="UnsignedIntNot1" type="ex:UnsignedIntNot"/>
+        <xs:element name="UnsignedIntNot2" type="ex:UnsignedIntNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="UnsignedLongNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:unsignedLong" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testUnsignedLongNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="UnsignedLongNot1" type="ex:UnsignedLongNot"/>
+        <xs:element name="UnsignedLongNot2" type="ex:UnsignedLongNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="UnsignedShortNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:unsignedShort" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testUnsignedShortNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="UnsignedShortNot1" type="ex:UnsignedShortNot"/>
+        <xs:element name="UnsignedShortNot2" type="ex:UnsignedShortNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:complexType name="UnsignedByteNot">
+    <xs:sequence dfdl:separator=",">
+      <xs:element name="num" type="xs:unsignedByte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
+      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:bitNot(../num)}"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="testUnsignedByteNot">
+    <xs:complexType>
+      <xs:sequence dfdl:separator="|">
+        <xs:element name="UnsignedByteNot1" type="ex:UnsignedByteNot"/>
+        <xs:element name="UnsignedByteNot2" type="ex:UnsignedByteNot"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  </tdml:defineSchema>
+
+  <tdml:parserTestCase name="testIntNot" root="testIntNot" model="BitFunctions">
+    <tdml:document>1|3</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testIntNot>
+            <ex:IntNot1>
+              <num>1</num>
+              <value>-2</value>
+            </ex:IntNot1>
+            <ex:IntNot2>
+              <num>3</num>
+              <value>-4</value>
+            </ex:IntNot2>
+          </ex:testIntNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testLongNot" root="testLongNot" model="BitFunctions">
+    <tdml:document>1|3</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testLongNot>
+            <ex:LongNot1>
+              <num>1</num>
+              <value>-2</value>
+            </ex:LongNot1>
+            <ex:LongNot2>
+              <num>3</num>
+              <value>-4</value>
+            </ex:LongNot2>
+          </ex:testLongNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testShortNot" root="testShortNot" model="BitFunctions">
+    <tdml:document>1|3</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testShortNot>
+            <ex:ShortNot1>
+              <num>1</num>
+              <value>-2</value>
+            </ex:ShortNot1>
+            <ex:ShortNot2>
+              <num>3</num>
+              <value>-4</value>
+            </ex:ShortNot2>
+          </ex:testShortNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testByteNot" root="testByteNot" model="BitFunctions">
+    <tdml:document>1|3</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testByteNot>
+            <ex:ByteNot1>
+              <num>1</num>
+              <value>-2</value>
+            </ex:ByteNot1>
+            <ex:ByteNot2>
+              <num>3</num>
+              <value>-4</value>
+            </ex:ByteNot2>
+          </ex:testByteNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testUnsignedIntNot" root="testUnsignedIntNot" model="BitFunctions">
+    <tdml:document>2|1</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testUnsignedIntNot>
+            <ex:UnsignedIntNot1>
+              <num>2</num>
+              <value>4294967293</value>
+            </ex:UnsignedIntNot1>
+            <ex:UnsignedIntNot2>
+              <num>1</num>
+              <value>4294967294</value>
+            </ex:UnsignedIntNot2>
+          </ex:testUnsignedIntNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+
+  <tdml:parserTestCase name="testUnsignedLongNot" root="testUnsignedLongNot" model="BitFunctions">
+    <tdml:document>2|1</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testUnsignedLongNot>
+            <ex:UnsignedLongNot1>
+              <num>2</num>
+              <value>18446744073709551613</value>
+            </ex:UnsignedLongNot1>
+            <ex:UnsignedLongNot2>
+              <num>1</num>
+              <value>18446744073709551614</value>
+            </ex:UnsignedLongNot2>
+          </ex:testUnsignedLongNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testUnsignedShortNot" root="testUnsignedShortNot" model="BitFunctions">
+    <tdml:document>2|1</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testUnsignedShortNot>
+            <ex:UnsignedShortNot1>
+              <num>2</num>
+              <value>65533</value>
+            </ex:UnsignedShortNot1>
+            <ex:UnsignedShortNot2>
+              <num>1</num>
+              <value>65534</value>
+            </ex:UnsignedShortNot2>
+          </ex:testUnsignedShortNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="testUnsignedByteNot" root="testUnsignedByteNot" model="BitFunctions">
+    <tdml:document>1|2</tdml:document>
+      <tdml:infoset>
+        <tdml:dfdlInfoset>
+          <ex:testUnsignedByteNot>
+            <ex:UnsignedByteNot1>
+              <num>1</num>
+              <value>254</value>
+            </ex:UnsignedByteNot1>
+            <ex:UnsignedByteNot2>
+              <num>2</num>
+              <value>253</value>
+            </ex:UnsignedByteNot2>
+          </ex:testUnsignedByteNot>
+        </tdml:dfdlInfoset>
+      </tdml:infoset>
+  </tdml:parserTestCase>
+</tdml:testSuite>
\ No newline at end of file
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsOr.tdml
similarity index 57%
copy from daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
copy to daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsOr.tdml
index d289a45..248bc7b 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsOr.tdml
@@ -6,9 +6,7 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-
       http://www.apache.org/licenses/LICENSE-2.0
-
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,302 +28,302 @@
     <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
     <dfdl:format ref="ex:GeneralFormat" />
 
-  <xs:complexType name="IntXor">
+  <xs:complexType name="IntOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:int" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:int" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testIntXor">
+  <xs:element name="testIntOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="IntXor1" type="ex:IntXor"/>
-        <xs:element name="IntXor2" type="ex:IntXor"/>
+        <xs:element name="IntOr1" type="ex:IntOr"/>
+        <xs:element name="IntOr2" type="ex:IntOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="LongXor">
+  <xs:complexType name="LongOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:long" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:long" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testLongXor">
+  <xs:element name="testLongOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="LongXor1" type="ex:LongXor"/>
-        <xs:element name="LongXor2" type="ex:LongXor"/>
+        <xs:element name="LongOr1" type="ex:LongOr"/>
+        <xs:element name="LongOr2" type="ex:LongOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="ShortXor">
+  <xs:complexType name="ShortOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:short" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:short" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testShortXor">
+  <xs:element name="testShortOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="ShortXor1" type="ex:ShortXor"/>
-        <xs:element name="ShortXor2" type="ex:ShortXor"/>
+        <xs:element name="ShortOr1" type="ex:ShortOr"/>
+        <xs:element name="ShortOr2" type="ex:ShortOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="ByteXor">
+  <xs:complexType name="ByteOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:byte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:byte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testByteXor">
+  <xs:element name="testByteOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="ByteXor1" type="ex:ByteXor"/>
-        <xs:element name="ByteXor2" type="ex:ByteXor"/>
+        <xs:element name="ByteOr1" type="ex:ByteOr"/>
+        <xs:element name="ByteOr2" type="ex:ByteOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedIntXor">
+  <xs:complexType name="UnsignedIntOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedInt" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedInt" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedIntXor">
+  <xs:element name="testUnsignedIntOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedIntXor1" type="ex:UnsignedIntXor"/>
-        <xs:element name="UnsignedIntXor2" type="ex:UnsignedIntXor"/>
+        <xs:element name="UnsignedIntOr1" type="ex:UnsignedIntOr"/>
+        <xs:element name="UnsignedIntOr2" type="ex:UnsignedIntOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedLongXor">
+  <xs:complexType name="UnsignedLongOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedLong" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedLong" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedLongXor">
+  <xs:element name="testUnsignedLongOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedLongXor1" type="ex:UnsignedLongXor"/>
-        <xs:element name="UnsignedLongXor2" type="ex:UnsignedLongXor"/>
+        <xs:element name="UnsignedLongOr1" type="ex:UnsignedLongOr"/>
+        <xs:element name="UnsignedLongOr2" type="ex:UnsignedLongOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedShortXor">
+  <xs:complexType name="UnsignedShortOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedShort" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedShort" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedShortXor">
+  <xs:element name="testUnsignedShortOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedShortXor1" type="ex:UnsignedShortXor"/>
-        <xs:element name="UnsignedShortXor2" type="ex:UnsignedShortXor"/>
+        <xs:element name="UnsignedShortOr1" type="ex:UnsignedShortOr"/>
+        <xs:element name="UnsignedShortOr2" type="ex:UnsignedShortOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
-  <xs:complexType name="UnsignedByteXor">
+  <xs:complexType name="UnsignedByteOr">
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedByte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedByte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:bitOr(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
-  <xs:element name="testUnsignedByteXor">
+  <xs:element name="testUnsignedByteOr">
     <xs:complexType>
       <xs:sequence dfdl:separator="|">
-        <xs:element name="UnsignedByteXor1" type="ex:UnsignedByteXor"/>
-        <xs:element name="UnsignedByteXor2" type="ex:UnsignedByteXor"/>
+        <xs:element name="UnsignedByteOr1" type="ex:UnsignedByteOr"/>
+        <xs:element name="UnsignedByteOr2" type="ex:UnsignedByteOr"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 
   </tdml:defineSchema>
 
-  <tdml:parserTestCase name="testIntXor" root="testIntXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testIntOr" root="testIntOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testIntXor>
-            <ex:IntXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:IntXor1>
-            <ex:IntXor2>
+          <ex:testIntOr>
+            <ex:IntOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:IntOr1>
+            <ex:IntOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:IntXor2>
-          </ex:testIntXor>
+            </ex:IntOr2>
+          </ex:testIntOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testLongXor" root="testLongXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testLongOr" root="testLongOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testLongXor>
-            <ex:LongXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:LongXor1>
-            <ex:LongXor2>
+          <ex:testLongOr>
+            <ex:LongOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:LongOr1>
+            <ex:LongOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:LongXor2>
-          </ex:testLongXor>
+            </ex:LongOr2>
+          </ex:testLongOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testShortXor" root="testShortXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testShortOr" root="testShortOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testShortXor>
-            <ex:ShortXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:ShortXor1>
-            <ex:ShortXor2>
+          <ex:testShortOr>
+            <ex:ShortOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:ShortOr1>
+            <ex:ShortOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:ShortXor2>
-          </ex:testShortXor>
+            </ex:ShortOr2>
+          </ex:testShortOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testByteXor" root="testByteXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testByteOr" root="testByteOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testByteXor>
-            <ex:ByteXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:ByteXor1>
-            <ex:ByteXor2>
+          <ex:testByteOr>
+            <ex:ByteOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:ByteOr1>
+            <ex:ByteOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:ByteXor2>
-          </ex:testByteXor>
+            </ex:ByteOr2>
+          </ex:testByteOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedIntXor" root="testUnsignedIntXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedIntOr" root="testUnsignedIntOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedIntXor>
-            <ex:UnsignedIntXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedIntXor1>
-            <ex:UnsignedIntXor2>
+          <ex:testUnsignedIntOr>
+            <ex:UnsignedIntOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:UnsignedIntOr1>
+            <ex:UnsignedIntOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:UnsignedIntXor2>
-          </ex:testUnsignedIntXor>
+            </ex:UnsignedIntOr2>
+          </ex:testUnsignedIntOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
 
-  <tdml:parserTestCase name="testUnsignedLongXor" root="testUnsignedLongXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedLongOr" root="testUnsignedLongOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedLongXor>
-            <ex:UnsignedLongXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedLongXor1>
-            <ex:UnsignedLongXor2>
+          <ex:testUnsignedLongOr>
+            <ex:UnsignedLongOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:UnsignedLongOr1>
+            <ex:UnsignedLongOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:UnsignedLongXor2>
-          </ex:testUnsignedLongXor>
+            </ex:UnsignedLongOr2>
+          </ex:testUnsignedLongOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedShortXor" root="testUnsignedShortXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedShortOr" root="testUnsignedShortOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedShortXor>
-            <ex:UnsignedShortXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedShortXor1>
-            <ex:UnsignedShortXor2>
+          <ex:testUnsignedShortOr>
+            <ex:UnsignedShortOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:UnsignedShortOr1>
+            <ex:UnsignedShortOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:UnsignedShortXor2>
-          </ex:testUnsignedShortXor>
+            </ex:UnsignedShortOr2>
+          </ex:testUnsignedShortOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
 
-  <tdml:parserTestCase name="testUnsignedByteXor" root="testUnsignedByteXor" model="BitFunctions">
-    <tdml:document>1,1|1,0</tdml:document>
+  <tdml:parserTestCase name="testUnsignedByteOr" root="testUnsignedByteOr" model="BitFunctions">
+    <tdml:document>3,2|1,0</tdml:document>
       <tdml:infoset>
         <tdml:dfdlInfoset>
-          <ex:testUnsignedByteXor>
-            <ex:UnsignedByteXor1>
-              <num>1</num>
-              <count>1</count>
-              <value>0</value>
-            </ex:UnsignedByteXor1>
-            <ex:UnsignedByteXor2>
+          <ex:testUnsignedByteOr>
+            <ex:UnsignedByteOr1>
+              <num>3</num>
+              <count>2</count>
+              <value>3</value>
+            </ex:UnsignedByteOr1>
+            <ex:UnsignedByteOr2>
               <num>1</num>
               <count>0</count>
               <value>1</value>
-            </ex:UnsignedByteXor2>
-          </ex:testUnsignedByteXor>
+            </ex:UnsignedByteOr2>
+          </ex:testUnsignedByteOr>
         </tdml:dfdlInfoset>
       </tdml:infoset>
   </tdml:parserTestCase>
-</tdml:testSuite>
+</tdml:testSuite>
\ No newline at end of file
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
index d289a45..1463510 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/BitFunctionsXor.tdml
@@ -34,7 +34,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:int" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:int" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:int" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -51,7 +51,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:long" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:long" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:long" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -68,7 +68,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:short" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:short" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:short" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -85,7 +85,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:byte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:byte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:byte" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -102,7 +102,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedInt" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedInt" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedInt" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -119,7 +119,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedLong" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedLong" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedLong" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -136,7 +136,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedShort" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedShort" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedShort" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -153,7 +153,7 @@
     <xs:sequence dfdl:separator=",">
       <xs:element name="num" type="xs:unsignedByte" dfdl:lengthKind="delimited" dfdl:textNumberPattern="#0"/>
       <xs:element name="count" type="xs:unsignedByte" dfdl:lengthKind="delimited"/>
-      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:xor(../num,../count)}"/>
+      <xs:element name="value" type="xs:unsignedByte" dfdl:inputValueCalc="{dfdlx:bitXor(../num,../count)}"/>
     </xs:sequence>
   </xs:complexType>
 
diff --git a/daffodil-test/src/test/scala/org/apache/daffodil/section23/dfdl_expressions/TestBitFunctions.scala b/daffodil-test/src/test/scala/org/apache/daffodil/section23/dfdl_expressions/TestBitFunctions.scala
index 2a75d7e..2722649 100644
--- a/daffodil-test/src/test/scala/org/apache/daffodil/section23/dfdl_expressions/TestBitFunctions.scala
+++ b/daffodil-test/src/test/scala/org/apache/daffodil/section23/dfdl_expressions/TestBitFunctions.scala
@@ -26,10 +26,16 @@ object TestBitFunctions {
 
   val runner = Runner(testDir, "BitFunctions.tdml")
   val runner1= Runner(testDir,"BitFunctionsXor.tdml")
+  val runner2=Runner(testDir,"BitFunctionsOr.tdml")
+  val runner3=Runner(testDir,"BitFunctionsAnd.tdml")
+  val runner4=Runner(testDir,"BitFunctionsNot.tdml")
 
   @AfterClass def shutDown(): Unit = {
     runner.reset
     runner1.reset
+    runner2.reset
+    runner3.reset
+    runner4.reset
   }
 }
 
@@ -69,11 +75,28 @@ class TestBitFunctions {
   @Test def testUnsignedLongXor():Unit = {runner1.runOneTest("testUnsignedLongXor")}
   @Test def testUnsignedShortXor():Unit = {runner1.runOneTest("testUnsignedShortXor")}
   @Test def testUnsignedByteXor():Unit = {runner1.runOneTest("testUnsignedByteXor")}
-
-
-
-
-
-
-
+  @Test def testIntOr():Unit = {runner2.runOneTest("testIntOr")}
+  @Test def testLongOr():Unit = {runner2.runOneTest("testLongOr")}
+  @Test def testShortOr():Unit = {runner2.runOneTest("testShortOr")}
+  @Test def testByteOr():Unit = {runner2.runOneTest("testByteOr")}
+  @Test def testUnsignedIntOr():Unit = {runner2.runOneTest("testUnsignedIntOr")}
+  @Test def testUnsignedLongOr():Unit = {runner2.runOneTest("testUnsignedLongOr")}
+  @Test def testUnsignedShortOr():Unit = {runner2.runOneTest("testUnsignedShortOr")}
+  @Test def testUnsignedByteOr():Unit = {runner2.runOneTest("testUnsignedByteOr")}
+  @Test def testIntAnd():Unit = {runner3.runOneTest("testIntAnd")}
+  @Test def testLongAnd():Unit = {runner3.runOneTest("testLongAnd")}
+  @Test def testShortAnd():Unit = {runner3.runOneTest("testShortAnd")}
+  @Test def testByteAnd():Unit = {runner3.runOneTest("testByteAnd")}
+  @Test def testUnsignedIntAnd():Unit = {runner3.runOneTest("testUnsignedIntAnd")}
+  @Test def testUnsignedLongAnd():Unit = {runner3.runOneTest("testUnsignedLongAnd")}
+  @Test def testUnsignedShortAnd():Unit = {runner3.runOneTest("testUnsignedShortAnd")}
+  @Test def testUnsignedByteAnd():Unit = {runner3.runOneTest("testUnsignedByteAnd")}
+  @Test def testIntNot():Unit = {runner4.runOneTest("testIntNot")}
+  @Test def testLongNot():Unit = {runner4.runOneTest("testLongNot")}
+  @Test def testShortNot():Unit = {runner4.runOneTest("testShortNot")}
+  @Test def testByteNot():Unit = {runner4.runOneTest("testByteNot")}
+  @Test def testUnsignedIntNot():Unit = {runner4.runOneTest("testUnsignedIntNot")}
+  @Test def testUnsignedLongNot():Unit = {runner4.runOneTest("testUnsignedLongNot")}
+  @Test def testUnsignedShortNot():Unit = {runner4.runOneTest("testUnsignedShortNot")}
+  @Test def testUnsignedByteNot():Unit = {runner4.runOneTest("testUnsignedByteNot")}
 }