Skip Navigation

Numbers and Arithmetic

Internally, computers work using binary, or base two, numbers. The digits used in binary numbers are 0 and 1, which correspond to the state of individual switches (off or on). By using circuits made of logic gates, computers are able to perform basic arithmetic.

There are 3 fundamental arithmetic operations that a computer needs to be able to perform: adding, shifting, and complementing. By combining these operations in the proper order, computers can add, subtract, multiply, divide, and carry out other basic mathematical operations. To understand how the computer is able to do math using only a limited number of low-level operations, we need to start by examining how binary numbers work. From there, we can understand how computers do math, using both integers and floating-point numbers.

Learning Materials

Sample Questions

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.