This needs a lot of compacting, the way i have done it is just not practical. How does binary work ? I’m gonna break it down into 4 steps: Step 1 : Make a table : 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | The table is made of every power of 2, starting from 0 (2^0 is 1, 2^1 is 2, 2^2 is 4, etc… btw 2^1 means “ 2 power 1”) It can be infinitely long on the left but it starts at 1 on the right. Step 2 : We now need to decompose your number into powers of 2. Take 20 for example. We first find the nearest lower power of 2 to our number, with 21 it would be 16. You then continue this process but using the subtraction of the power you found to your start number. In this case, 20 - 16 = 4.The nearest lower power of 2 to 4 is 4. So there we have it ! Our decomposition is 16, 4. If we add those numbers together, we get our starting number back, 20. Step 3 : Remember our table from earlier ? Well, we are gonna use it now. We will put the numbers in our decomposition into our table as ones and zeros, if we have a 16 in our decomposition, we put a 1 in the column 16. If we don’t have one in our decomposition, we put a 0. Step 4 : Read the zeros and ones in the table from left to right, and there you have it ! Your number is converted into binary ! Our 20 becomes 00010100. If you’re curious, the decomposition is each power that 2 needs to be to make the input number if you add them together. For example, if the decomposition is (4,2,0) then it would translate to (2^4 + 2^2 + 2^0) which in turn makes (16 + 4 + 1), (21).