Computing binary numbers with Python

Pavel Ilin
Level Up Coding
Published in
5 min readFeb 24, 2021

--

As we know there are a lot of levels of abstraction between the hardware we use and what we can see on the screen. We also hear that computers work with binaries which means the unit of data is 0 and 1 (or true and false). When we tell the computer to compute something, it can’t just take numbers and do a computation. First numbers have to be converted to binary and then the computation can be performed. I decided to dive into how computers do computations in binary. For simplicity of representation, I built all functions in python.

--

--