If you're looking to get a much better understanding of /why/ things work, you should check out Ben Eater's videos on YT
https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBy...
https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBy...
You can also check out the pages for a comprehensive documentation on the hardware side of the thing: https://github.com/dangrie158/SAP-1