If you check out any digital electronic circuit, you’ll mostly find pull-up and pull-down resistors in them. They are used to correctly bias the inputs of digital gates to stop them from floating around randomly when there is no input condition. For any microcontroller in an embedded system such as Arduino, pull-up and pull-down resistors utilize input and output signals for communication with external hardware devices, the General Purpose Input Output (GPIO). Implementing the pull-up and pull-down resistors in the circuit will let you achieve either ‘high’ or ‘low’ states. If you don’t implement it and there’s nothing connected to your GPIO pins, your program will read a “floating” impedance state.