Comment

Comment by JonChesterfield

7 / 2 = 3 is similarly nonsense. It's just more familiar.

How about 5 - 8 = 0? Sensible result for the natural numbers.

X + 7? Surely you meant addition modulo 2^64.

What's the count leading zeros on zero? Is it zero, 64, random noise found in a register?

What's X shifted by word size? Zero? Minus one? X?

These are all choices. Some are familiar. But knowing integer divide zero is wrong is a tenant of faith.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton