General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
LoneTech
Computerphile
comments
Comments by "LoneTech" (@0LoneTech) on "Binary: Plusses u0026 Minuses (Why We Use Two's Complement) - Computerphile" video.
That is a higher level operation; the binary addition described here is performed directly in the integer ALU, using only the adder. A division requires much more complicated calculations and therefore more logic and time. On processors that do have it, a zero divisor is checked as an error case, and aborts the operation itself. Floating point numbers are handled in specialized logic and have a NaN value to represent the result of an invalid operation (note that 1/0 may be +Inf instead; 0/0 will be NaN), partially so the program can continue without checking itself at every step. On some processors the integer and floating point units operate in parallel, with the integer one deciding program flow, so the floating point processor couldn't abort like integer divide by zero does.
1