It is simple math. Let me give you an example.
If you have a balance of negative 100 and you need a balance of 1000 you add 1100.
(100) + 1100 = 1000
Or even simpler, you have -1 and you want 5, you add 6.
-1 + 6 = 5
The only difference here is you are dealing with debits and credits. The math is the same.