Computer Science

Senior High

Preview

On paper, you might multiply 23 × 14 in a few lines. A CPU has no paper and works only with 0s and 1s, yet it does millions of multiplications a second. How? It uses clever methods built on just a few simple operations: adding, shifting and flipping bits. This note shows how the CPU carries out the major arithmetic operations, and how to use them correctly in programs.

Notes5

How the CPU Adds, Subtracts and Multiplies in Binary

Topic: Y2-3 Three major arithmetic operations

The major arithmetic operations as a computer really does them, explained step by step: a recap of the operations and their properties, then repeated addition vs shift-and-add multiplication, subtraction using two's complement, and using arithmetic in Python for real problems, including floating-point precision.

View resource Free to join

More on Three major arithmetic operations

Other resources you can find on TudHub.

How the CPU Adds, Subtracts and Multiplies in Binary (Computer Science) · TudHub