diff --git a/hwtypes/bit_vector.py b/hwtypes/bit_vector.py
index <HASH>..<HASH> 100644
--- a/hwtypes/bit_vector.py
+++ b/hwtypes/bit_vector.py
@@ -281,6 +281,8 @@ class BitVector(AbstractBitVector):
     @bv_cast
     def bvurem(self, other):
         other = other.as_uint()
+        if other == 0:
+            return self
         return type(self)(self.as_uint() % other)
 
     # bvumod
Implement the corner case of x % 0