I’ve written two introductory-level books about computer hardware and how it’s programmed. One is based on the Intel/AMD x86-64 instruction set, the other on the ARM instruction set used on the Raspberry Pi.
The latest x86-64 version is available at No Starch Press. The original version of Introduction to Computer Organization with x86-64 Assembly Language & GNU/Linux is still online.
The current version of Introduction to Computer Organization: ARM Assembly Language Using the Raspberry Pi is only available online. I have started rewriting it, also for publication by No Starch Press.
I don’t charge for the online verstions, but be aware that you may need to pay connection fees on your end.