------
## 最终结论
```python
def num_comm_div(a, b):
    while b:
        a, b = b, a % b
    return a

# Test cases
assert num_comm_div(2, 4) == 2
assert num_comm_div(2, 8) == 2
assert num_comm_div(12, 24) == 12
```