Firstly, forget the 100 Ω resistor for now. It's not required for the working of the button, it's just there as a protection in case you would make a programming error.
- If the button is pressed P2 will be directly connected to +5 V, so that will be seen as a high level, being "1".
- If the button is released the +5 V doesn't count anymore, there's just the 10 kΩ between the port and ground.
A microcontroller's I/O pin is high impedance when used as input, meaning there flows only a small leakage current, usually much less than the 1 µA, which will be the maximum according to the datasheet. OK, lets' say it's 1 µA. Then according to Ohm's Law this will cause a voltage drop of 1 µA \$\times\$ 10 kΩ = 10 mV across the resistor. So the input will be at 0.01 V. That's a low level, or a "0". A typical 5 V microcontroller will see any level lower than 1.5 V as low.
Now the 100 Ω resistor. If you would accidentally made the pin output and set it low then pressing the button will cause a short-circuit: the microcontroller sets 0 V on the pin, and the switch +5 V on the same pin. The microcontroller doesn't like that, and the IC may be damaged. In those cases the 100 Ω resistor should limit the current to 50 mA. (Which still is a bit too much, a 1 kΩ resistor would be better.)
Since there won't flow current into an input pin (apart from the low leakage) there will hardly be any voltage drop across the resistor.
The 10 kΩ is a typical value for a pull-up or pull-down. A lower value will give you even a lower voltage drop, but 10 mV or 1 mV doesn't make much difference. But there's something else: if the button is pressed there's 5 V across the resistor, so there will flow a current of 5 V/ 10 kΩ = 500 µA. That's low enough not to cause any problems, and you won't be keeping the button pressed for a long time anyway. But you may replace the button with a switch, which may be closed for a long time. Then if you would have chosen a 1 kΩ pull-down you would have 5 mA through the resistor as long as the switch is closed, and that's a bit of a waste. 10 kΩ is a good value.
Note that you can turn this upside down to get a pull-up resistor, and switch to ground when the button is pressed.
This will invert your logic: pressing the button will give you a "0" instead of a "1", but the working is the same: pressing the button will make the input 0 V, if you release the button the resistor will connect the input to the +5 V level (with a negligible voltage drop).
This is the way it's usually done, and microcontroller manufacturers take this into account: most microcontrollers have internal pull-up resistors, which you can activate or deactivate in software. If you use the internal pull-up you only need to connect the button to ground, that's all. (Some microcontrollers also have configurable pull-downs, but these are much less common.)
A From my recent introduction to pull-up/pull-down resistors, I understand that an input with a pull-down will stay low instead of floating.
If the pin is in fact floating, yes.
Since the pull-down resistor leads to ground, couldn't I also use a pulled-down pin as ground?
The question is what exactly do you want to achieve? If "pin" is a GPIO, just configure it as output and drive it actively to low.
My raspberry pi has software-activated pull-up/down resistors. I thought I could use them to perform a reset of my connected Arduino nano. To reset the nano, I have to tie a line to ground until the nano switches off.
Looking at Wikipedia, the raspberry pi has plenty of GPIO. Just connect one of those (as output) to the reset pin of your "nano". If the reset pin of the nano doesn't have an internal pull up, it wouldn't hurt to add an external one. Set your raspberry output to high as default and pull it down for a few milliseconds (refer to datasheet) to perform a reset of you nano.
Is the pull-down resistor too large to properly perform as a ground?
Maybe i don't understand what you want to achieve exactly, but just driving a GPO to low will probably to what you want.
EDIT regarding the comment:
I thought about driving a GPIO to low, but I didn't try it because I thought 0v and ground were two different things.
Most controllers define the maximum input low voltage around 0.5V. Look at the datasheet, in most cases this depends on the supply voltage. The controller on the Arduino nano is an ATmega328 if i am not mistaken. From the data sheet:
Take a look at the "Input low voltage, RESET pin". It states as max $$ 0,1 * Vcc $$
At Vcc = 5V this gives you $$ 0,1 * 5V = 0,5V $$
So everything below 0.5V on the Reset pin will trigger a reset.
Best Answer
As others have pointed out, your pull-down resistors don't work because they aren't pulling down hard enough. So what value do they need to be to do the job properly?
The SN7447 datasheet tells us that to be recognized as logic 0 a data input must be pulled down to 0.8V or less, and the current you have to sink could be as high as 1.6mA. Applying Ohm's Law, we get a maximum acceptable pull-down resistance of 0.8V / 0.0016A = 500 Ohms.
The only problem with this method is that when you switch the resistor to +5V it will draw 5V / 500 Ohms = 10mA, so when all 4 buttons are operated the circuit will consume 40mA more than it needs to. If you don't mind this extra current draw then pull-down resistors are fine.