diff --git a/ebpfcat/ebpf.py b/ebpfcat/ebpf.py
index 7e5457d20c21583e40b709d74f51179087c33618..84b6d4197fe880bf1981a627680504f4b01c75ea 100644
--- a/ebpfcat/ebpf.py
+++ b/ebpfcat/ebpf.py
@@ -439,8 +439,8 @@ class Expression:
     __sub__ = binary(Opcode.SUB)
     __rsub__ = rbinary(Opcode.SUB)
     __rmul__ = __mul__ = binary(Opcode.MUL)
-    __truediv__ = binary(Opcode.DIV)
-    __rtruediv__ = rbinary(Opcode.DIV)
+    __floordiv__ = binary(Opcode.DIV)
+    __rfloordiv__ = rbinary(Opcode.DIV)
     __ror__ = __or__ = binary(Opcode.OR)
     __lshift__ = binary(Opcode.LSH)
     __rlshift__ = rbinary(Opcode.LSH)
diff --git a/ebpfcat/ebpf_test.py b/ebpfcat/ebpf_test.py
index e39c6afc697e04e98071e1802d179e1bc69d8867..88928de3150dfedb26b4eefb263413171cb184ba 100644
--- a/ebpfcat/ebpf_test.py
+++ b/ebpfcat/ebpf_test.py
@@ -85,8 +85,8 @@ class Tests(TestCase):
         e.r4 -= e.r7
         e.r4 *= 3
         e.r4 *= e.r7
-        e.r4 /= 3
-        e.r4 /= e.r7
+        e.r4 //= 3
+        e.r4 //= e.r7
         e.r4 |= 3
         e.r4 |= e.r7
         e.r4 &= 3
@@ -554,7 +554,7 @@ class Tests(TestCase):
     def test_reverse_binary(self):
         e = EBPF()
         e.owners = {0, 1, 2, 3}
-        e.r3 = 7 / (e.r2 + 2)
+        e.r3 = 7 // (e.r2 + 2)
         e.r3 = 7 << e.r2
         e.r3 = 7 % (e.r2 + 3)
         e.r3 = 7 >> e.r2