1 and 0 are used in computing as a mathematical abstraction to denote the physical state of a logic gate. Either representing “On” or “Off” (True or False, 1 or 0).
This is a base 2 number system (0 and 1) as opposed to our base 10 system (0-9). The computer uses binary to represent numbers and letters. 1s and 0s are used as they easily represent On or Off which is how digital electronic circuitry works.
Please see the links below for a more detailed explanation: