That's a drastic oversimplification. Typically, both debits and credits are entered into an accounting program as positive numbers, and it is the nature of the account being debited or credited that determines whether the number is added to or subtracted from the account balance.
Or, as the old joke goes, an accountant for years would always start the work day by opening a locked desk drawer, removing a piece of paper, and studying it for a moment before returning it to the drawer. After his sudden and unexpected death one day, one of his staff had to satisfy their curiosity and opened the drawer to see what was written on the paper. It said, "debits to the window, credits to the door".
To get it, you need to know that by tradition, debits are entered on the left-hand side of the entry form, and credits on the right hand side.